diff options
author | raveit65 (via Travis CI) <[email protected]> | 2024-02-23 17:44:39 +0000 |
---|---|---|
committer | raveit65 (via Travis CI) <[email protected]> | 2024-02-23 17:44:39 +0000 |
commit | e782f9dad3b7ab11e37a3feea17a9fa2b9841d29 (patch) | |
tree | 6a6bace9e9b73a48029bf98e195775d3292f437f /2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master | |
download | mate-utils-gh-pages.tar.bz2 mate-utils-gh-pages.tar.xz |
Deploy mate-desktop/mate-utils to github.com/mate-desktop/mate-utils.git:gh-pagesgh-pages
Diffstat (limited to '2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master')
43 files changed, 84869 insertions, 0 deletions
diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/0.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/0.html new file mode 100644 index 00000000..4105fff2 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/0.html @@ -0,0 +1,745 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: baobab/src/baobab-cell-renderer-progress.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> baobab-cell-renderer-progress.c</p> +<a href="0.html#line-39"> unknownMacro 39</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2006 Paolo Borelli</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-22" name="line-22"></a><span class="cp">#endif</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-25" name="line-25"></a> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-cell-renderer-progress.h"</span> +<a id="line-27" name="line-27"></a> +<a id="line-28" name="line-28"></a><span class="k">enum</span> +<a id="line-29" name="line-29"></a><span class="p">{</span> +<a id="line-30" name="line-30"></a><span class="w"> </span><span class="n">PROP_0</span><span class="p">,</span> +<a id="line-31" name="line-31"></a><span class="w"> </span><span class="n">PROP_PERC</span> +<a id="line-32" name="line-32"></a><span class="p">};</span> +<a id="line-33" name="line-33"></a> +<a id="line-34" name="line-34"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_BaobabCellRendererProgressPrivate</span> +<a id="line-35" name="line-35"></a><span class="p">{</span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">perc</span><span class="p">;</span> +<a id="line-37" name="line-37"></a><span class="p">};</span> +<a id="line-38" name="line-38"></a> +<a id="line-39" name="line-39"></a><span class="hll"><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabCellRendererProgress</span><span class="p">,</span><span class="w"> </span><span class="n">baobab_cell_renderer_progress</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_CELL_RENDERER</span><span class="p">)</span><span class="error2"><--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</span> +</span><a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-42" name="line-42"></a><span class="n">baobab_cell_renderer_progress_init</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabCellRendererProgress</span><span class="w"> </span><span class="o">*</span><span class="n">cellprogress</span><span class="p">)</span> +<a id="line-43" name="line-43"></a><span class="p">{</span> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="n">cellprogress</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_cell_renderer_progress_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">cellprogress</span><span class="p">);</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="n">cellprogress</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">perc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-46" name="line-46"></a> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="n">gtk_cell_renderer_set_padding</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CELL_RENDERER</span><span class="w"> </span><span class="p">(</span><span class="n">cellprogress</span><span class="p">),</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="p">);</span> +<a id="line-48" name="line-48"></a><span class="p">}</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="n">GtkCellRenderer</span><span class="o">*</span> +<a id="line-51" name="line-51"></a><span class="n">baobab_cell_renderer_progress_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-52" name="line-52"></a><span class="p">{</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_TYPE_CELL_RENDERER_PROGRESS</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-54" name="line-54"></a><span class="p">}</span> +<a id="line-55" name="line-55"></a> +<a id="line-56" name="line-56"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-57" name="line-57"></a><span class="n">baobab_cell_renderer_progress_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">param_id</span><span class="p">,</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-61" name="line-61"></a><span class="p">{</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="n">BaobabCellRendererProgress</span><span class="w"> </span><span class="o">*</span><span class="n">cellprogress</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CELL_RENDERER_PROGRESS</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-63" name="line-63"></a> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">param_id</span><span class="p">)</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="p">{</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_PERC</span><span class="p">:</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">g_value_set_double</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">cellprogress</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">perc</span><span class="p">);</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">param_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="p">}</span> +<a id="line-72" name="line-72"></a><span class="p">}</span> +<a id="line-73" name="line-73"></a> +<a id="line-74" name="line-74"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-75" name="line-75"></a><span class="n">baobab_cell_renderer_progress_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">param_id</span><span class="p">,</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-79" name="line-79"></a><span class="p">{</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">BaobabCellRendererProgress</span><span class="w"> </span><span class="o">*</span><span class="n">cellprogress</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CELL_RENDERER_PROGRESS</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-81" name="line-81"></a> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">param_id</span><span class="p">)</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="p">{</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_PERC</span><span class="p">:</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">cellprogress</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">perc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_value_get_double</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">param_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="p">}</span> +<a id="line-90" name="line-90"></a><span class="p">}</span> +<a id="line-91" name="line-91"></a> +<a id="line-92" name="line-92"></a><span class="cm">/* we simply have a fixed size */</span> +<a id="line-93" name="line-93"></a> +<a id="line-94" name="line-94"></a><span class="cp">#define FIXED_WIDTH 70</span> +<a id="line-95" name="line-95"></a><span class="cp">#define FIXED_HEIGHT 8</span> +<a id="line-96" name="line-96"></a> +<a id="line-97" name="line-97"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-98" name="line-98"></a><span class="n">baobab_cell_renderer_progress_get_size</span><span class="w"> </span><span class="p">(</span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="n">cell</span><span class="p">,</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="o">*</span><span class="n">cell_area</span><span class="p">,</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="n">x_offset</span><span class="p">,</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="n">y_offset</span><span class="p">,</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="n">width</span><span class="p">,</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="n">height</span><span class="p">)</span> +<a id="line-105" name="line-105"></a><span class="p">{</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">calc_width</span><span class="p">;</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">calc_height</span><span class="p">;</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">xpad</span><span class="p">;</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">ypad</span><span class="p">;</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">gfloat</span><span class="w"> </span><span class="n">xalign</span><span class="p">;</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">gfloat</span><span class="w"> </span><span class="n">yalign</span><span class="p">;</span> +<a id="line-112" name="line-112"></a> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">gtk_cell_renderer_get_padding</span><span class="w"> </span><span class="p">(</span><span class="n">cell</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">xpad</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">ypad</span><span class="p">);</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">calc_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="n">xpad</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">FIXED_WIDTH</span><span class="p">;</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="n">calc_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="n">ypad</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">FIXED_HEIGHT</span><span class="p">;</span> +<a id="line-116" name="line-116"></a> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">width</span><span class="p">)</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="o">*</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">calc_width</span><span class="p">;</span> +<a id="line-119" name="line-119"></a> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">height</span><span class="p">)</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="o">*</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">calc_height</span><span class="p">;</span> +<a id="line-122" name="line-122"></a> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">cell_area</span><span class="p">)</span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="p">{</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">gtk_cell_renderer_get_alignment</span><span class="w"> </span><span class="p">(</span><span class="n">cell</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">xalign</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">yalign</span><span class="p">);</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">x_offset</span><span class="p">)</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="p">{</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="o">*</span><span class="n">x_offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">xalign</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">gfloat</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">cell_area</span><span class="o">-></span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">calc_width</span><span class="p">));</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="o">*</span><span class="n">x_offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">x_offset</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="p">}</span> +<a id="line-131" name="line-131"></a> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">y_offset</span><span class="p">)</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="p">{</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="o">*</span><span class="n">y_offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">yalign</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">gfloat</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">cell_area</span><span class="o">-></span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">calc_height</span><span class="p">));</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="o">*</span><span class="n">y_offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">y_offset</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="p">}</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="p">}</span> +<a id="line-138" name="line-138"></a><span class="p">}</span> +<a id="line-139" name="line-139"></a> +<a id="line-140" name="line-140"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-141" name="line-141"></a><span class="n">set_color_according_to_perc</span><span class="w"> </span><span class="p">(</span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">value</span><span class="p">)</span> +<a id="line-142" name="line-142"></a><span class="p">{</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GdkRGBA</span><span class="w"> </span><span class="n">red</span><span class="p">;</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GdkRGBA</span><span class="w"> </span><span class="n">yellow</span><span class="p">;</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GdkRGBA</span><span class="w"> </span><span class="n">green</span><span class="p">;</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">colors_initialized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-147" name="line-147"></a> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">colors_initialized</span><span class="p">)</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="p">{</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="cm">/* hardcoded tango colors */</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">gdk_rgba_parse</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">red</span><span class="p">,</span><span class="w"> </span><span class="s">"#cc0000"</span><span class="p">);</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">gdk_rgba_parse</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">yellow</span><span class="p">,</span><span class="w"> </span><span class="s">"#edd400"</span><span class="p">);</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">gdk_rgba_parse</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">green</span><span class="p">,</span><span class="w"> </span><span class="s">"#73d216"</span><span class="p">);</span> +<a id="line-154" name="line-154"></a> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">colors_initialized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="p">}</span> +<a id="line-157" name="line-157"></a> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="p">{</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="p">}</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mf">33.33</span><span class="p">)</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="p">{</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">gdk_cairo_set_source_rgba</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">green</span><span class="p">);</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="p">}</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mf">66.66</span><span class="p">)</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="p">{</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">gdk_cairo_set_source_rgba</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">yellow</span><span class="p">);</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="p">}</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mf">100.0</span><span class="p">)</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="p">{</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">gdk_cairo_set_source_rgba</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">red</span><span class="p">);</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="p">}</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="k">else</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-180" name="line-180"></a><span class="p">}</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-183" name="line-183"></a><span class="n">baobab_cell_renderer_progress_render</span><span class="w"> </span><span class="p">(</span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="n">cell</span><span class="p">,</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="o">*</span><span class="n">background_area</span><span class="p">,</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="o">*</span><span class="n">cell_area</span><span class="p">,</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">flags</span><span class="p">)</span> +<a id="line-189" name="line-189"></a><span class="p">{</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">BaobabCellRendererProgress</span><span class="w"> </span><span class="o">*</span><span class="n">cellprogress</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CELL_RENDERER_PROGRESS</span><span class="w"> </span><span class="p">(</span><span class="n">cell</span><span class="p">);</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">h</span><span class="p">,</span><span class="w"> </span><span class="n">perc_w</span><span class="p">;</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_rtl</span><span class="p">;</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">xpad</span><span class="p">;</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">ypad</span><span class="p">;</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">GtkStyle</span><span class="w"> </span><span class="o">*</span><span class="n">style</span><span class="p">;</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">is_rtl</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_direction</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_TEXT_DIR_RTL</span><span class="p">;</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">gtk_cell_renderer_get_padding</span><span class="w"> </span><span class="p">(</span><span class="n">cell</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">xpad</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">ypad</span><span class="p">);</span> +<a id="line-200" name="line-200"></a> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cell_area</span><span class="o">-></span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">xpad</span><span class="p">;</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cell_area</span><span class="o">-></span><span class="n">y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ypad</span><span class="p">;</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cell_area</span><span class="o">-></span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">xpad</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">h</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cell_area</span><span class="o">-></span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ypad</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-206" name="line-206"></a> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="cm">/*</span> +<a id="line-208" name="line-208"></a><span class="cm"> * we always use a white bar with black</span> +<a id="line-209" name="line-209"></a><span class="cm"> * border and green/yellow/red progress...</span> +<a id="line-210" name="line-210"></a><span class="cm"> * I know it's not theme friendly, but we don't</span> +<a id="line-211" name="line-211"></a><span class="cm"> * want a plain progress bar</span> +<a id="line-212" name="line-212"></a><span class="cm"> */</span> +<a id="line-213" name="line-213"></a> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">cairo_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">h</span><span class="p">);</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">cairo_fill</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-217" name="line-217"></a> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">style</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_style</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">style</span><span class="o">-></span><span class="n">xthickness</span><span class="p">;</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">style</span><span class="o">-></span><span class="n">ythickness</span><span class="p">;</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">style</span><span class="o">-></span><span class="n">xthickness</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">h</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">style</span><span class="o">-></span><span class="n">ythickness</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-223" name="line-223"></a> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">cairo_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">h</span><span class="p">);</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">cairo_fill</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-227" name="line-227"></a> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">perc_w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">cellprogress</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">perc</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">100</span><span class="p">);</span> +<a id="line-229" name="line-229"></a> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">cairo_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">is_rtl</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">perc_w</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">perc_w</span><span class="p">,</span><span class="w"> </span><span class="n">h</span><span class="p">);</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">set_color_according_to_perc</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">cellprogress</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">perc</span><span class="p">);</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">cairo_fill</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-233" name="line-233"></a><span class="p">}</span> +<a id="line-234" name="line-234"></a> +<a id="line-235" name="line-235"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-236" name="line-236"></a><span class="n">baobab_cell_renderer_progress_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabCellRendererProgressClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-237" name="line-237"></a><span class="p">{</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">object_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">GtkCellRendererClass</span><span class="w"> </span><span class="o">*</span><span class="n">cell_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_CELL_RENDERER_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-240" name="line-240"></a> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">object_class</span><span class="o">-></span><span class="n">get_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_cell_renderer_progress_get_property</span><span class="p">;</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">object_class</span><span class="o">-></span><span class="n">set_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_cell_renderer_progress_set_property</span><span class="p">;</span> +<a id="line-243" name="line-243"></a> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">cell_class</span><span class="o">-></span><span class="n">get_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_cell_renderer_progress_get_size</span><span class="p">;</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">cell_class</span><span class="o">-></span><span class="n">render</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_cell_renderer_progress_render</span><span class="p">;</span> +<a id="line-246" name="line-246"></a> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">,</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">PROP_PERC</span><span class="p">,</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">g_param_spec_double</span><span class="w"> </span><span class="p">(</span><span class="s">"perc"</span><span class="p">,</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="s">"percentage"</span><span class="p">,</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="s">"precentage"</span><span class="p">,</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="p">));</span> +<a id="line-254" name="line-254"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/1.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/1.html new file mode 100644 index 00000000..449060ed --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/1.html @@ -0,0 +1,4065 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: baobab/src/baobab-chart.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> baobab-chart.c</p> +<a href="1.html#line-337"> variableScope 337</a><a href="1.html#line-465"> variableScope 465</a><a href="1.html#line-499"> variableScope 499</a><a href="1.html#line-673"> constParameter 673</a><a href="1.html#line-687"> constParameter 687</a><a href="1.html#line-701"> constParameter 701</a><a href="1.html#line-729"> constParameter 729</a><a href="1.html#line-1007"> variableScope 1007</a><a href="1.html#line-1412"> variableScope 1412</a><a href="1.html#line-1628"> variableScope 1628</a><a href="1.html#line-1688"> variableScope 1688</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span> +<span class="normal">1328</span> +<span class="normal">1329</span> +<span class="normal">1330</span> +<span class="normal">1331</span> +<span class="normal">1332</span> +<span class="normal">1333</span> +<span class="normal">1334</span> +<span class="normal">1335</span> +<span class="normal">1336</span> +<span class="normal">1337</span> +<span class="normal">1338</span> +<span class="normal">1339</span> +<span class="normal">1340</span> +<span class="normal">1341</span> +<span class="normal">1342</span> +<span class="normal">1343</span> +<span class="normal">1344</span> +<span class="normal">1345</span> +<span class="normal">1346</span> +<span class="normal">1347</span> +<span class="normal">1348</span> +<span class="normal">1349</span> +<span class="normal">1350</span> +<span class="normal">1351</span> +<span class="normal">1352</span> +<span class="normal">1353</span> +<span class="normal">1354</span> +<span class="normal">1355</span> +<span class="normal">1356</span> +<span class="normal">1357</span> +<span class="normal">1358</span> +<span class="normal">1359</span> +<span class="normal">1360</span> +<span class="normal">1361</span> +<span class="normal">1362</span> +<span class="normal">1363</span> +<span class="normal">1364</span> +<span class="normal">1365</span> +<span class="normal">1366</span> +<span class="normal">1367</span> +<span class="normal">1368</span> +<span class="normal">1369</span> +<span class="normal">1370</span> +<span class="normal">1371</span> +<span class="normal">1372</span> +<span class="normal">1373</span> +<span class="normal">1374</span> +<span class="normal">1375</span> +<span class="normal">1376</span> +<span class="normal">1377</span> +<span class="normal">1378</span> +<span class="normal">1379</span> +<span class="normal">1380</span> +<span class="normal">1381</span> +<span class="normal">1382</span> +<span class="normal">1383</span> +<span class="normal">1384</span> +<span class="normal">1385</span> +<span class="normal">1386</span> +<span class="normal">1387</span> +<span class="normal">1388</span> +<span class="normal">1389</span> +<span class="normal">1390</span> +<span class="normal">1391</span> +<span class="normal">1392</span> +<span class="normal">1393</span> +<span class="normal">1394</span> +<span class="normal">1395</span> +<span class="normal">1396</span> +<span class="normal">1397</span> +<span class="normal">1398</span> +<span class="normal">1399</span> +<span class="normal">1400</span> +<span class="normal">1401</span> +<span class="normal">1402</span> +<span class="normal">1403</span> +<span class="normal">1404</span> +<span class="normal">1405</span> +<span class="normal">1406</span> +<span class="normal">1407</span> +<span class="normal">1408</span> +<span class="normal">1409</span> +<span class="normal">1410</span> +<span class="normal">1411</span> +<span class="normal">1412</span> +<span class="normal">1413</span> +<span class="normal">1414</span> +<span class="normal">1415</span> +<span class="normal">1416</span> +<span class="normal">1417</span> +<span class="normal">1418</span> +<span class="normal">1419</span> +<span class="normal">1420</span> +<span class="normal">1421</span> +<span class="normal">1422</span> +<span class="normal">1423</span> +<span class="normal">1424</span> +<span class="normal">1425</span> +<span class="normal">1426</span> +<span class="normal">1427</span> +<span class="normal">1428</span> +<span class="normal">1429</span> +<span class="normal">1430</span> +<span class="normal">1431</span> +<span class="normal">1432</span> +<span class="normal">1433</span> +<span class="normal">1434</span> +<span class="normal">1435</span> +<span class="normal">1436</span> +<span class="normal">1437</span> +<span class="normal">1438</span> +<span class="normal">1439</span> +<span class="normal">1440</span> +<span class="normal">1441</span> +<span class="normal">1442</span> +<span class="normal">1443</span> +<span class="normal">1444</span> +<span class="normal">1445</span> +<span class="normal">1446</span> +<span class="normal">1447</span> +<span class="normal">1448</span> +<span class="normal">1449</span> +<span class="normal">1450</span> +<span class="normal">1451</span> +<span class="normal">1452</span> +<span class="normal">1453</span> +<span class="normal">1454</span> +<span class="normal">1455</span> +<span class="normal">1456</span> +<span class="normal">1457</span> +<span class="normal">1458</span> +<span class="normal">1459</span> +<span class="normal">1460</span> +<span class="normal">1461</span> +<span class="normal">1462</span> +<span class="normal">1463</span> +<span class="normal">1464</span> +<span class="normal">1465</span> +<span class="normal">1466</span> +<span class="normal">1467</span> +<span class="normal">1468</span> +<span class="normal">1469</span> +<span class="normal">1470</span> +<span class="normal">1471</span> +<span class="normal">1472</span> +<span class="normal">1473</span> +<span class="normal">1474</span> +<span class="normal">1475</span> +<span class="normal">1476</span> +<span class="normal">1477</span> +<span class="normal">1478</span> +<span class="normal">1479</span> +<span class="normal">1480</span> +<span class="normal">1481</span> +<span class="normal">1482</span> +<span class="normal">1483</span> +<span class="normal">1484</span> +<span class="normal">1485</span> +<span class="normal">1486</span> +<span class="normal">1487</span> +<span class="normal">1488</span> +<span class="normal">1489</span> +<span class="normal">1490</span> +<span class="normal">1491</span> +<span class="normal">1492</span> +<span class="normal">1493</span> +<span class="normal">1494</span> +<span class="normal">1495</span> +<span class="normal">1496</span> +<span class="normal">1497</span> +<span class="normal">1498</span> +<span class="normal">1499</span> +<span class="normal">1500</span> +<span class="normal">1501</span> +<span class="normal">1502</span> +<span class="normal">1503</span> +<span class="normal">1504</span> +<span class="normal">1505</span> +<span class="normal">1506</span> +<span class="normal">1507</span> +<span class="normal">1508</span> +<span class="normal">1509</span> +<span class="normal">1510</span> +<span class="normal">1511</span> +<span class="normal">1512</span> +<span class="normal">1513</span> +<span class="normal">1514</span> +<span class="normal">1515</span> +<span class="normal">1516</span> +<span class="normal">1517</span> +<span class="normal">1518</span> +<span class="normal">1519</span> +<span class="normal">1520</span> +<span class="normal">1521</span> +<span class="normal">1522</span> +<span class="normal">1523</span> +<span class="normal">1524</span> +<span class="normal">1525</span> +<span class="normal">1526</span> +<span class="normal">1527</span> +<span class="normal">1528</span> +<span class="normal">1529</span> +<span class="normal">1530</span> +<span class="normal">1531</span> +<span class="normal">1532</span> +<span class="normal">1533</span> +<span class="normal">1534</span> +<span class="normal">1535</span> +<span class="normal">1536</span> +<span class="normal">1537</span> +<span class="normal">1538</span> +<span class="normal">1539</span> +<span class="normal">1540</span> +<span class="normal">1541</span> +<span class="normal">1542</span> +<span class="normal">1543</span> +<span class="normal">1544</span> +<span class="normal">1545</span> +<span class="normal">1546</span> +<span class="normal">1547</span> +<span class="normal">1548</span> +<span class="normal">1549</span> +<span class="normal">1550</span> +<span class="normal">1551</span> +<span class="normal">1552</span> +<span class="normal">1553</span> +<span class="normal">1554</span> +<span class="normal">1555</span> +<span class="normal">1556</span> +<span class="normal">1557</span> +<span class="normal">1558</span> +<span class="normal">1559</span> +<span class="normal">1560</span> +<span class="normal">1561</span> +<span class="normal">1562</span> +<span class="normal">1563</span> +<span class="normal">1564</span> +<span class="normal">1565</span> +<span class="normal">1566</span> +<span class="normal">1567</span> +<span class="normal">1568</span> +<span class="normal">1569</span> +<span class="normal">1570</span> +<span class="normal">1571</span> +<span class="normal">1572</span> +<span class="normal">1573</span> +<span class="normal">1574</span> +<span class="normal">1575</span> +<span class="normal">1576</span> +<span class="normal">1577</span> +<span class="normal">1578</span> +<span class="normal">1579</span> +<span class="normal">1580</span> +<span class="normal">1581</span> +<span class="normal">1582</span> +<span class="normal">1583</span> +<span class="normal">1584</span> +<span class="normal">1585</span> +<span class="normal">1586</span> +<span class="normal">1587</span> +<span class="normal">1588</span> +<span class="normal">1589</span> +<span class="normal">1590</span> +<span class="normal">1591</span> +<span class="normal">1592</span> +<span class="normal">1593</span> +<span class="normal">1594</span> +<span class="normal">1595</span> +<span class="normal">1596</span> +<span class="normal">1597</span> +<span class="normal">1598</span> +<span class="normal">1599</span> +<span class="normal">1600</span> +<span class="normal">1601</span> +<span class="normal">1602</span> +<span class="normal">1603</span> +<span class="normal">1604</span> +<span class="normal">1605</span> +<span class="normal">1606</span> +<span class="normal">1607</span> +<span class="normal">1608</span> +<span class="normal">1609</span> +<span class="normal">1610</span> +<span class="normal">1611</span> +<span class="normal">1612</span> +<span class="normal">1613</span> +<span class="normal">1614</span> +<span class="normal">1615</span> +<span class="normal">1616</span> +<span class="normal">1617</span> +<span class="normal">1618</span> +<span class="normal">1619</span> +<span class="normal">1620</span> +<span class="normal">1621</span> +<span class="normal">1622</span> +<span class="normal">1623</span> +<span class="normal">1624</span> +<span class="normal">1625</span> +<span class="normal">1626</span> +<span class="normal">1627</span> +<span class="normal">1628</span> +<span class="normal">1629</span> +<span class="normal">1630</span> +<span class="normal">1631</span> +<span class="normal">1632</span> +<span class="normal">1633</span> +<span class="normal">1634</span> +<span class="normal">1635</span> +<span class="normal">1636</span> +<span class="normal">1637</span> +<span class="normal">1638</span> +<span class="normal">1639</span> +<span class="normal">1640</span> +<span class="normal">1641</span> +<span class="normal">1642</span> +<span class="normal">1643</span> +<span class="normal">1644</span> +<span class="normal">1645</span> +<span class="normal">1646</span> +<span class="normal">1647</span> +<span class="normal">1648</span> +<span class="normal">1649</span> +<span class="normal">1650</span> +<span class="normal">1651</span> +<span class="normal">1652</span> +<span class="normal">1653</span> +<span class="normal">1654</span> +<span class="normal">1655</span> +<span class="normal">1656</span> +<span class="normal">1657</span> +<span class="normal">1658</span> +<span class="normal">1659</span> +<span class="normal">1660</span> +<span class="normal">1661</span> +<span class="normal">1662</span> +<span class="normal">1663</span> +<span class="normal">1664</span> +<span class="normal">1665</span> +<span class="normal">1666</span> +<span class="normal">1667</span> +<span class="normal">1668</span> +<span class="normal">1669</span> +<span class="normal">1670</span> +<span class="normal">1671</span> +<span class="normal">1672</span> +<span class="normal">1673</span> +<span class="normal">1674</span> +<span class="normal">1675</span> +<span class="normal">1676</span> +<span class="normal">1677</span> +<span class="normal">1678</span> +<span class="normal">1679</span> +<span class="normal">1680</span> +<span class="normal">1681</span> +<span class="normal">1682</span> +<span class="normal">1683</span> +<span class="normal">1684</span> +<span class="normal">1685</span> +<span class="normal">1686</span> +<span class="normal">1687</span> +<span class="normal">1688</span> +<span class="normal">1689</span> +<span class="normal">1690</span> +<span class="normal">1691</span> +<span class="normal">1692</span> +<span class="normal">1693</span> +<span class="normal">1694</span> +<span class="normal">1695</span> +<span class="normal">1696</span> +<span class="normal">1697</span> +<span class="normal">1698</span> +<span class="normal">1699</span> +<span class="normal">1700</span> +<span class="normal">1701</span> +<span class="normal">1702</span> +<span class="normal">1703</span> +<span class="normal">1704</span> +<span class="normal">1705</span> +<span class="normal">1706</span> +<span class="normal">1707</span> +<span class="normal">1708</span> +<span class="normal">1709</span> +<span class="normal">1710</span> +<span class="normal">1711</span> +<span class="normal">1712</span> +<span class="normal">1713</span> +<span class="normal">1714</span> +<span class="normal">1715</span> +<span class="normal">1716</span> +<span class="normal">1717</span> +<span class="normal">1718</span> +<span class="normal">1719</span> +<span class="normal">1720</span> +<span class="normal">1721</span> +<span class="normal">1722</span> +<span class="normal">1723</span> +<span class="normal">1724</span> +<span class="normal">1725</span> +<span class="normal">1726</span> +<span class="normal">1727</span> +<span class="normal">1728</span> +<span class="normal">1729</span> +<span class="normal">1730</span> +<span class="normal">1731</span> +<span class="normal">1732</span> +<span class="normal">1733</span> +<span class="normal">1734</span> +<span class="normal">1735</span> +<span class="normal">1736</span> +<span class="normal">1737</span> +<span class="normal">1738</span> +<span class="normal">1739</span> +<span class="normal">1740</span> +<span class="normal">1741</span> +<span class="normal">1742</span> +<span class="normal">1743</span> +<span class="normal">1744</span> +<span class="normal">1745</span> +<span class="normal">1746</span> +<span class="normal">1747</span> +<span class="normal">1748</span> +<span class="normal">1749</span> +<span class="normal">1750</span> +<span class="normal">1751</span> +<span class="normal">1752</span> +<span class="normal">1753</span> +<span class="normal">1754</span> +<span class="normal">1755</span> +<span class="normal">1756</span> +<span class="normal">1757</span> +<span class="normal">1758</span> +<span class="normal">1759</span> +<span class="normal">1760</span> +<span class="normal">1761</span> +<span class="normal">1762</span> +<span class="normal">1763</span> +<span class="normal">1764</span> +<span class="normal">1765</span> +<span class="normal">1766</span> +<span class="normal">1767</span> +<span class="normal">1768</span> +<span class="normal">1769</span> +<span class="normal">1770</span> +<span class="normal">1771</span> +<span class="normal">1772</span> +<span class="normal">1773</span> +<span class="normal">1774</span> +<span class="normal">1775</span> +<span class="normal">1776</span> +<span class="normal">1777</span> +<span class="normal">1778</span> +<span class="normal">1779</span> +<span class="normal">1780</span> +<span class="normal">1781</span> +<span class="normal">1782</span> +<span class="normal">1783</span> +<span class="normal">1784</span> +<span class="normal">1785</span> +<span class="normal">1786</span> +<span class="normal">1787</span> +<span class="normal">1788</span> +<span class="normal">1789</span> +<span class="normal">1790</span> +<span class="normal">1791</span> +<span class="normal">1792</span> +<span class="normal">1793</span> +<span class="normal">1794</span> +<span class="normal">1795</span> +<span class="normal">1796</span> +<span class="normal">1797</span> +<span class="normal">1798</span> +<span class="normal">1799</span> +<span class="normal">1800</span> +<span class="normal">1801</span> +<span class="normal">1802</span> +<span class="normal">1803</span> +<span class="normal">1804</span> +<span class="normal">1805</span> +<span class="normal">1806</span> +<span class="normal">1807</span> +<span class="normal">1808</span> +<span class="normal">1809</span> +<span class="normal">1810</span> +<span class="normal">1811</span> +<span class="normal">1812</span> +<span class="normal">1813</span> +<span class="normal">1814</span> +<span class="normal">1815</span> +<span class="normal">1816</span> +<span class="normal">1817</span> +<span class="normal">1818</span> +<span class="normal">1819</span> +<span class="normal">1820</span> +<span class="normal">1821</span> +<span class="normal">1822</span> +<span class="normal">1823</span> +<span class="normal">1824</span> +<span class="normal">1825</span> +<span class="normal">1826</span> +<span class="normal">1827</span> +<span class="normal">1828</span> +<span class="normal">1829</span> +<span class="normal">1830</span> +<span class="normal">1831</span> +<span class="normal">1832</span> +<span class="normal">1833</span> +<span class="normal">1834</span> +<span class="normal">1835</span> +<span class="normal">1836</span> +<span class="normal">1837</span> +<span class="normal">1838</span> +<span class="normal">1839</span> +<span class="normal">1840</span> +<span class="normal">1841</span> +<span class="normal">1842</span> +<span class="normal">1843</span> +<span class="normal">1844</span> +<span class="normal">1845</span> +<span class="normal">1846</span> +<span class="normal">1847</span> +<span class="normal">1848</span> +<span class="normal">1849</span> +<span class="normal">1850</span> +<span class="normal">1851</span> +<span class="normal">1852</span> +<span class="normal">1853</span> +<span class="normal">1854</span> +<span class="normal">1855</span> +<span class="normal">1856</span> +<span class="normal">1857</span> +<span class="normal">1858</span> +<span class="normal">1859</span> +<span class="normal">1860</span> +<span class="normal">1861</span> +<span class="normal">1862</span> +<span class="normal">1863</span> +<span class="normal">1864</span> +<span class="normal">1865</span> +<span class="normal">1866</span> +<span class="normal">1867</span> +<span class="normal">1868</span> +<span class="normal">1869</span> +<span class="normal">1870</span> +<span class="normal">1871</span> +<span class="normal">1872</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2006, 2007, 2008 Igalia</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> *</span> +<a id="line-19" name="line-19"></a><span class="cm"> * Authors:</span> +<a id="line-20" name="line-20"></a><span class="cm"> * Felipe Erias <[email protected]></span> +<a id="line-21" name="line-21"></a><span class="cm"> * Pablo Santamaria <[email protected]></span> +<a id="line-22" name="line-22"></a><span class="cm"> * Jacobo Aragunde <[email protected]></span> +<a id="line-23" name="line-23"></a><span class="cm"> * Eduardo Lima <[email protected]></span> +<a id="line-24" name="line-24"></a><span class="cm"> * Mario Sanchez <[email protected]></span> +<a id="line-25" name="line-25"></a><span class="cm"> * Miguel Gomez <[email protected]></span> +<a id="line-26" name="line-26"></a><span class="cm"> * Henrique Ferreiro <[email protected]></span> +<a id="line-27" name="line-27"></a><span class="cm"> * Alejandro Pinheiro <[email protected]></span> +<a id="line-28" name="line-28"></a><span class="cm"> * Carlos Sanmartin <[email protected]></span> +<a id="line-29" name="line-29"></a><span class="cm"> * Alejandro Garcia <[email protected]></span> +<a id="line-30" name="line-30"></a><span class="cm"> */</span> +<a id="line-31" name="line-31"></a> +<a id="line-32" name="line-32"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#endif</span> +<a id="line-35" name="line-35"></a> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-38" name="line-38"></a> +<a id="line-39" name="line-39"></a><span class="cm">/* needed for floor and ceil */</span> +<a id="line-40" name="line-40"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><math.h></span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-chart.h"</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="cp">#define SNAPSHOT_DEF_FILENAME_FORMAT "%s-disk-usage"</span> +<a id="line-45" name="line-45"></a> +<a id="line-46" name="line-46"></a><span class="cp">#define BAOBAB_CHART_MAX_DEPTH 8</span> +<a id="line-47" name="line-47"></a><span class="cp">#define BAOBAB_CHART_MIN_DEPTH 1</span> +<a id="line-48" name="line-48"></a> +<a id="line-49" name="line-49"></a><span class="k">enum</span> +<a id="line-50" name="line-50"></a><span class="p">{</span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">LEFT_BUTTON</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">MIDDLE_BUTTON</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="n">RIGHT_BUTTON</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span> +<a id="line-54" name="line-54"></a><span class="p">};</span> +<a id="line-55" name="line-55"></a> +<a id="line-56" name="line-56"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_BaobabChartPrivate</span> +<a id="line-57" name="line-57"></a><span class="p">{</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">name_column</span><span class="p">;</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">size_column</span><span class="p">;</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">info_column</span><span class="p">;</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">percentage_column</span><span class="p">;</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">valid_column</span><span class="p">;</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">button_pressed</span><span class="p">;</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_frozen</span><span class="p">;</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">cairo_surface_t</span><span class="w"> </span><span class="o">*</span><span class="n">memento</span><span class="p">;</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">max_depth</span><span class="p">;</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">model_changed</span><span class="p">;</span> +<a id="line-69" name="line-69"></a> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">GtkTreeRowReference</span><span class="w"> </span><span class="o">*</span><span class="n">root</span><span class="p">;</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">first_item</span><span class="p">;</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">last_item</span><span class="p">;</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">highlighted_item</span><span class="p">;</span> +<a id="line-76" name="line-76"></a><span class="p">};</span> +<a id="line-77" name="line-77"></a> +<a id="line-78" name="line-78"></a><span class="cm">/* Signals */</span> +<a id="line-79" name="line-79"></a><span class="k">enum</span> +<a id="line-80" name="line-80"></a><span class="p">{</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="n">ITEM_ACTIVATED</span><span class="p">,</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-83" name="line-83"></a><span class="p">};</span> +<a id="line-84" name="line-84"></a> +<a id="line-85" name="line-85"></a><span class="n">G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChart</span><span class="p">,</span><span class="w"> </span><span class="n">baobab_chart</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_WIDGET</span><span class="p">);</span> +<a id="line-86" name="line-86"></a> +<a id="line-87" name="line-87"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">baobab_chart_signals</span><span class="w"> </span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-88" name="line-88"></a> +<a id="line-89" name="line-89"></a><span class="cm">/* Properties */</span> +<a id="line-90" name="line-90"></a><span class="k">enum</span> +<a id="line-91" name="line-91"></a><span class="p">{</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="n">PROP_0</span><span class="p">,</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">PROP_MAX_DEPTH</span><span class="p">,</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">PROP_MODEL</span><span class="p">,</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">PROP_ROOT</span><span class="p">,</span> +<a id="line-96" name="line-96"></a><span class="p">};</span> +<a id="line-97" name="line-97"></a> +<a id="line-98" name="line-98"></a><span class="cm">/* Colors */</span> +<a id="line-99" name="line-99"></a><span class="k">const</span><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">baobab_chart_tango_colors</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{{</span><span class="mf">0.94</span><span class="p">,</span><span class="w"> </span><span class="mf">0.16</span><span class="p">,</span><span class="w"> </span><span class="mf">0.16</span><span class="p">},</span><span class="w"> </span><span class="cm">/* tango: ef2929 */</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="p">{</span><span class="mf">0.68</span><span class="p">,</span><span class="w"> </span><span class="mf">0.49</span><span class="p">,</span><span class="w"> </span><span class="mf">0.66</span><span class="p">},</span><span class="w"> </span><span class="cm">/* tango: ad7fa8 */</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="p">{</span><span class="mf">0.45</span><span class="p">,</span><span class="w"> </span><span class="mf">0.62</span><span class="p">,</span><span class="w"> </span><span class="mf">0.82</span><span class="p">},</span><span class="w"> </span><span class="cm">/* tango: 729fcf */</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="p">{</span><span class="mf">0.54</span><span class="p">,</span><span class="w"> </span><span class="mf">0.89</span><span class="p">,</span><span class="w"> </span><span class="mf">0.20</span><span class="p">},</span><span class="w"> </span><span class="cm">/* tango: 8ae234 */</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="p">{</span><span class="mf">0.91</span><span class="p">,</span><span class="w"> </span><span class="mf">0.73</span><span class="p">,</span><span class="w"> </span><span class="mf">0.43</span><span class="p">},</span><span class="w"> </span><span class="cm">/* tango: e9b96e */</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="p">{</span><span class="mf">0.99</span><span class="p">,</span><span class="w"> </span><span class="mf">0.68</span><span class="p">,</span><span class="w"> </span><span class="mf">0.25</span><span class="p">}};</span><span class="w"> </span><span class="cm">/* tango: fcaf3e */</span> +<a id="line-105" name="line-105"></a> +<a id="line-106" name="line-106"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_realize</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">);</span> +<a id="line-107" name="line-107"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_dispose</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">);</span> +<a id="line-108" name="line-108"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_size_allocate</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="o">*</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-110" name="line-110"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">);</span> +<a id="line-114" name="line-114"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">);</span> +<a id="line-118" name="line-118"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_free_items</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">);</span> +<a id="line-119" name="line-119"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_draw</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">area</span><span class="p">);</span> +<a id="line-122" name="line-122"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_update_draw</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChart</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">);</span> +<a id="line-124" name="line-124"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_row_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-128" name="line-128"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_row_inserted</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-132" name="line-132"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_row_has_child_toggled</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-136" name="line-136"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_row_deleted</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-139" name="line-139"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_rows_reordered</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">,</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="n">new_order</span><span class="p">,</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-144" name="line-144"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">baobab_chart_expose</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">);</span> +<a id="line-146" name="line-146"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_interpolate_colors</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="o">*</span><span class="n">color</span><span class="p">,</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">colora</span><span class="p">,</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">colorb</span><span class="p">,</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">percentage</span><span class="p">);</span> +<a id="line-150" name="line-150"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="nf">baobab_chart_button_release</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">);</span> +<a id="line-152" name="line-152"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="nf">baobab_chart_scroll</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">GdkEventScroll</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">);</span> +<a id="line-154" name="line-154"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="nf">baobab_chart_motion_notify</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">GdkEventMotion</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">);</span> +<a id="line-156" name="line-156"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="nf">baobab_chart_leave_notify</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">GdkEventCrossing</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">);</span> +<a id="line-158" name="line-158"></a><span class="k">static</span><span class="w"> </span><span class="kr">inline</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_disconnect_signals</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">);</span> +<a id="line-160" name="line-160"></a><span class="k">static</span><span class="w"> </span><span class="kr">inline</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_connect_signals</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">);</span> +<a id="line-162" name="line-162"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_chart_get_items</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">root</span><span class="p">);</span> +<a id="line-163" name="line-163"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">baobab_chart_query_tooltip</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">x</span><span class="p">,</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">y</span><span class="p">,</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">keyboard_mode</span><span class="p">,</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">GtkTooltip</span><span class="w"> </span><span class="o">*</span><span class="n">tooltip</span><span class="p">,</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">);</span> +<a id="line-169" name="line-169"></a> +<a id="line-170" name="line-170"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-171" name="line-171"></a><span class="nf">baobab_chart_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">)</span> +<a id="line-172" name="line-172"></a><span class="p">{</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">obj_class</span><span class="p">;</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">GtkWidgetClass</span><span class="w"> </span><span class="o">*</span><span class="n">widget_class</span><span class="p">;</span> +<a id="line-175" name="line-175"></a> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">obj_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="p">);</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">widget_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="p">);</span> +<a id="line-178" name="line-178"></a> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="cm">/* GtkObject signals */</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">obj_class</span><span class="o">-></span><span class="n">set_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_set_property</span><span class="p">;</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">obj_class</span><span class="o">-></span><span class="n">get_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_get_property</span><span class="p">;</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">obj_class</span><span class="o">-></span><span class="n">dispose</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_dispose</span><span class="p">;</span> +<a id="line-183" name="line-183"></a> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="cm">/* GtkWidget signals */</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">widget_class</span><span class="o">-></span><span class="n">realize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_realize</span><span class="p">;</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">widget_class</span><span class="o">-></span><span class="n">draw</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_expose</span><span class="p">;</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">widget_class</span><span class="o">-></span><span class="n">size_allocate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_size_allocate</span><span class="p">;</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">widget_class</span><span class="o">-></span><span class="n">scroll_event</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_scroll</span><span class="p">;</span> +<a id="line-189" name="line-189"></a> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="cm">/* Baobab Chart abstract methods */</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">draw_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">pre_draw</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">post_draw</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">calculate_item_geometry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">is_point_over_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">get_item_rectangle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">can_zoom_in</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">can_zoom_out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-199" name="line-199"></a> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">obj_class</span><span class="p">,</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">PROP_MAX_DEPTH</span><span class="p">,</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">g_param_spec_int</span><span class="w"> </span><span class="p">(</span><span class="s">"max-depth"</span><span class="p">,</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Maximum depth"</span><span class="p">),</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The maximum depth drawn in the chart from the root"</span><span class="p">),</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">BAOBAB_CHART_MAX_DEPTH</span><span class="p">,</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">BAOBAB_CHART_MAX_DEPTH</span><span class="p">,</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="p">));</span> +<a id="line-209" name="line-209"></a> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">obj_class</span><span class="p">,</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">PROP_MODEL</span><span class="p">,</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">g_param_spec_object</span><span class="w"> </span><span class="p">(</span><span class="s">"model"</span><span class="p">,</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Chart model"</span><span class="p">),</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Set the model of the chart"</span><span class="p">),</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">GTK_TYPE_TREE_MODEL</span><span class="p">,</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="p">));</span> +<a id="line-217" name="line-217"></a> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">obj_class</span><span class="p">,</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">PROP_ROOT</span><span class="p">,</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">g_param_spec_boxed</span><span class="w"> </span><span class="p">(</span><span class="s">"root"</span><span class="p">,</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Chart root node"</span><span class="p">),</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Set the root node from the model"</span><span class="p">),</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">GTK_TYPE_TREE_ITER</span><span class="p">,</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="p">));</span> +<a id="line-225" name="line-225"></a> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">baobab_chart_signals</span><span class="p">[</span><span class="n">ITEM_ACTIVATED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"item_activated"</span><span class="p">,</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">G_TYPE_FROM_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">obj_class</span><span class="p">),</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_SIGNAL_ACTION</span><span class="p">,</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartClass</span><span class="p">,</span><span class="w"> </span><span class="n">item_activated</span><span class="p">),</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__BOXED</span><span class="p">,</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">GTK_TYPE_TREE_ITER</span><span class="p">);</span> +<a id="line-235" name="line-235"></a><span class="p">}</span> +<a id="line-236" name="line-236"></a> +<a id="line-237" name="line-237"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-238" name="line-238"></a><span class="nf">baobab_chart_init</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChart</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-239" name="line-239"></a><span class="p">{</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">chart</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="p">;</span> +<a id="line-244" name="line-244"></a> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART_MAX_DEPTH</span><span class="p">;</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">name_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">size_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">info_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">percentage_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">valid_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">button_pressed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_frozen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">memento</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">first_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">last_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-260" name="line-260"></a><span class="p">}</span> +<a id="line-261" name="line-261"></a> +<a id="line-262" name="line-262"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-263" name="line-263"></a><span class="nf">baobab_chart_dispose</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-264" name="line-264"></a><span class="p">{</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-266" name="line-266"></a> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">baobab_chart_free_items</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">));</span> +<a id="line-268" name="line-268"></a> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-270" name="line-270"></a> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">)</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="p">{</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">baobab_chart_disconnect_signals</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">),</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-275" name="line-275"></a> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-277" name="line-277"></a> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="p">}</span> +<a id="line-280" name="line-280"></a> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">)</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="p">{</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">gtk_tree_row_reference_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-284" name="line-284"></a> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="p">}</span> +<a id="line-287" name="line-287"></a> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">dispose</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-289" name="line-289"></a><span class="p">}</span> +<a id="line-290" name="line-290"></a> +<a id="line-291" name="line-291"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-292" name="line-292"></a><span class="nf">baobab_chart_realize</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">)</span> +<a id="line-293" name="line-293"></a><span class="p">{</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">BaobabChart</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">;</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="n">GdkWindowAttr</span><span class="w"> </span><span class="n">attributes</span><span class="p">;</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">attributes_mask</span><span class="p">;</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">chart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">gtk_widget_set_realized</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-306" name="line-306"></a> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">attributes</span><span class="p">.</span><span class="n">window_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDK_WINDOW_CHILD</span><span class="p">;</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">attributes</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">x</span><span class="p">;</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">attributes</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">y</span><span class="p">;</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">attributes</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="p">;</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">attributes</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="p">;</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">attributes</span><span class="p">.</span><span class="n">wclass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDK_INPUT_OUTPUT</span><span class="p">;</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">attributes</span><span class="p">.</span><span class="n">visual</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_visual</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">attributes</span><span class="p">.</span><span class="n">event_mask</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_events</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-315" name="line-315"></a> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">attributes_mask</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDK_WA_X</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_WA_Y</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_WA_VISUAL</span><span class="p">;</span> +<a id="line-317" name="line-317"></a> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_new</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent_window</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="o">&</span><span class="n">attributes</span><span class="p">,</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="n">attributes_mask</span><span class="p">);</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">gtk_widget_set_window</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">gdk_window_set_user_data</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-323" name="line-323"></a> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">gtk_widget_add_events</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">GDK_EXPOSURE_MASK</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_BUTTON_PRESS_MASK</span><span class="w"> </span><span class="o">|</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">GDK_BUTTON_RELEASE_MASK</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_POINTER_MOTION_MASK</span><span class="w"> </span><span class="o">|</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">GDK_POINTER_MOTION_HINT_MASK</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_LEAVE_NOTIFY_MASK</span><span class="w"> </span><span class="o">|</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">GDK_SCROLL_MASK</span><span class="p">);</span> +<a id="line-329" name="line-329"></a><span class="p">}</span> +<a id="line-330" name="line-330"></a> +<a id="line-331" name="line-331"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-332" name="line-332"></a><span class="nf">baobab_chart_size_allocate</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="o">*</span><span class="n">allocation</span><span class="p">)</span> +<a id="line-334" name="line-334"></a><span class="p">{</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="n">BaobabChartClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">;</span> +<a id="line-337" name="line-337"></a><span class="hll"><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'item' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'item' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-338" name="line-338"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">node</span><span class="p">;</span> +<a id="line-339" name="line-339"></a> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">allocation</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-342" name="line-342"></a> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-345" name="line-345"></a> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">gtk_widget_set_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">allocation</span><span class="p">);</span> +<a id="line-347" name="line-347"></a> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_realized</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">))</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="p">{</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">gdk_window_move_resize</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">allocation</span><span class="o">-></span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">allocation</span><span class="o">-></span><span class="n">y</span><span class="p">,</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">allocation</span><span class="o">-></span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">allocation</span><span class="o">-></span><span class="n">height</span><span class="p">);</span> +<a id="line-353" name="line-353"></a> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">first_item</span><span class="p">;</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="p">{</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">has_visible_children</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">calculate_item_geometry</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="p">);</span> +<a id="line-361" name="line-361"></a> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">next</span><span class="p">;</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="p">}</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="p">}</span> +<a id="line-365" name="line-365"></a><span class="p">}</span> +<a id="line-366" name="line-366"></a> +<a id="line-367" name="line-367"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-368" name="line-368"></a><span class="nf">baobab_chart_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-372" name="line-372"></a><span class="p">{</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">BaobabChart</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">;</span> +<a id="line-374" name="line-374"></a> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">chart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="p">{</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_MAX_DEPTH</span><span class="p">:</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="n">baobab_chart_set_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="n">g_value_get_uint</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_MODEL</span><span class="p">:</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">baobab_chart_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="n">g_value_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_ROOT</span><span class="p">:</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">baobab_chart_set_root</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="n">g_value_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="p">}</span> +<a id="line-392" name="line-392"></a><span class="p">}</span> +<a id="line-393" name="line-393"></a> +<a id="line-394" name="line-394"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-395" name="line-395"></a><span class="nf">baobab_chart_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-399" name="line-399"></a><span class="p">{</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-401" name="line-401"></a> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-403" name="line-403"></a> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="p">{</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_MAX_DEPTH</span><span class="p">:</span> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">g_value_set_uint</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="p">);</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_MODEL</span><span class="p">:</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="n">g_value_set_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_ROOT</span><span class="p">:</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">g_value_set_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="p">}</span> +<a id="line-419" name="line-419"></a><span class="p">}</span> +<a id="line-420" name="line-420"></a> +<a id="line-421" name="line-421"></a><span class="k">static</span><span class="w"> </span><span class="n">GList</span> +<a id="line-422" name="line-422"></a><span class="o">*</span><span class="nf">baobab_chart_add_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">depth</span><span class="p">,</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">rel_start</span><span class="p">,</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">rel_size</span><span class="p">,</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">)</span> +<a id="line-427" name="line-427"></a><span class="p">{</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-430" name="line-430"></a> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">size</span><span class="p">;</span> +<a id="line-433" name="line-433"></a> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-435" name="line-435"></a> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">name_column</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">size_column</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-440" name="line-440"></a> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">name</span><span class="p">;</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">size</span><span class="p">;</span> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">depth</span><span class="p">;</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rel_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rel_start</span><span class="p">;</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rel_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rel_size</span><span class="p">;</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">has_any_child</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">has_visible_children</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-450" name="line-450"></a> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-452" name="line-452"></a> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-455" name="line-455"></a> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">last_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_prepend</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">last_item</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="p">);</span> +<a id="line-457" name="line-457"></a> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">last_item</span><span class="p">;</span> +<a id="line-459" name="line-459"></a><span class="p">}</span> +<a id="line-460" name="line-460"></a> +<a id="line-461" name="line-461"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-462" name="line-462"></a><span class="nf">baobab_chart_free_items</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-463" name="line-463"></a><span class="p">{</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-465" name="line-465"></a><span class="hll"><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'item' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'item' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-466" name="line-466"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">node</span><span class="p">;</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">next</span><span class="p">;</span> +<a id="line-468" name="line-468"></a> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-470" name="line-470"></a> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">first_item</span><span class="p">;</span> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="p">{</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="n">next</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">next</span><span class="p">;</span> +<a id="line-475" name="line-475"></a> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-477" name="line-477"></a> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">size</span><span class="p">);</span> +<a id="line-480" name="line-480"></a> +<a id="line-481" name="line-481"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-483" name="line-483"></a> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">);</span> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="n">g_list_free_1</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="p">);</span> +<a id="line-486" name="line-486"></a> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">next</span><span class="p">;</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="p">}</span> +<a id="line-489" name="line-489"></a> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">first_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">last_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-493" name="line-493"></a><span class="p">}</span> +<a id="line-494" name="line-494"></a> +<a id="line-495" name="line-495"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-496" name="line-496"></a><span class="nf">baobab_chart_get_items</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">root</span><span class="p">)</span> +<a id="line-497" name="line-497"></a><span class="p">{</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-499" name="line-499"></a><span class="hll"><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'item' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'item' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-500" name="line-500"></a> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">node</span><span class="p">;</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">initial_iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mi">0</span><span class="p">};</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">size</span><span class="p">;</span> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">model_root_path</span><span class="p">;</span> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">model_root_iter</span><span class="p">;</span> +<a id="line-506" name="line-506"></a> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">BaobabChartClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">;</span> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">child_iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mi">0</span><span class="p">};</span> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">child_node</span><span class="p">;</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">child</span><span class="p">;</span> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">rel_start</span><span class="p">;</span> +<a id="line-512" name="line-512"></a> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-514" name="line-514"></a> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="cm">/* First we free current item list */</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="n">baobab_chart_free_items</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-517" name="line-517"></a> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="cm">/* Get the tree iteration corresponding to root */</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">initial_iter</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">))</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="p">{</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model_changed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="p">}</span> +<a id="line-524" name="line-524"></a> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="n">model_root_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_path_new_first</span><span class="w"> </span><span class="p">();</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">model_root_iter</span><span class="p">,</span><span class="w"> </span><span class="n">model_root_path</span><span class="p">);</span> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">model_root_path</span><span class="p">);</span> +<a id="line-528" name="line-528"></a> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">model_root_iter</span><span class="p">,</span> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">percentage_column</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-531" name="line-531"></a> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="cm">/* Create first item */</span> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_add_item</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="n">initial_iter</span><span class="p">);</span> +<a id="line-534" name="line-534"></a> +<a id="line-535" name="line-535"></a><span class="w"> </span><span class="cm">/* Iterate through childs building the list */</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="n">class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-537" name="line-537"></a> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="k">do</span> +<a id="line-539" name="line-539"></a><span class="w"> </span><span class="p">{</span> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-541" name="line-541"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">has_any_child</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_iter_children</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="o">&</span><span class="n">child_iter</span><span class="p">,</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="o">&</span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">iter</span><span class="p">));</span> +<a id="line-544" name="line-544"></a> +<a id="line-545" name="line-545"></a><span class="w"> </span><span class="cm">/* Calculate item geometry */</span> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">calculate_item_geometry</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="p">);</span> +<a id="line-547" name="line-547"></a> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">visible</span><span class="p">)</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="p">{</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">prev</span><span class="p">;</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="p">}</span> +<a id="line-553" name="line-553"></a> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="cm">/* Get item's children and add them to the list */</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">item</span><span class="o">-></span><span class="n">has_any_child</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">))</span> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="p">{</span> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="n">rel_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-558" name="line-558"></a> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="k">do</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="p">{</span> +<a id="line-561" name="line-561"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">child_iter</span><span class="p">,</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">percentage_column</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-563" name="line-563"></a> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="n">child_node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_add_item</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-566" name="line-566"></a><span class="w"> </span><span class="n">rel_start</span><span class="p">,</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="n">size</span><span class="p">,</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="n">child_iter</span><span class="p">);</span> +<a id="line-569" name="line-569"></a><span class="w"> </span><span class="n">child</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">child_node</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">child</span><span class="o">-></span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="p">;</span> +<a id="line-571" name="line-571"></a><span class="w"> </span><span class="n">rel_start</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">size</span><span class="p">;</span> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="p">}</span> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_model_iter_next</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">child_iter</span><span class="p">));</span> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="p">}</span> +<a id="line-575" name="line-575"></a> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">prev</span><span class="p">;</span> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="p">}</span> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-579" name="line-579"></a> +<a id="line-580" name="line-580"></a><span class="w"> </span><span class="cm">/* Reverse the list, 'cause we created it from the tail, for efficiency reasons */</span> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">first_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_reverse</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">last_item</span><span class="p">);</span> +<a id="line-582" name="line-582"></a> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model_changed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-584" name="line-584"></a><span class="p">}</span> +<a id="line-585" name="line-585"></a> +<a id="line-586" name="line-586"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-587" name="line-587"></a><span class="nf">baobab_chart_draw</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-589" name="line-589"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">area</span><span class="p">)</span> +<a id="line-590" name="line-590"></a><span class="p">{</span> +<a id="line-591" name="line-591"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="n">BaobabChartClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">;</span> +<a id="line-593" name="line-593"></a> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">node</span><span class="p">;</span> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-596" name="line-596"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">highlighted</span><span class="p">;</span> +<a id="line-597" name="line-597"></a> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="n">class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-600" name="line-600"></a> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="cm">/* call pre-draw abstract method */</span> +<a id="line-602" name="line-602"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="o">-></span><span class="n">pre_draw</span><span class="p">)</span> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">pre_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cr</span><span class="p">);</span> +<a id="line-604" name="line-604"></a> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="n">cairo_save</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-606" name="line-606"></a> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">first_item</span><span class="p">;</span> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="p">{</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-611" name="line-611"></a> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">item</span><span class="o">-></span><span class="n">visible</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_rectangle_intersect</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">area</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="p">))</span> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="p">{</span> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="n">highlighted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="p">);</span> +<a id="line-616" name="line-616"></a> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">draw_item</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="n">highlighted</span><span class="p">);</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="p">}</span> +<a id="line-619" name="line-619"></a> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">next</span><span class="p">;</span> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="p">}</span> +<a id="line-622" name="line-622"></a> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="n">cairo_restore</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-624" name="line-624"></a> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="cm">/* call post-draw abstract method */</span> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="o">-></span><span class="n">post_draw</span><span class="p">)</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">post_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cr</span><span class="p">);</span> +<a id="line-628" name="line-628"></a><span class="p">}</span> +<a id="line-629" name="line-629"></a> +<a id="line-630" name="line-630"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-631" name="line-631"></a><span class="nf">baobab_chart_update_draw</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChart</span><span class="o">*</span><span class="w"> </span><span class="n">chart</span><span class="p">,</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">)</span> +<a id="line-633" name="line-633"></a><span class="p">{</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">root_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">root_depth</span><span class="p">,</span><span class="w"> </span><span class="n">node_depth</span><span class="p">;</span> +<a id="line-637" name="line-637"></a> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_widget_get_realized</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)))</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-640" name="line-640"></a> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-642" name="line-642"></a> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="p">{</span> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="n">root_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_row_reference_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-646" name="line-646"></a> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">root_path</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-648" name="line-648"></a><span class="w"> </span><span class="p">{</span> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="n">gtk_tree_row_reference_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="p">}</span> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="p">}</span> +<a id="line-653" name="line-653"></a> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="n">root_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_path_new_first</span><span class="w"> </span><span class="p">();</span> +<a id="line-656" name="line-656"></a> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="n">root_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_path_get_depth</span><span class="w"> </span><span class="p">(</span><span class="n">root_path</span><span class="p">);</span> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="n">node_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_path_get_depth</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-659" name="line-659"></a> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(((</span><span class="n">node_depth</span><span class="o">-</span><span class="n">root_depth</span><span class="p">)</span><span class="o"><=</span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="p">)</span><span class="o">&&</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="p">((</span><span class="n">gtk_tree_path_is_ancestor</span><span class="w"> </span><span class="p">(</span><span class="n">root_path</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">))</span><span class="o">||</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_path_compare</span><span class="w"> </span><span class="p">(</span><span class="n">root_path</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)))</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="p">{</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="n">gtk_widget_queue_draw</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="p">}</span> +<a id="line-666" name="line-666"></a> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">root_path</span><span class="p">);</span> +<a id="line-668" name="line-668"></a><span class="p">}</span> +<a id="line-669" name="line-669"></a> +<a id="line-670" name="line-670"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-671" name="line-671"></a><span class="nf">baobab_chart_row_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-673" name="line-673"></a><span class="hll"><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span><span class="error2"><--- Parameter 'iter' can be declared as pointer to const</span> +</span><a id="line-674" name="line-674"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-675" name="line-675"></a><span class="p">{</span> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">));</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-678" name="line-678"></a> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model_changed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-680" name="line-680"></a> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="n">baobab_chart_update_draw</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-682" name="line-682"></a><span class="p">}</span> +<a id="line-683" name="line-683"></a> +<a id="line-684" name="line-684"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-685" name="line-685"></a><span class="nf">baobab_chart_row_inserted</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-687" name="line-687"></a><span class="hll"><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span><span class="error2"><--- Parameter 'iter' can be declared as pointer to const</span> +</span><a id="line-688" name="line-688"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-689" name="line-689"></a><span class="p">{</span> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">));</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-692" name="line-692"></a> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model_changed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-694" name="line-694"></a> +<a id="line-695" name="line-695"></a><span class="w"> </span><span class="n">baobab_chart_update_draw</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-696" name="line-696"></a><span class="p">}</span> +<a id="line-697" name="line-697"></a> +<a id="line-698" name="line-698"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-699" name="line-699"></a><span class="nf">baobab_chart_row_has_child_toggled</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-701" name="line-701"></a><span class="hll"><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span><span class="error2"><--- Parameter 'iter' can be declared as pointer to const</span> +</span><a id="line-702" name="line-702"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-703" name="line-703"></a><span class="p">{</span> +<a id="line-704" name="line-704"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">));</span> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-706" name="line-706"></a> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model_changed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-708" name="line-708"></a> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="n">baobab_chart_update_draw</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-710" name="line-710"></a><span class="p">}</span> +<a id="line-711" name="line-711"></a> +<a id="line-712" name="line-712"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-713" name="line-713"></a><span class="nf">baobab_chart_row_deleted</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-714" name="line-714"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-716" name="line-716"></a><span class="p">{</span> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">));</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-719" name="line-719"></a> +<a id="line-720" name="line-720"></a><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model_changed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-721" name="line-721"></a> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="n">baobab_chart_update_draw</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-723" name="line-723"></a> +<a id="line-724" name="line-724"></a><span class="p">}</span> +<a id="line-725" name="line-725"></a> +<a id="line-726" name="line-726"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-727" name="line-727"></a><span class="nf">baobab_chart_rows_reordered</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-729" name="line-729"></a><span class="hll"><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span><span class="error2"><--- Parameter 'iter' can be declared as pointer to const</span> +</span><a id="line-730" name="line-730"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="n">new_order</span><span class="p">,</span> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-732" name="line-732"></a><span class="p">{</span> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">));</span> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-735" name="line-735"></a> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model_changed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-737" name="line-737"></a> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="n">baobab_chart_update_draw</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-739" name="line-739"></a> +<a id="line-740" name="line-740"></a><span class="p">}</span> +<a id="line-741" name="line-741"></a> +<a id="line-742" name="line-742"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-743" name="line-743"></a><span class="nf">baobab_chart_expose</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">)</span> +<a id="line-744" name="line-744"></a><span class="p">{</span> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">h</span><span class="p">;</span> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="n">sx</span><span class="p">,</span><span class="w"> </span><span class="n">sy</span><span class="p">,</span><span class="w"> </span><span class="n">aux</span><span class="p">;</span> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">root_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">current_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-751" name="line-751"></a> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">area</span><span class="p">;</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">x1</span><span class="p">,</span><span class="w"> </span><span class="n">y1</span><span class="p">,</span><span class="w"> </span><span class="n">x2</span><span class="p">,</span><span class="w"> </span><span class="n">y2</span><span class="p">;</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="n">cairo_clip_extents</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">x1</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">y1</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">x2</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">y2</span><span class="p">);</span> +<a id="line-755" name="line-755"></a> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="n">aux</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">floor</span><span class="w"> </span><span class="p">(</span><span class="n">x1</span><span class="p">);</span> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="n">aux</span><span class="p">;</span> +<a id="line-758" name="line-758"></a> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="n">aux</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">floor</span><span class="w"> </span><span class="p">(</span><span class="n">y1</span><span class="p">);</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="n">aux</span><span class="p">;</span> +<a id="line-761" name="line-761"></a> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="n">aux</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ceil</span><span class="w"> </span><span class="p">(</span><span class="n">x2</span><span class="p">);</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="n">aux</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">x</span><span class="p">;</span> +<a id="line-764" name="line-764"></a> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="n">aux</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ceil</span><span class="w"> </span><span class="p">(</span><span class="n">y2</span><span class="p">);</span> +<a id="line-766" name="line-766"></a><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="n">aux</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">y</span><span class="p">;</span> +<a id="line-767" name="line-767"></a> +<a id="line-768" name="line-768"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-769" name="line-769"></a> +<a id="line-770" name="line-770"></a><span class="w"> </span><span class="cm">/* the columns are not set we paint nothing */</span> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">name_column</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">percentage_column</span><span class="p">)</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-773" name="line-773"></a> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="cm">/* get a cairo_t */</span> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="n">cr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cairo_create</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-776" name="line-776"></a> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="n">cairo_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">y</span><span class="p">,</span> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">height</span><span class="p">);</span> +<a id="line-780" name="line-780"></a> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="cm">/* there is no model we can not paint */</span> +<a id="line-782" name="line-782"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">priv</span><span class="o">-></span><span class="n">is_frozen</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-783" name="line-783"></a><span class="w"> </span><span class="p">{</span> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">memento</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="p">{</span> +<a id="line-786" name="line-786"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cairo_image_surface_get_width</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">memento</span><span class="p">);</span> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="n">h</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cairo_image_surface_get_height</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">memento</span><span class="p">);</span> +<a id="line-788" name="line-788"></a> +<a id="line-789" name="line-789"></a><span class="w"> </span><span class="n">cairo_clip</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-790" name="line-790"></a> +<a id="line-791" name="line-791"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-792" name="line-792"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">h</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">&&</span> +<a id="line-793" name="line-793"></a><span class="w"> </span><span class="o">!</span><span class="p">(</span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">h</span><span class="p">))</span> +<a id="line-794" name="line-794"></a><span class="w"> </span><span class="p">{</span> +<a id="line-795" name="line-795"></a><span class="w"> </span><span class="cm">/* minimal available proportion */</span> +<a id="line-796" name="line-796"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="mf">1.0</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">w</span><span class="p">),</span> +<a id="line-797" name="line-797"></a><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="mf">1.0</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">h</span><span class="p">));</span> +<a id="line-798" name="line-798"></a> +<a id="line-799" name="line-799"></a><span class="w"> </span><span class="n">sx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">p</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mf">2.0</span><span class="p">;</span> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="n">sy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">h</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">p</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mf">2.0</span><span class="p">;</span> +<a id="line-801" name="line-801"></a> +<a id="line-802" name="line-802"></a><span class="w"> </span><span class="n">cairo_translate</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">sx</span><span class="p">,</span><span class="w"> </span><span class="n">sy</span><span class="p">);</span> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="n">cairo_scale</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">);</span> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="p">}</span> +<a id="line-805" name="line-805"></a> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="n">cairo_set_source_surface</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">memento</span><span class="p">,</span> +<a id="line-808" name="line-808"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-809" name="line-809"></a><span class="w"> </span><span class="n">cairo_paint</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="p">}</span> +<a id="line-811" name="line-811"></a><span class="w"> </span><span class="p">}</span> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="k">else</span> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="p">{</span> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="n">cairo_fill_preserve</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-816" name="line-816"></a> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">cairo_clip</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-818" name="line-818"></a> +<a id="line-819" name="line-819"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-820" name="line-820"></a><span class="w"> </span><span class="n">root_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_row_reference_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-821" name="line-821"></a> +<a id="line-822" name="line-822"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">root_path</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-823" name="line-823"></a><span class="w"> </span><span class="n">root_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_path_new_first</span><span class="w"> </span><span class="p">();</span> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-825" name="line-825"></a><span class="w"> </span><span class="p">}</span> +<a id="line-826" name="line-826"></a> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="cm">/* Check if tree model was modified in any way */</span> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">priv</span><span class="o">-></span><span class="n">model_changed</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-829" name="line-829"></a><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">first_item</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="n">baobab_chart_get_items</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">root_path</span><span class="p">);</span> +<a id="line-831" name="line-831"></a><span class="w"> </span><span class="k">else</span> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="p">{</span> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="cm">/* Check if root was changed */</span> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="n">current_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="o">&</span><span class="p">((</span><span class="n">BaobabChartItem</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">first_item</span><span class="o">-></span><span class="n">data</span><span class="p">)</span><span class="o">-></span><span class="n">iter</span><span class="p">);</span> +<a id="line-836" name="line-836"></a> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_path_compare</span><span class="w"> </span><span class="p">(</span><span class="n">root_path</span><span class="p">,</span><span class="w"> </span><span class="n">current_path</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="n">baobab_chart_get_items</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">root_path</span><span class="p">);</span> +<a id="line-839" name="line-839"></a> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">current_path</span><span class="p">);</span> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="p">}</span> +<a id="line-842" name="line-842"></a> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">root_path</span><span class="p">);</span> +<a id="line-844" name="line-844"></a> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="n">baobab_chart_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">area</span><span class="p">);</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="p">}</span> +<a id="line-847" name="line-847"></a> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-849" name="line-849"></a><span class="p">}</span> +<a id="line-850" name="line-850"></a> +<a id="line-851" name="line-851"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-852" name="line-852"></a><span class="nf">baobab_chart_interpolate_colors</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="o">*</span><span class="n">color</span><span class="p">,</span> +<a id="line-853" name="line-853"></a><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">colora</span><span class="p">,</span> +<a id="line-854" name="line-854"></a><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">colorb</span><span class="p">,</span> +<a id="line-855" name="line-855"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">percentage</span><span class="p">)</span> +<a id="line-856" name="line-856"></a><span class="p">{</span> +<a id="line-857" name="line-857"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">diff</span><span class="p">;</span> +<a id="line-858" name="line-858"></a> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="n">diff</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">colora</span><span class="p">.</span><span class="n">red</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">colorb</span><span class="p">.</span><span class="n">red</span><span class="p">;</span> +<a id="line-860" name="line-860"></a><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">red</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">colora</span><span class="p">.</span><span class="n">red</span><span class="o">-</span><span class="n">diff</span><span class="o">*</span><span class="n">percentage</span><span class="p">;</span> +<a id="line-861" name="line-861"></a> +<a id="line-862" name="line-862"></a><span class="w"> </span><span class="n">diff</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">colora</span><span class="p">.</span><span class="n">green</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">colorb</span><span class="p">.</span><span class="n">green</span><span class="p">;</span> +<a id="line-863" name="line-863"></a><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">green</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">colora</span><span class="p">.</span><span class="n">green</span><span class="o">-</span><span class="n">diff</span><span class="o">*</span><span class="n">percentage</span><span class="p">;</span> +<a id="line-864" name="line-864"></a> +<a id="line-865" name="line-865"></a><span class="w"> </span><span class="n">diff</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">colora</span><span class="p">.</span><span class="n">blue</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">colorb</span><span class="p">.</span><span class="n">blue</span><span class="p">;</span> +<a id="line-866" name="line-866"></a><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">blue</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">colora</span><span class="p">.</span><span class="n">blue</span><span class="o">-</span><span class="n">diff</span><span class="o">*</span><span class="n">percentage</span><span class="p">;</span> +<a id="line-867" name="line-867"></a><span class="p">}</span> +<a id="line-868" name="line-868"></a> +<a id="line-869" name="line-869"></a><span class="kt">void</span> +<a id="line-870" name="line-870"></a><span class="nf">baobab_chart_get_item_color</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="o">*</span><span class="n">color</span><span class="p">,</span> +<a id="line-871" name="line-871"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">rel_position</span><span class="p">,</span> +<a id="line-872" name="line-872"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">depth</span><span class="p">,</span> +<a id="line-873" name="line-873"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">highlighted</span><span class="p">)</span> +<a id="line-874" name="line-874"></a><span class="p">{</span> +<a id="line-875" name="line-875"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">intensity</span><span class="p">;</span> +<a id="line-876" name="line-876"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">color_number</span><span class="p">;</span> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">next_color_number</span><span class="p">;</span> +<a id="line-878" name="line-878"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">maximum</span><span class="p">;</span> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">level_color</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mf">0.83</span><span class="p">,</span><span class="w"> </span><span class="mf">0.84</span><span class="p">,</span><span class="w"> </span><span class="mf">0.82</span><span class="p">};</span> +<a id="line-880" name="line-880"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">level_color_hl</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mf">0.88</span><span class="p">,</span><span class="w"> </span><span class="mf">0.89</span><span class="p">,</span><span class="w"> </span><span class="mf">0.87</span><span class="p">};</span> +<a id="line-881" name="line-881"></a> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="n">intensity</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="p">(((</span><span class="n">depth</span><span class="mi">-1</span><span class="p">)</span><span class="o">*</span><span class="mf">0.3</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">BAOBAB_CHART_MAX_DEPTH</span><span class="p">);</span> +<a id="line-883" name="line-883"></a> +<a id="line-884" name="line-884"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">depth</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="o">*</span><span class="n">color</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">level_color</span><span class="p">;</span> +<a id="line-886" name="line-886"></a><span class="w"> </span><span class="k">else</span> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="p">{</span> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="n">color_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">rel_position</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="mf">100.0</span><span class="o">/</span><span class="mf">3.0</span><span class="p">));</span> +<a id="line-889" name="line-889"></a><span class="w"> </span><span class="n">next_color_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">color_number</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">6</span><span class="p">;</span> +<a id="line-890" name="line-890"></a> +<a id="line-891" name="line-891"></a><span class="w"> </span><span class="n">baobab_chart_interpolate_colors</span><span class="w"> </span><span class="p">(</span><span class="n">color</span><span class="p">,</span> +<a id="line-892" name="line-892"></a><span class="w"> </span><span class="n">baobab_chart_tango_colors</span><span class="p">[</span><span class="n">color_number</span><span class="p">],</span> +<a id="line-893" name="line-893"></a><span class="w"> </span><span class="n">baobab_chart_tango_colors</span><span class="p">[</span><span class="n">next_color_number</span><span class="p">],</span> +<a id="line-894" name="line-894"></a><span class="w"> </span><span class="p">(</span><span class="n">rel_position</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">color_number</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">100</span><span class="o">/</span><span class="mi">3</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="mi">100</span><span class="o">/</span><span class="mi">3</span><span class="p">));</span> +<a id="line-895" name="line-895"></a><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">red</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">red</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">intensity</span><span class="p">;</span> +<a id="line-896" name="line-896"></a><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">green</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">green</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">intensity</span><span class="p">;</span> +<a id="line-897" name="line-897"></a><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">blue</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">blue</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">intensity</span><span class="p">;</span> +<a id="line-898" name="line-898"></a><span class="w"> </span><span class="p">}</span> +<a id="line-899" name="line-899"></a> +<a id="line-900" name="line-900"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">highlighted</span><span class="p">)</span> +<a id="line-901" name="line-901"></a><span class="w"> </span><span class="p">{</span> +<a id="line-902" name="line-902"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">depth</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-903" name="line-903"></a><span class="w"> </span><span class="o">*</span><span class="n">color</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">level_color_hl</span><span class="p">;</span> +<a id="line-904" name="line-904"></a><span class="w"> </span><span class="k">else</span> +<a id="line-905" name="line-905"></a><span class="w"> </span><span class="p">{</span> +<a id="line-906" name="line-906"></a><span class="w"> </span><span class="n">maximum</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">color</span><span class="o">-></span><span class="n">red</span><span class="p">,</span> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">color</span><span class="o">-></span><span class="n">green</span><span class="p">,</span> +<a id="line-908" name="line-908"></a><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">blue</span><span class="p">));</span> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">red</span><span class="w"> </span><span class="o">/=</span><span class="w"> </span><span class="n">maximum</span><span class="p">;</span> +<a id="line-910" name="line-910"></a><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">green</span><span class="w"> </span><span class="o">/=</span><span class="w"> </span><span class="n">maximum</span><span class="p">;</span> +<a id="line-911" name="line-911"></a><span class="w"> </span><span class="n">color</span><span class="o">-></span><span class="n">blue</span><span class="w"> </span><span class="o">/=</span><span class="w"> </span><span class="n">maximum</span><span class="p">;</span> +<a id="line-912" name="line-912"></a><span class="w"> </span><span class="p">}</span> +<a id="line-913" name="line-913"></a><span class="w"> </span><span class="p">}</span> +<a id="line-914" name="line-914"></a><span class="p">}</span> +<a id="line-915" name="line-915"></a> +<a id="line-916" name="line-916"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-917" name="line-917"></a><span class="nf">baobab_chart_button_release</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-918" name="line-918"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">)</span> +<a id="line-919" name="line-919"></a><span class="p">{</span> +<a id="line-920" name="line-920"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-921" name="line-921"></a> +<a id="line-922" name="line-922"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-923" name="line-923"></a> +<a id="line-924" name="line-924"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">is_frozen</span><span class="p">)</span> +<a id="line-925" name="line-925"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-926" name="line-926"></a> +<a id="line-927" name="line-927"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="p">)</span> +<a id="line-928" name="line-928"></a><span class="w"> </span><span class="p">{</span> +<a id="line-929" name="line-929"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">LEFT_BUTTON</span><span class="p">:</span> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="cm">/* Enter into a subdir */</span> +<a id="line-931" name="line-931"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-932" name="line-932"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> +<a id="line-933" name="line-933"></a><span class="w"> </span><span class="n">baobab_chart_signals</span><span class="p">[</span><span class="n">ITEM_ACTIVATED</span><span class="p">],</span> +<a id="line-934" name="line-934"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="p">((</span><span class="n">BaobabChartItem</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="o">-></span><span class="n">data</span><span class="p">)</span><span class="o">-></span><span class="n">iter</span><span class="p">);</span> +<a id="line-935" name="line-935"></a> +<a id="line-936" name="line-936"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-937" name="line-937"></a> +<a id="line-938" name="line-938"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">MIDDLE_BUTTON</span><span class="p">:</span> +<a id="line-939" name="line-939"></a><span class="w"> </span><span class="cm">/* Go back to the parent dir */</span> +<a id="line-940" name="line-940"></a><span class="w"> </span><span class="n">baobab_chart_move_up_root</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-941" name="line-941"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-942" name="line-942"></a><span class="w"> </span><span class="p">}</span> +<a id="line-943" name="line-943"></a> +<a id="line-944" name="line-944"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-945" name="line-945"></a><span class="p">}</span> +<a id="line-946" name="line-946"></a> +<a id="line-947" name="line-947"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-948" name="line-948"></a><span class="nf">baobab_chart_scroll</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-949" name="line-949"></a><span class="w"> </span><span class="n">GdkEventScroll</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">)</span> +<a id="line-950" name="line-950"></a><span class="p">{</span> +<a id="line-951" name="line-951"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">direction</span><span class="p">)</span> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="p">{</span> +<a id="line-953" name="line-953"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDK_SCROLL_LEFT</span><span class="w"> </span><span class="p">:</span> +<a id="line-954" name="line-954"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDK_SCROLL_UP</span><span class="w"> </span><span class="p">:</span> +<a id="line-955" name="line-955"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_can_zoom_out</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">))</span> +<a id="line-956" name="line-956"></a><span class="w"> </span><span class="n">baobab_chart_zoom_out</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-957" name="line-957"></a><span class="w"> </span><span class="cm">/* change the selected item when zooming */</span> +<a id="line-958" name="line-958"></a><span class="w"> </span><span class="n">baobab_chart_motion_notify</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GdkEventMotion</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">event</span><span class="p">);</span> +<a id="line-959" name="line-959"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-960" name="line-960"></a> +<a id="line-961" name="line-961"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDK_SCROLL_RIGHT</span><span class="w"> </span><span class="p">:</span> +<a id="line-962" name="line-962"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDK_SCROLL_DOWN</span><span class="w"> </span><span class="p">:</span> +<a id="line-963" name="line-963"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_can_zoom_in</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">))</span> +<a id="line-964" name="line-964"></a><span class="w"> </span><span class="n">baobab_chart_zoom_in</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-965" name="line-965"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-966" name="line-966"></a> +<a id="line-967" name="line-967"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDK_SCROLL_SMOOTH</span><span class="w"> </span><span class="p">:</span> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="cm">/* since we don't add GDK_SMOOTH_SCROLL_MASK to received</span> +<a id="line-969" name="line-969"></a><span class="cm"> events, this is actually never reached and it's here</span> +<a id="line-970" name="line-970"></a><span class="cm"> just to silence compiler warnings */</span> +<a id="line-971" name="line-971"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-972" name="line-972"></a><span class="w"> </span><span class="p">}</span> +<a id="line-973" name="line-973"></a> +<a id="line-974" name="line-974"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-975" name="line-975"></a><span class="p">}</span> +<a id="line-976" name="line-976"></a> +<a id="line-977" name="line-977"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-978" name="line-978"></a><span class="nf">baobab_chart_set_item_highlight</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-979" name="line-979"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">node</span><span class="p">,</span> +<a id="line-980" name="line-980"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">highlighted</span><span class="p">)</span> +<a id="line-981" name="line-981"></a><span class="p">{</span> +<a id="line-982" name="line-982"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-983" name="line-983"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-984" name="line-984"></a> +<a id="line-985" name="line-985"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-986" name="line-986"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-987" name="line-987"></a> +<a id="line-988" name="line-988"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-989" name="line-989"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-990" name="line-990"></a> +<a id="line-991" name="line-991"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">highlighted</span><span class="p">)</span> +<a id="line-992" name="line-992"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="p">;</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="k">else</span> +<a id="line-994" name="line-994"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-995" name="line-995"></a> +<a id="line-996" name="line-996"></a><span class="w"> </span><span class="n">gdk_window_invalidate_rect</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)),</span> +<a id="line-997" name="line-997"></a><span class="w"> </span><span class="o">&</span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-998" name="line-998"></a><span class="p">}</span> +<a id="line-999" name="line-999"></a> +<a id="line-1000" name="line-1000"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-1001" name="line-1001"></a><span class="nf">baobab_chart_motion_notify</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1002" name="line-1002"></a><span class="w"> </span><span class="n">GdkEventMotion</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">)</span> +<a id="line-1003" name="line-1003"></a><span class="p">{</span> +<a id="line-1004" name="line-1004"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1005" name="line-1005"></a><span class="w"> </span><span class="n">BaobabChartClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">;</span> +<a id="line-1006" name="line-1006"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">node</span><span class="p">;</span> +<a id="line-1007" name="line-1007"></a><span class="hll"><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'item' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'item' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1008" name="line-1008"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1009" name="line-1009"></a> +<a id="line-1010" name="line-1010"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1011" name="line-1011"></a><span class="w"> </span><span class="n">class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-1012" name="line-1012"></a> +<a id="line-1013" name="line-1013"></a><span class="w"> </span><span class="cm">/* Check if the pointer is over an item */</span> +<a id="line-1014" name="line-1014"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">last_item</span><span class="p">;</span> +<a id="line-1015" name="line-1015"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1016" name="line-1016"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1017" name="line-1017"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1018" name="line-1018"></a> +<a id="line-1019" name="line-1019"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">item</span><span class="o">-></span><span class="n">visible</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="o">-></span><span class="n">is_point_over_item</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y</span><span class="p">)))</span> +<a id="line-1020" name="line-1020"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1021" name="line-1021"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">node</span><span class="p">)</span> +<a id="line-1022" name="line-1022"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1023" name="line-1023"></a><span class="w"> </span><span class="n">baobab_chart_set_item_highlight</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1024" name="line-1024"></a> +<a id="line-1025" name="line-1025"></a><span class="w"> </span><span class="n">gtk_widget_set_has_tooltip</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1026" name="line-1026"></a><span class="w"> </span><span class="n">baobab_chart_set_item_highlight</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">node</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1027" name="line-1027"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1028" name="line-1028"></a> +<a id="line-1029" name="line-1029"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1030" name="line-1030"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1031" name="line-1031"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1032" name="line-1032"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">prev</span><span class="p">;</span> +<a id="line-1033" name="line-1033"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1034" name="line-1034"></a> +<a id="line-1035" name="line-1035"></a><span class="w"> </span><span class="cm">/* If we never found a highlighted item, but there is an old highlighted item,</span> +<a id="line-1036" name="line-1036"></a><span class="cm"> redraw it to turn it off */</span> +<a id="line-1037" name="line-1037"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="w"> </span><span class="n">found</span><span class="p">)</span> +<a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1039" name="line-1039"></a><span class="w"> </span><span class="n">baobab_chart_set_item_highlight</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1040" name="line-1040"></a><span class="w"> </span><span class="n">gtk_widget_set_has_tooltip</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1041" name="line-1041"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1042" name="line-1042"></a> +<a id="line-1043" name="line-1043"></a><span class="w"> </span><span class="cm">/* Continue receiving motion notifies */</span> +<a id="line-1044" name="line-1044"></a><span class="w"> </span><span class="n">gdk_event_request_motions</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="p">);</span> +<a id="line-1045" name="line-1045"></a> +<a id="line-1046" name="line-1046"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1047" name="line-1047"></a><span class="p">}</span> +<a id="line-1048" name="line-1048"></a> +<a id="line-1049" name="line-1049"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-1050" name="line-1050"></a><span class="nf">baobab_chart_leave_notify</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="n">GdkEventCrossing</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">)</span> +<a id="line-1052" name="line-1052"></a><span class="p">{</span> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1054" name="line-1054"></a> +<a id="line-1055" name="line-1055"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1056" name="line-1056"></a><span class="w"> </span><span class="n">baobab_chart_set_item_highlight</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1057" name="line-1057"></a> +<a id="line-1058" name="line-1058"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1059" name="line-1059"></a><span class="p">}</span> +<a id="line-1060" name="line-1060"></a> +<a id="line-1061" name="line-1061"></a><span class="k">static</span><span class="w"> </span><span class="kr">inline</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1062" name="line-1062"></a><span class="nf">baobab_chart_connect_signals</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1063" name="line-1063"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">)</span> +<a id="line-1064" name="line-1064"></a><span class="p">{</span> +<a id="line-1065" name="line-1065"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span> +<a id="line-1066" name="line-1066"></a><span class="w"> </span><span class="s">"row_changed"</span><span class="p">,</span> +<a id="line-1067" name="line-1067"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_row_changed</span><span class="p">),</span> +<a id="line-1068" name="line-1068"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1069" name="line-1069"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span> +<a id="line-1070" name="line-1070"></a><span class="w"> </span><span class="s">"row_inserted"</span><span class="p">,</span> +<a id="line-1071" name="line-1071"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_row_inserted</span><span class="p">),</span> +<a id="line-1072" name="line-1072"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1073" name="line-1073"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span> +<a id="line-1074" name="line-1074"></a><span class="w"> </span><span class="s">"row_has_child_toggled"</span><span class="p">,</span> +<a id="line-1075" name="line-1075"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_row_has_child_toggled</span><span class="p">),</span> +<a id="line-1076" name="line-1076"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1077" name="line-1077"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span> +<a id="line-1078" name="line-1078"></a><span class="w"> </span><span class="s">"row_deleted"</span><span class="p">,</span> +<a id="line-1079" name="line-1079"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_row_deleted</span><span class="p">),</span> +<a id="line-1080" name="line-1080"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1081" name="line-1081"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span> +<a id="line-1082" name="line-1082"></a><span class="w"> </span><span class="s">"rows_reordered"</span><span class="p">,</span> +<a id="line-1083" name="line-1083"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_rows_reordered</span><span class="p">),</span> +<a id="line-1084" name="line-1084"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1085" name="line-1085"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1086" name="line-1086"></a><span class="w"> </span><span class="s">"query-tooltip"</span><span class="p">,</span> +<a id="line-1087" name="line-1087"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_query_tooltip</span><span class="p">),</span> +<a id="line-1088" name="line-1088"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1089" name="line-1089"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1090" name="line-1090"></a><span class="w"> </span><span class="s">"motion-notify-event"</span><span class="p">,</span> +<a id="line-1091" name="line-1091"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_motion_notify</span><span class="p">),</span> +<a id="line-1092" name="line-1092"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1093" name="line-1093"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1094" name="line-1094"></a><span class="w"> </span><span class="s">"leave-notify-event"</span><span class="p">,</span> +<a id="line-1095" name="line-1095"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_leave_notify</span><span class="p">),</span> +<a id="line-1096" name="line-1096"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1097" name="line-1097"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1098" name="line-1098"></a><span class="w"> </span><span class="s">"button-release-event"</span><span class="p">,</span> +<a id="line-1099" name="line-1099"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_button_release</span><span class="p">),</span> +<a id="line-1100" name="line-1100"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1101" name="line-1101"></a><span class="p">}</span> +<a id="line-1102" name="line-1102"></a> +<a id="line-1103" name="line-1103"></a><span class="k">static</span><span class="w"> </span><span class="kr">inline</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1104" name="line-1104"></a><span class="nf">baobab_chart_disconnect_signals</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1105" name="line-1105"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">)</span> +<a id="line-1106" name="line-1106"></a><span class="p">{</span> +<a id="line-1107" name="line-1107"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span> +<a id="line-1108" name="line-1108"></a><span class="w"> </span><span class="n">baobab_chart_row_changed</span><span class="p">,</span> +<a id="line-1109" name="line-1109"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1110" name="line-1110"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span> +<a id="line-1111" name="line-1111"></a><span class="w"> </span><span class="n">baobab_chart_row_inserted</span><span class="p">,</span> +<a id="line-1112" name="line-1112"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1113" name="line-1113"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span> +<a id="line-1114" name="line-1114"></a><span class="w"> </span><span class="n">baobab_chart_row_has_child_toggled</span><span class="p">,</span> +<a id="line-1115" name="line-1115"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1116" name="line-1116"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span> +<a id="line-1117" name="line-1117"></a><span class="w"> </span><span class="n">baobab_chart_row_deleted</span><span class="p">,</span> +<a id="line-1118" name="line-1118"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1119" name="line-1119"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span> +<a id="line-1120" name="line-1120"></a><span class="w"> </span><span class="n">baobab_chart_rows_reordered</span><span class="p">,</span> +<a id="line-1121" name="line-1121"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1122" name="line-1122"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1123" name="line-1123"></a><span class="w"> </span><span class="n">baobab_chart_query_tooltip</span><span class="p">,</span> +<a id="line-1124" name="line-1124"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1125" name="line-1125"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1126" name="line-1126"></a><span class="w"> </span><span class="n">baobab_chart_motion_notify</span><span class="p">,</span> +<a id="line-1127" name="line-1127"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1128" name="line-1128"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1129" name="line-1129"></a><span class="w"> </span><span class="n">baobab_chart_leave_notify</span><span class="p">,</span> +<a id="line-1130" name="line-1130"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1131" name="line-1131"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1132" name="line-1132"></a><span class="w"> </span><span class="n">baobab_chart_button_release</span><span class="p">,</span> +<a id="line-1133" name="line-1133"></a><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1134" name="line-1134"></a><span class="p">}</span> +<a id="line-1135" name="line-1135"></a> +<a id="line-1136" name="line-1136"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1137" name="line-1137"></a><span class="nf">baobab_chart_query_tooltip</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1138" name="line-1138"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">x</span><span class="p">,</span> +<a id="line-1139" name="line-1139"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">y</span><span class="p">,</span> +<a id="line-1140" name="line-1140"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">keyboard_mode</span><span class="p">,</span> +<a id="line-1141" name="line-1141"></a><span class="w"> </span><span class="n">GtkTooltip</span><span class="w"> </span><span class="o">*</span><span class="n">tooltip</span><span class="p">,</span> +<a id="line-1142" name="line-1142"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1143" name="line-1143"></a><span class="p">{</span> +<a id="line-1144" name="line-1144"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1145" name="line-1145"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-1146" name="line-1146"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">markup</span><span class="p">;</span> +<a id="line-1147" name="line-1147"></a> +<a id="line-1148" name="line-1148"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1149" name="line-1149"></a> +<a id="line-1150" name="line-1150"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1151" name="line-1151"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1152" name="line-1152"></a> +<a id="line-1153" name="line-1153"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1154" name="line-1154"></a> +<a id="line-1155" name="line-1155"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">name</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">size</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">)</span> +<a id="line-1156" name="line-1156"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1157" name="line-1157"></a> +<a id="line-1158" name="line-1158"></a><span class="w"> </span><span class="n">gtk_tooltip_set_tip_area</span><span class="w"> </span><span class="p">(</span><span class="n">tooltip</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="p">);</span> +<a id="line-1159" name="line-1159"></a> +<a id="line-1160" name="line-1160"></a><span class="w"> </span><span class="n">markup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">name</span><span class="p">,</span> +<a id="line-1161" name="line-1161"></a><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-1162" name="line-1162"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">size</span><span class="p">,</span> +<a id="line-1163" name="line-1163"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1164" name="line-1164"></a><span class="w"> </span><span class="n">gtk_tooltip_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">tooltip</span><span class="p">,</span><span class="w"> </span><span class="n">markup</span><span class="p">);</span> +<a id="line-1165" name="line-1165"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">markup</span><span class="p">);</span> +<a id="line-1166" name="line-1166"></a> +<a id="line-1167" name="line-1167"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1168" name="line-1168"></a><span class="p">}</span> +<a id="line-1169" name="line-1169"></a> +<a id="line-1170" name="line-1170"></a><span class="k">static</span><span class="w"> </span><span class="n">GdkPixbuf</span><span class="o">*</span> +<a id="line-1171" name="line-1171"></a><span class="nf">baobab_chart_get_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">)</span> +<a id="line-1172" name="line-1172"></a><span class="p">{</span> +<a id="line-1173" name="line-1173"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">h</span><span class="p">;</span> +<a id="line-1174" name="line-1174"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-1175" name="line-1175"></a> +<a id="line-1176" name="line-1176"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1177" name="line-1177"></a> +<a id="line-1178" name="line-1178"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_width</span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-1179" name="line-1179"></a><span class="w"> </span><span class="n">h</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_height</span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-1180" name="line-1180"></a> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_from_window</span><span class="w"> </span><span class="p">(</span> +<a id="line-1182" name="line-1182"></a><span class="w"> </span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-1184" name="line-1184"></a><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">h</span><span class="p">);</span> +<a id="line-1185" name="line-1185"></a> +<a id="line-1186" name="line-1186"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-1187" name="line-1187"></a><span class="p">}</span> +<a id="line-1188" name="line-1188"></a> +<a id="line-1189" name="line-1189"></a><span class="cm">/* Public functions start here */</span> +<a id="line-1190" name="line-1190"></a> +<a id="line-1191" name="line-1191"></a><span class="cm">/**</span> +<a id="line-1192" name="line-1192"></a><span class="cm"> * baobab_chart_new:</span> +<a id="line-1193" name="line-1193"></a><span class="cm"> *</span> +<a id="line-1194" name="line-1194"></a><span class="cm"> * Constructor for the baobab_chart class</span> +<a id="line-1195" name="line-1195"></a><span class="cm"> *</span> +<a id="line-1196" name="line-1196"></a><span class="cm"> * Returns: a new #BaobabChart object</span> +<a id="line-1197" name="line-1197"></a><span class="cm"> *</span> +<a id="line-1198" name="line-1198"></a><span class="cm"> **/</span> +<a id="line-1199" name="line-1199"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-1200" name="line-1200"></a><span class="nf">baobab_chart_new</span><span class="w"> </span><span class="p">()</span> +<a id="line-1201" name="line-1201"></a><span class="p">{</span> +<a id="line-1202" name="line-1202"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_CHART_TYPE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1203" name="line-1203"></a><span class="p">}</span> +<a id="line-1204" name="line-1204"></a> +<a id="line-1205" name="line-1205"></a><span class="cm">/**</span> +<a id="line-1206" name="line-1206"></a><span class="cm"> * baobab_chart_set_model_with_columns:</span> +<a id="line-1207" name="line-1207"></a><span class="cm"> * @chart: the #BaobabChart whose model is going to be set</span> +<a id="line-1208" name="line-1208"></a><span class="cm"> * @model: the #GtkTreeModel which is going to set as the model of</span> +<a id="line-1209" name="line-1209"></a><span class="cm"> * @chart</span> +<a id="line-1210" name="line-1210"></a><span class="cm"> * @name_column: number of column inside @model where the file name is</span> +<a id="line-1211" name="line-1211"></a><span class="cm"> * stored</span> +<a id="line-1212" name="line-1212"></a><span class="cm"> * @size_column: number of column inside @model where the file size is</span> +<a id="line-1213" name="line-1213"></a><span class="cm"> * stored</span> +<a id="line-1214" name="line-1214"></a><span class="cm"> * @info_column: number of column inside @model where the percentage</span> +<a id="line-1215" name="line-1215"></a><span class="cm"> * of disk usage is stored</span> +<a id="line-1216" name="line-1216"></a><span class="cm"> * @percentage_column: number of column inside @model where the disk</span> +<a id="line-1217" name="line-1217"></a><span class="cm"> * usage percentage is stored</span> +<a id="line-1218" name="line-1218"></a><span class="cm"> * @valid_column: number of column inside @model where the flag indicating</span> +<a id="line-1219" name="line-1219"></a><span class="cm"> * if the row data is right or not.</span> +<a id="line-1220" name="line-1220"></a><span class="cm"> * @root: a #GtkTreePath indicating the node of @model which will be</span> +<a id="line-1221" name="line-1221"></a><span class="cm"> * used as root.</span> +<a id="line-1222" name="line-1222"></a><span class="cm"> *</span> +<a id="line-1223" name="line-1223"></a><span class="cm"> * Sets @model as the #GtkTreeModel used by @chart. Indicates the</span> +<a id="line-1224" name="line-1224"></a><span class="cm"> * columns inside @model where the values file name, file</span> +<a id="line-1225" name="line-1225"></a><span class="cm"> * size, file information, disk usage percentage and data correction are stored, and</span> +<a id="line-1226" name="line-1226"></a><span class="cm"> * the node which will be used as the root of @chart. Once</span> +<a id="line-1227" name="line-1227"></a><span class="cm"> * the model has been successfully set, a redraw of the window is</span> +<a id="line-1228" name="line-1228"></a><span class="cm"> * forced.</span> +<a id="line-1229" name="line-1229"></a><span class="cm"> * This function is intended to be used the first time a #GtkTreeModel</span> +<a id="line-1230" name="line-1230"></a><span class="cm"> * is assigned to @chart, or when the columns containing the needed data</span> +<a id="line-1231" name="line-1231"></a><span class="cm"> * are going to change. In other cases, #baobab_chart_set_model should</span> +<a id="line-1232" name="line-1232"></a><span class="cm"> * be used.</span> +<a id="line-1233" name="line-1233"></a><span class="cm"> * This function does not change the state of the signals from the model, which</span> +<a id="line-1234" name="line-1234"></a><span class="cm"> * is controlled by he #baobab_chart_freeze_updates and the</span> +<a id="line-1235" name="line-1235"></a><span class="cm"> * #baobab_chart_thaw_updates functions.</span> +<a id="line-1236" name="line-1236"></a><span class="cm"> *</span> +<a id="line-1237" name="line-1237"></a><span class="cm"> * Fails if @chart is not a #BaobabChart or if @model is not a</span> +<a id="line-1238" name="line-1238"></a><span class="cm"> * #GtkTreeModel.</span> +<a id="line-1239" name="line-1239"></a><span class="cm"> **/</span> +<a id="line-1240" name="line-1240"></a><span class="kt">void</span> +<a id="line-1241" name="line-1241"></a><span class="nf">baobab_chart_set_model_with_columns</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1242" name="line-1242"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-1243" name="line-1243"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">name_column</span><span class="p">,</span> +<a id="line-1244" name="line-1244"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">size_column</span><span class="p">,</span> +<a id="line-1245" name="line-1245"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">info_column</span><span class="p">,</span> +<a id="line-1246" name="line-1246"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">percentage_column</span><span class="p">,</span> +<a id="line-1247" name="line-1247"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">valid_column</span><span class="p">,</span> +<a id="line-1248" name="line-1248"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">root</span><span class="p">)</span> +<a id="line-1249" name="line-1249"></a><span class="p">{</span> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1251" name="line-1251"></a> +<a id="line-1252" name="line-1252"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-1253" name="line-1253"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">));</span> +<a id="line-1254" name="line-1254"></a> +<a id="line-1255" name="line-1255"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1256" name="line-1256"></a> +<a id="line-1257" name="line-1257"></a><span class="w"> </span><span class="n">baobab_chart_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">model</span><span class="p">);</span> +<a id="line-1258" name="line-1258"></a> +<a id="line-1259" name="line-1259"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">root</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1260" name="line-1260"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1261" name="line-1261"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_row_reference_new</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">);</span> +<a id="line-1262" name="line-1262"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="s">"root"</span><span class="p">);</span> +<a id="line-1263" name="line-1263"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1264" name="line-1264"></a> +<a id="line-1265" name="line-1265"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">name_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">name_column</span><span class="p">;</span> +<a id="line-1266" name="line-1266"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">size_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">size_column</span><span class="p">;</span> +<a id="line-1267" name="line-1267"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">info_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">info_column</span><span class="p">;</span> +<a id="line-1268" name="line-1268"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">percentage_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">percentage_column</span><span class="p">;</span> +<a id="line-1269" name="line-1269"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">valid_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">valid_column</span><span class="p">;</span> +<a id="line-1270" name="line-1270"></a><span class="p">}</span> +<a id="line-1271" name="line-1271"></a> +<a id="line-1272" name="line-1272"></a><span class="cm">/**</span> +<a id="line-1273" name="line-1273"></a><span class="cm"> * baobab_chart_set_model:</span> +<a id="line-1274" name="line-1274"></a><span class="cm"> * @chart: the #BaobabChart whose model is going to be set</span> +<a id="line-1275" name="line-1275"></a><span class="cm"> * @model: the #GtkTreeModel which is going to set as the model of</span> +<a id="line-1276" name="line-1276"></a><span class="cm"> * @chart</span> +<a id="line-1277" name="line-1277"></a><span class="cm"> *</span> +<a id="line-1278" name="line-1278"></a><span class="cm"> * Sets @model as the #GtkTreeModel used by @chart, and takes the needed</span> +<a id="line-1279" name="line-1279"></a><span class="cm"> * data from the columns especified in the last call to</span> +<a id="line-1280" name="line-1280"></a><span class="cm"> * #baobab_chart_set_model_with_colums.</span> +<a id="line-1281" name="line-1281"></a><span class="cm"> * This function does not change the state of the signals from the model, which</span> +<a id="line-1282" name="line-1282"></a><span class="cm"> * is controlled by he #baobab_chart_freeze_updates and the</span> +<a id="line-1283" name="line-1283"></a><span class="cm"> * #baobab_chart_thaw_updates functions.</span> +<a id="line-1284" name="line-1284"></a><span class="cm"> *</span> +<a id="line-1285" name="line-1285"></a><span class="cm"> * Fails if @chart is not a #BaobabChart or if @model is not a</span> +<a id="line-1286" name="line-1286"></a><span class="cm"> * #GtkTreeModel.</span> +<a id="line-1287" name="line-1287"></a><span class="cm"> **/</span> +<a id="line-1288" name="line-1288"></a><span class="kt">void</span> +<a id="line-1289" name="line-1289"></a><span class="nf">baobab_chart_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1290" name="line-1290"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">)</span> +<a id="line-1291" name="line-1291"></a><span class="p">{</span> +<a id="line-1292" name="line-1292"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1293" name="line-1293"></a> +<a id="line-1294" name="line-1294"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-1295" name="line-1295"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">));</span> +<a id="line-1296" name="line-1296"></a> +<a id="line-1297" name="line-1297"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1298" name="line-1298"></a> +<a id="line-1299" name="line-1299"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">)</span> +<a id="line-1300" name="line-1300"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1301" name="line-1301"></a> +<a id="line-1302" name="line-1302"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">)</span> +<a id="line-1303" name="line-1303"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1304" name="line-1304"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_frozen</span><span class="p">)</span> +<a id="line-1305" name="line-1305"></a><span class="w"> </span><span class="n">baobab_chart_disconnect_signals</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1306" name="line-1306"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-1307" name="line-1307"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-1308" name="line-1308"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1309" name="line-1309"></a> +<a id="line-1310" name="line-1310"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-1311" name="line-1311"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-1312" name="line-1312"></a> +<a id="line-1313" name="line-1313"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_frozen</span><span class="p">)</span> +<a id="line-1314" name="line-1314"></a><span class="w"> </span><span class="n">baobab_chart_connect_signals</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1315" name="line-1315"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-1316" name="line-1316"></a> +<a id="line-1317" name="line-1317"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">)</span> +<a id="line-1318" name="line-1318"></a><span class="w"> </span><span class="n">gtk_tree_row_reference_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-1319" name="line-1319"></a> +<a id="line-1320" name="line-1320"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1321" name="line-1321"></a> +<a id="line-1322" name="line-1322"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="s">"model"</span><span class="p">);</span> +<a id="line-1323" name="line-1323"></a> +<a id="line-1324" name="line-1324"></a><span class="w"> </span><span class="n">gtk_widget_queue_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1325" name="line-1325"></a><span class="p">}</span> +<a id="line-1326" name="line-1326"></a> +<a id="line-1327" name="line-1327"></a><span class="cm">/**</span> +<a id="line-1328" name="line-1328"></a><span class="cm"> * baobab_chart_get_model:</span> +<a id="line-1329" name="line-1329"></a><span class="cm"> * @chart: a #BaobabChart whose model will be returned.</span> +<a id="line-1330" name="line-1330"></a><span class="cm"> *</span> +<a id="line-1331" name="line-1331"></a><span class="cm"> * Returns the #GtkTreeModel which is the model used by @chart.</span> +<a id="line-1332" name="line-1332"></a><span class="cm"> *</span> +<a id="line-1333" name="line-1333"></a><span class="cm"> * Returns: %NULL if @chart is not a #BaobabChart.</span> +<a id="line-1334" name="line-1334"></a><span class="cm"> **/</span> +<a id="line-1335" name="line-1335"></a><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span> +<a id="line-1336" name="line-1336"></a><span class="nf">baobab_chart_get_model</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1337" name="line-1337"></a><span class="p">{</span> +<a id="line-1338" name="line-1338"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1339" name="line-1339"></a> +<a id="line-1340" name="line-1340"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">;</span> +<a id="line-1341" name="line-1341"></a><span class="p">}</span> +<a id="line-1342" name="line-1342"></a> +<a id="line-1343" name="line-1343"></a><span class="cm">/**</span> +<a id="line-1344" name="line-1344"></a><span class="cm"> * baobab_chart_set_max_depth:</span> +<a id="line-1345" name="line-1345"></a><span class="cm"> * @chart: a #BaobabChart</span> +<a id="line-1346" name="line-1346"></a><span class="cm"> * @max_depth: the new maximum depth to show in the widget.</span> +<a id="line-1347" name="line-1347"></a><span class="cm"> *</span> +<a id="line-1348" name="line-1348"></a><span class="cm"> * Sets the maximum number of nested levels that are going to be show in the</span> +<a id="line-1349" name="line-1349"></a><span class="cm"> * wigdet, and causes a redraw of the widget to show the new maximum</span> +<a id="line-1350" name="line-1350"></a><span class="cm"> * depth. If max_depth is < 1 MAX_DRAWABLE_DEPTH is used.</span> +<a id="line-1351" name="line-1351"></a><span class="cm"> *</span> +<a id="line-1352" name="line-1352"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1353" name="line-1353"></a><span class="cm"> **/</span> +<a id="line-1354" name="line-1354"></a><span class="kt">void</span> +<a id="line-1355" name="line-1355"></a><span class="nf">baobab_chart_set_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1356" name="line-1356"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">max_depth</span><span class="p">)</span> +<a id="line-1357" name="line-1357"></a><span class="p">{</span> +<a id="line-1358" name="line-1358"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1359" name="line-1359"></a> +<a id="line-1360" name="line-1360"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-1361" name="line-1361"></a> +<a id="line-1362" name="line-1362"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1363" name="line-1363"></a> +<a id="line-1364" name="line-1364"></a><span class="w"> </span><span class="n">max_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">max_depth</span><span class="p">,</span><span class="w"> </span><span class="n">BAOBAB_CHART_MAX_DEPTH</span><span class="p">);</span> +<a id="line-1365" name="line-1365"></a><span class="w"> </span><span class="n">max_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">max_depth</span><span class="p">,</span><span class="w"> </span><span class="n">BAOBAB_CHART_MIN_DEPTH</span><span class="p">);</span> +<a id="line-1366" name="line-1366"></a> +<a id="line-1367" name="line-1367"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">max_depth</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="p">)</span> +<a id="line-1368" name="line-1368"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1369" name="line-1369"></a> +<a id="line-1370" name="line-1370"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">max_depth</span><span class="p">;</span> +<a id="line-1371" name="line-1371"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="s">"max-depth"</span><span class="p">);</span> +<a id="line-1372" name="line-1372"></a> +<a id="line-1373" name="line-1373"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model_changed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1374" name="line-1374"></a> +<a id="line-1375" name="line-1375"></a><span class="w"> </span><span class="n">gtk_widget_queue_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1376" name="line-1376"></a><span class="p">}</span> +<a id="line-1377" name="line-1377"></a> +<a id="line-1378" name="line-1378"></a><span class="cm">/**</span> +<a id="line-1379" name="line-1379"></a><span class="cm"> * baobab_chart_get_max_depth:</span> +<a id="line-1380" name="line-1380"></a><span class="cm"> * @chart: a #BaobabChart.</span> +<a id="line-1381" name="line-1381"></a><span class="cm"> *</span> +<a id="line-1382" name="line-1382"></a><span class="cm"> * Returns the maximum number of levels that will be show in the</span> +<a id="line-1383" name="line-1383"></a><span class="cm"> * widget.</span> +<a id="line-1384" name="line-1384"></a><span class="cm"> *</span> +<a id="line-1385" name="line-1385"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1386" name="line-1386"></a><span class="cm"> **/</span> +<a id="line-1387" name="line-1387"></a><span class="n">guint</span> +<a id="line-1388" name="line-1388"></a><span class="nf">baobab_chart_get_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1389" name="line-1389"></a><span class="p">{</span> +<a id="line-1390" name="line-1390"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1391" name="line-1391"></a> +<a id="line-1392" name="line-1392"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="p">;</span> +<a id="line-1393" name="line-1393"></a><span class="p">}</span> +<a id="line-1394" name="line-1394"></a> +<a id="line-1395" name="line-1395"></a><span class="cm">/**</span> +<a id="line-1396" name="line-1396"></a><span class="cm"> * baobab_chart_set_root:</span> +<a id="line-1397" name="line-1397"></a><span class="cm"> * @chart: a #BaobabChart</span> +<a id="line-1398" name="line-1398"></a><span class="cm"> * @root: a #GtkTreePath indicating the node which will be used as</span> +<a id="line-1399" name="line-1399"></a><span class="cm"> * the widget root.</span> +<a id="line-1400" name="line-1400"></a><span class="cm"> *</span> +<a id="line-1401" name="line-1401"></a><span class="cm"> * Sets the node pointed by @root as the new root of the widget</span> +<a id="line-1402" name="line-1402"></a><span class="cm"> * @chart.</span> +<a id="line-1403" name="line-1403"></a><span class="cm"> *</span> +<a id="line-1404" name="line-1404"></a><span class="cm"> * Fails if @chart is not a #BaobabChart or if @chart has not</span> +<a id="line-1405" name="line-1405"></a><span class="cm"> * a #GtkTreeModel set.</span> +<a id="line-1406" name="line-1406"></a><span class="cm"> **/</span> +<a id="line-1407" name="line-1407"></a><span class="kt">void</span> +<a id="line-1408" name="line-1408"></a><span class="nf">baobab_chart_set_root</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1409" name="line-1409"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">root</span><span class="p">)</span> +<a id="line-1410" name="line-1410"></a><span class="p">{</span> +<a id="line-1411" name="line-1411"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1412" name="line-1412"></a><span class="hll"><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">current_root</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'current_root' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'current_root' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1413" name="line-1413"></a> +<a id="line-1414" name="line-1414"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-1415" name="line-1415"></a> +<a id="line-1416" name="line-1416"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1417" name="line-1417"></a> +<a id="line-1418" name="line-1418"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1419" name="line-1419"></a> +<a id="line-1420" name="line-1420"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1421" name="line-1421"></a><span class="w"> </span><span class="cm">/* Check that given root is different from current */</span> +<a id="line-1422" name="line-1422"></a><span class="w"> </span><span class="n">current_root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_row_reference_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-1423" name="line-1423"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="n">current_root</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_path_compare</span><span class="w"> </span><span class="p">(</span><span class="n">current_root</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">)</span> +<a id="line-1424" name="line-1424"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1425" name="line-1425"></a> +<a id="line-1426" name="line-1426"></a><span class="w"> </span><span class="cm">/* Free current root */</span> +<a id="line-1427" name="line-1427"></a><span class="w"> </span><span class="n">gtk_tree_row_reference_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-1428" name="line-1428"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1429" name="line-1429"></a> +<a id="line-1430" name="line-1430"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_row_reference_new</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">);</span> +<a id="line-1431" name="line-1431"></a> +<a id="line-1432" name="line-1432"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="s">"root"</span><span class="p">);</span> +<a id="line-1433" name="line-1433"></a> +<a id="line-1434" name="line-1434"></a><span class="w"> </span><span class="n">gtk_widget_queue_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1435" name="line-1435"></a><span class="p">}</span> +<a id="line-1436" name="line-1436"></a> +<a id="line-1437" name="line-1437"></a><span class="cm">/**</span> +<a id="line-1438" name="line-1438"></a><span class="cm"> * baobab_chart_get_root:</span> +<a id="line-1439" name="line-1439"></a><span class="cm"> * @chart: a #BaobabChart.</span> +<a id="line-1440" name="line-1440"></a><span class="cm"> *</span> +<a id="line-1441" name="line-1441"></a><span class="cm"> * Returns a #GtkTreePath pointing to the root of the widget. The</span> +<a id="line-1442" name="line-1442"></a><span class="cm"> * programmer has the responsability to free the used memory once</span> +<a id="line-1443" name="line-1443"></a><span class="cm"> * finished with the returned value. It returns NULL if there is no</span> +<a id="line-1444" name="line-1444"></a><span class="cm"> * root node defined</span> +<a id="line-1445" name="line-1445"></a><span class="cm"> *</span> +<a id="line-1446" name="line-1446"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1447" name="line-1447"></a><span class="cm"> **/</span> +<a id="line-1448" name="line-1448"></a><span class="n">GtkTreePath</span><span class="o">*</span> +<a id="line-1449" name="line-1449"></a><span class="nf">baobab_chart_get_root</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1450" name="line-1450"></a><span class="p">{</span> +<a id="line-1451" name="line-1451"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1452" name="line-1452"></a> +<a id="line-1453" name="line-1453"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">)</span> +<a id="line-1454" name="line-1454"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">gtk_tree_row_reference_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-1455" name="line-1455"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1456" name="line-1456"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1457" name="line-1457"></a><span class="p">}</span> +<a id="line-1458" name="line-1458"></a> +<a id="line-1459" name="line-1459"></a><span class="cm">/**</span> +<a id="line-1460" name="line-1460"></a><span class="cm"> * baobab_chart_freeze_updates:</span> +<a id="line-1461" name="line-1461"></a><span class="cm"> * @chart: the #BaobabChart whose model signals are going to be frozen.</span> +<a id="line-1462" name="line-1462"></a><span class="cm"> *</span> +<a id="line-1463" name="line-1463"></a><span class="cm"> * Disconnects @chart from the signals emitted by its model, and sets</span> +<a id="line-1464" name="line-1464"></a><span class="cm"> * the window of @chart to a "processing" state, so that the window</span> +<a id="line-1465" name="line-1465"></a><span class="cm"> * ignores changes in the chart's model and mouse events.</span> +<a id="line-1466" name="line-1466"></a><span class="cm"> * In order to connect again the window to the model, a call to</span> +<a id="line-1467" name="line-1467"></a><span class="cm"> * #baobab_chart_thaw_updates must be done.</span> +<a id="line-1468" name="line-1468"></a><span class="cm"> *</span> +<a id="line-1469" name="line-1469"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1470" name="line-1470"></a><span class="cm"> **/</span> +<a id="line-1471" name="line-1471"></a><span class="kt">void</span> +<a id="line-1472" name="line-1472"></a><span class="nf">baobab_chart_freeze_updates</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1473" name="line-1473"></a><span class="p">{</span> +<a id="line-1474" name="line-1474"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1475" name="line-1475"></a><span class="w"> </span><span class="n">cairo_surface_t</span><span class="w"> </span><span class="o">*</span><span class="n">surface</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1476" name="line-1476"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1477" name="line-1477"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">area</span><span class="p">;</span> +<a id="line-1478" name="line-1478"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-1479" name="line-1479"></a> +<a id="line-1480" name="line-1480"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-1481" name="line-1481"></a> +<a id="line-1482" name="line-1482"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1483" name="line-1483"></a> +<a id="line-1484" name="line-1484"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">is_frozen</span><span class="p">)</span> +<a id="line-1485" name="line-1485"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1486" name="line-1486"></a> +<a id="line-1487" name="line-1487"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">)</span> +<a id="line-1488" name="line-1488"></a><span class="w"> </span><span class="n">baobab_chart_disconnect_signals</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1489" name="line-1489"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-1490" name="line-1490"></a> +<a id="line-1491" name="line-1491"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-1492" name="line-1492"></a><span class="w"> </span><span class="n">surface</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cairo_image_surface_create</span><span class="w"> </span><span class="p">(</span><span class="n">CAIRO_FORMAT_ARGB32</span><span class="p">,</span> +<a id="line-1493" name="line-1493"></a><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="p">,</span> +<a id="line-1494" name="line-1494"></a><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="p">);</span> +<a id="line-1495" name="line-1495"></a> +<a id="line-1496" name="line-1496"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">cairo_surface_status</span><span class="w"> </span><span class="p">(</span><span class="n">surface</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">CAIRO_STATUS_SUCCESS</span><span class="p">)</span> +<a id="line-1497" name="line-1497"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1498" name="line-1498"></a><span class="w"> </span><span class="n">cr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cairo_create</span><span class="w"> </span><span class="p">(</span><span class="n">surface</span><span class="p">);</span> +<a id="line-1499" name="line-1499"></a> +<a id="line-1500" name="line-1500"></a><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1501" name="line-1501"></a><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1502" name="line-1502"></a><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="p">;</span> +<a id="line-1503" name="line-1503"></a><span class="w"> </span><span class="n">area</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="p">;</span> +<a id="line-1504" name="line-1504"></a><span class="w"> </span><span class="n">baobab_chart_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">area</span><span class="p">);</span> +<a id="line-1505" name="line-1505"></a> +<a id="line-1506" name="line-1506"></a><span class="w"> </span><span class="n">cairo_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span> +<a id="line-1507" name="line-1507"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-1508" name="line-1508"></a><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="p">,</span> +<a id="line-1509" name="line-1509"></a><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="p">);</span> +<a id="line-1510" name="line-1510"></a> +<a id="line-1511" name="line-1511"></a><span class="w"> </span><span class="n">cairo_set_source_rgba</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mf">0.93</span><span class="p">,</span><span class="w"> </span><span class="mf">0.93</span><span class="p">,</span><span class="w"> </span><span class="mf">0.93</span><span class="p">,</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span><span class="w"> </span><span class="cm">/* tango: eeeeec */</span> +<a id="line-1512" name="line-1512"></a><span class="w"> </span><span class="n">cairo_fill_preserve</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-1513" name="line-1513"></a> +<a id="line-1514" name="line-1514"></a><span class="w"> </span><span class="n">cairo_clip</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-1515" name="line-1515"></a> +<a id="line-1516" name="line-1516"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">memento</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">surface</span><span class="p">;</span> +<a id="line-1517" name="line-1517"></a> +<a id="line-1518" name="line-1518"></a><span class="w"> </span><span class="n">cairo_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-1519" name="line-1519"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1520" name="line-1520"></a> +<a id="line-1521" name="line-1521"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_frozen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1522" name="line-1522"></a> +<a id="line-1523" name="line-1523"></a><span class="w"> </span><span class="n">gtk_widget_queue_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1524" name="line-1524"></a><span class="p">}</span> +<a id="line-1525" name="line-1525"></a> +<a id="line-1526" name="line-1526"></a><span class="cm">/**</span> +<a id="line-1527" name="line-1527"></a><span class="cm"> * baobab_chart_thaw_updates:</span> +<a id="line-1528" name="line-1528"></a><span class="cm"> * @chart: the #BaobabChart whose model signals are frozen.</span> +<a id="line-1529" name="line-1529"></a><span class="cm"> *</span> +<a id="line-1530" name="line-1530"></a><span class="cm"> * Reconnects @chart to the signals emitted by its model, which</span> +<a id="line-1531" name="line-1531"></a><span class="cm"> * were disconnected through a call to #baobab_chart_freeze_updates.</span> +<a id="line-1532" name="line-1532"></a><span class="cm"> * Takes the window out of its "processing" state and forces a redraw</span> +<a id="line-1533" name="line-1533"></a><span class="cm"> * of the widget.</span> +<a id="line-1534" name="line-1534"></a><span class="cm"> *</span> +<a id="line-1535" name="line-1535"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1536" name="line-1536"></a><span class="cm"> **/</span> +<a id="line-1537" name="line-1537"></a><span class="kt">void</span> +<a id="line-1538" name="line-1538"></a><span class="nf">baobab_chart_thaw_updates</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1539" name="line-1539"></a><span class="p">{</span> +<a id="line-1540" name="line-1540"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1541" name="line-1541"></a> +<a id="line-1542" name="line-1542"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-1543" name="line-1543"></a> +<a id="line-1544" name="line-1544"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1545" name="line-1545"></a> +<a id="line-1546" name="line-1546"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">is_frozen</span><span class="p">)</span> +<a id="line-1547" name="line-1547"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1548" name="line-1548"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">)</span> +<a id="line-1549" name="line-1549"></a><span class="w"> </span><span class="n">baobab_chart_connect_signals</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1550" name="line-1550"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-1551" name="line-1551"></a> +<a id="line-1552" name="line-1552"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">memento</span><span class="p">)</span> +<a id="line-1553" name="line-1553"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1554" name="line-1554"></a><span class="w"> </span><span class="n">cairo_surface_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">memento</span><span class="p">);</span> +<a id="line-1555" name="line-1555"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">memento</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1556" name="line-1556"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1557" name="line-1557"></a> +<a id="line-1558" name="line-1558"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_frozen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1559" name="line-1559"></a> +<a id="line-1560" name="line-1560"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model_changed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1561" name="line-1561"></a><span class="w"> </span><span class="n">gtk_widget_queue_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1562" name="line-1562"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1563" name="line-1563"></a><span class="p">}</span> +<a id="line-1564" name="line-1564"></a> +<a id="line-1565" name="line-1565"></a><span class="cm">/**</span> +<a id="line-1566" name="line-1566"></a><span class="cm"> * baobab_chart_zoom_in:</span> +<a id="line-1567" name="line-1567"></a><span class="cm"> * @chart: the #BaobabChart requested to zoom in.</span> +<a id="line-1568" name="line-1568"></a><span class="cm"> *</span> +<a id="line-1569" name="line-1569"></a><span class="cm"> * Zooms in the chart by decreasing its maximun depth.</span> +<a id="line-1570" name="line-1570"></a><span class="cm"> *</span> +<a id="line-1571" name="line-1571"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1572" name="line-1572"></a><span class="cm"> **/</span> +<a id="line-1573" name="line-1573"></a><span class="kt">void</span> +<a id="line-1574" name="line-1574"></a><span class="nf">baobab_chart_zoom_in</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1575" name="line-1575"></a><span class="p">{</span> +<a id="line-1576" name="line-1576"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1577" name="line-1577"></a><span class="w"> </span><span class="n">BaobabChartClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">;</span> +<a id="line-1578" name="line-1578"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">new_max_depth</span><span class="p">;</span> +<a id="line-1579" name="line-1579"></a> +<a id="line-1580" name="line-1580"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-1581" name="line-1581"></a> +<a id="line-1582" name="line-1582"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1583" name="line-1583"></a><span class="w"> </span><span class="n">class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1584" name="line-1584"></a> +<a id="line-1585" name="line-1585"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="o">-></span><span class="n">can_zoom_in</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1586" name="line-1586"></a><span class="w"> </span><span class="n">new_max_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">can_zoom_in</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1587" name="line-1587"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1588" name="line-1588"></a><span class="w"> </span><span class="n">new_max_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1589" name="line-1589"></a> +<a id="line-1590" name="line-1590"></a><span class="w"> </span><span class="n">baobab_chart_set_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">new_max_depth</span><span class="p">);</span> +<a id="line-1591" name="line-1591"></a><span class="p">}</span> +<a id="line-1592" name="line-1592"></a> +<a id="line-1593" name="line-1593"></a><span class="cm">/**</span> +<a id="line-1594" name="line-1594"></a><span class="cm"> * baobab_chart_zoom_out:</span> +<a id="line-1595" name="line-1595"></a><span class="cm"> * @chart: the #BaobabChart requested to zoom out.</span> +<a id="line-1596" name="line-1596"></a><span class="cm"> *</span> +<a id="line-1597" name="line-1597"></a><span class="cm"> * Zooms out the chart by increasing its maximun depth.</span> +<a id="line-1598" name="line-1598"></a><span class="cm"> *</span> +<a id="line-1599" name="line-1599"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1600" name="line-1600"></a><span class="cm"> **/</span> +<a id="line-1601" name="line-1601"></a><span class="kt">void</span> +<a id="line-1602" name="line-1602"></a><span class="nf">baobab_chart_zoom_out</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1603" name="line-1603"></a><span class="p">{</span> +<a id="line-1604" name="line-1604"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-1605" name="line-1605"></a> +<a id="line-1606" name="line-1606"></a><span class="w"> </span><span class="n">baobab_chart_set_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-1607" name="line-1607"></a><span class="w"> </span><span class="n">baobab_chart_get_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1608" name="line-1608"></a><span class="p">}</span> +<a id="line-1609" name="line-1609"></a> +<a id="line-1610" name="line-1610"></a><span class="cm">/**</span> +<a id="line-1611" name="line-1611"></a><span class="cm"> * baobab_chart_move_up_root:</span> +<a id="line-1612" name="line-1612"></a><span class="cm"> * @chart: the #BaobabChart whose root is requested to move up one level.</span> +<a id="line-1613" name="line-1613"></a><span class="cm"> *</span> +<a id="line-1614" name="line-1614"></a><span class="cm"> * Move root to the inmediate parent of the current root item of @chart.</span> +<a id="line-1615" name="line-1615"></a><span class="cm"> *</span> +<a id="line-1616" name="line-1616"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1617" name="line-1617"></a><span class="cm"> **/</span> +<a id="line-1618" name="line-1618"></a><span class="kt">void</span> +<a id="line-1619" name="line-1619"></a><span class="nf">baobab_chart_move_up_root</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1620" name="line-1620"></a><span class="p">{</span> +<a id="line-1621" name="line-1621"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1622" name="line-1622"></a> +<a id="line-1623" name="line-1623"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">parent_iter</span><span class="p">;</span> +<a id="line-1624" name="line-1624"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">;</span> +<a id="line-1625" name="line-1625"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">root_iter</span><span class="p">;</span> +<a id="line-1626" name="line-1626"></a> +<a id="line-1627" name="line-1627"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">valid</span><span class="p">;</span> +<a id="line-1628" name="line-1628"></a><span class="hll"><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">parent_path</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'parent_path' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'parent_path' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1629" name="line-1629"></a> +<a id="line-1630" name="line-1630"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-1631" name="line-1631"></a> +<a id="line-1632" name="line-1632"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1633" name="line-1633"></a> +<a id="line-1634" name="line-1634"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1635" name="line-1635"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1636" name="line-1636"></a> +<a id="line-1637" name="line-1637"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_row_reference_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-1638" name="line-1638"></a> +<a id="line-1639" name="line-1639"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1640" name="line-1640"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">root_iter</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-1641" name="line-1641"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1642" name="line-1642"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1643" name="line-1643"></a> +<a id="line-1644" name="line-1644"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_model_iter_parent</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parent_iter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">root_iter</span><span class="p">))</span> +<a id="line-1645" name="line-1645"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1646" name="line-1646"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parent_iter</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">valid_column</span><span class="p">,</span> +<a id="line-1647" name="line-1647"></a><span class="w"> </span><span class="o">&</span><span class="n">valid</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1648" name="line-1648"></a> +<a id="line-1649" name="line-1649"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">valid</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-1650" name="line-1650"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1651" name="line-1651"></a> +<a id="line-1652" name="line-1652"></a><span class="w"> </span><span class="n">gtk_tree_row_reference_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="p">);</span> +<a id="line-1653" name="line-1653"></a><span class="w"> </span><span class="n">parent_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parent_iter</span><span class="p">);</span> +<a id="line-1654" name="line-1654"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_row_reference_new</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">parent_path</span><span class="p">);</span> +<a id="line-1655" name="line-1655"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">parent_path</span><span class="p">);</span> +<a id="line-1656" name="line-1656"></a> +<a id="line-1657" name="line-1657"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span> +<a id="line-1658" name="line-1658"></a><span class="w"> </span><span class="n">baobab_chart_signals</span><span class="p">[</span><span class="n">ITEM_ACTIVATED</span><span class="p">],</span> +<a id="line-1659" name="line-1659"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parent_iter</span><span class="p">);</span> +<a id="line-1660" name="line-1660"></a> +<a id="line-1661" name="line-1661"></a><span class="w"> </span><span class="n">gtk_widget_queue_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1662" name="line-1662"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1663" name="line-1663"></a> +<a id="line-1664" name="line-1664"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-1665" name="line-1665"></a><span class="p">}</span> +<a id="line-1666" name="line-1666"></a> +<a id="line-1667" name="line-1667"></a><span class="cm">/**</span> +<a id="line-1668" name="line-1668"></a><span class="cm"> * baobab_chart_save_snapshot:</span> +<a id="line-1669" name="line-1669"></a><span class="cm"> * @chart: the #BaobabChart requested to be exported to image.</span> +<a id="line-1670" name="line-1670"></a><span class="cm"> *</span> +<a id="line-1671" name="line-1671"></a><span class="cm"> * Opens a dialog to allow saving the current chart's image as a PNG, JPEG or</span> +<a id="line-1672" name="line-1672"></a><span class="cm"> * BMP image.</span> +<a id="line-1673" name="line-1673"></a><span class="cm"> *</span> +<a id="line-1674" name="line-1674"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1675" name="line-1675"></a><span class="cm"> **/</span> +<a id="line-1676" name="line-1676"></a><span class="kt">void</span> +<a id="line-1677" name="line-1677"></a><span class="nf">baobab_chart_save_snapshot</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1678" name="line-1678"></a><span class="p">{</span> +<a id="line-1679" name="line-1679"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1680" name="line-1680"></a> +<a id="line-1681" name="line-1681"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-1682" name="line-1682"></a> +<a id="line-1683" name="line-1683"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">fs_dlg</span><span class="p">;</span> +<a id="line-1684" name="line-1684"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">vbox</span><span class="p">;</span> +<a id="line-1685" name="line-1685"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hbox</span><span class="p">;</span> +<a id="line-1686" name="line-1686"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="p">;</span> +<a id="line-1687" name="line-1687"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">opt_menu</span><span class="p">;</span> +<a id="line-1688" name="line-1688"></a><span class="hll"><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">sel_type</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'sel_type' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'sel_type' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1689" name="line-1689"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">filename</span><span class="p">;</span> +<a id="line-1690" name="line-1690"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">def_filename</span><span class="p">;</span> +<a id="line-1691" name="line-1691"></a> +<a id="line-1692" name="line-1692"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-1693" name="line-1693"></a> +<a id="line-1694" name="line-1694"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-1695" name="line-1695"></a> +<a id="line-1696" name="line-1696"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span> +<a id="line-1697" name="line-1697"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-1698" name="line-1698"></a> +<a id="line-1699" name="line-1699"></a><span class="w"> </span><span class="cm">/* Get the chart's pixbuf */</span> +<a id="line-1700" name="line-1700"></a><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_get_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1701" name="line-1701"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1702" name="line-1702"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1703" name="line-1703"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-1704" name="line-1704"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1705" name="line-1705"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-1706" name="line-1706"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-1707" name="line-1707"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-1708" name="line-1708"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Cannot create pixbuf image!"</span><span class="p">));</span> +<a id="line-1709" name="line-1709"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-1710" name="line-1710"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-1711" name="line-1711"></a> +<a id="line-1712" name="line-1712"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1713" name="line-1713"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1714" name="line-1714"></a> +<a id="line-1715" name="line-1715"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1716" name="line-1716"></a> +<a id="line-1717" name="line-1717"></a><span class="w"> </span><span class="cm">/* Popup the File chooser dialog */</span> +<a id="line-1718" name="line-1718"></a><span class="w"> </span><span class="n">fs_dlg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Save Snapshot"</span><span class="p">),</span> +<a id="line-1719" name="line-1719"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1720" name="line-1720"></a><span class="w"> </span><span class="n">GTK_FILE_CHOOSER_ACTION_SAVE</span><span class="p">,</span> +<a id="line-1721" name="line-1721"></a><span class="w"> </span><span class="s">"gtk-cancel"</span><span class="p">,</span> +<a id="line-1722" name="line-1722"></a><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">,</span> +<a id="line-1723" name="line-1723"></a><span class="w"> </span><span class="s">"gtk-save"</span><span class="p">,</span> +<a id="line-1724" name="line-1724"></a><span class="w"> </span><span class="n">GTK_RESPONSE_ACCEPT</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1725" name="line-1725"></a> +<a id="line-1726" name="line-1726"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">first_item</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1727" name="line-1727"></a><span class="w"> </span><span class="n">def_filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">SNAPSHOT_DEF_FILENAME_FORMAT</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-1728" name="line-1728"></a> +<a id="line-1729" name="line-1729"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_current_name</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">fs_dlg</span><span class="p">),</span><span class="w"> </span><span class="n">def_filename</span><span class="p">);</span> +<a id="line-1730" name="line-1730"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">def_filename</span><span class="p">);</span> +<a id="line-1731" name="line-1731"></a> +<a id="line-1732" name="line-1732"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_current_folder</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">fs_dlg</span><span class="p">),</span> +<a id="line-1733" name="line-1733"></a><span class="w"> </span><span class="n">g_get_home_dir</span><span class="w"> </span><span class="p">());</span> +<a id="line-1734" name="line-1734"></a> +<a id="line-1735" name="line-1735"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_do_overwrite_confirmation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">fs_dlg</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1736" name="line-1736"></a> +<a id="line-1737" name="line-1737"></a><span class="w"> </span><span class="cm">/* extra widget */</span> +<a id="line-1738" name="line-1738"></a><span class="w"> </span><span class="n">vbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1739" name="line-1739"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1740" name="line-1740"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_extra_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">fs_dlg</span><span class="p">),</span><span class="w"> </span><span class="n">vbox</span><span class="p">);</span> +<a id="line-1741" name="line-1741"></a> +<a id="line-1742" name="line-1742"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">12</span><span class="p">);</span> +<a id="line-1743" name="line-1743"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1744" name="line-1744"></a> +<a id="line-1745" name="line-1745"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Image type:"</span><span class="p">));</span> +<a id="line-1746" name="line-1746"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span> +<a id="line-1747" name="line-1747"></a><span class="w"> </span><span class="n">label</span><span class="p">,</span> +<a id="line-1748" name="line-1748"></a><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1749" name="line-1749"></a> +<a id="line-1750" name="line-1750"></a><span class="w"> </span><span class="n">opt_menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_combo_box_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1751" name="line-1751"></a><span class="w"> </span><span class="n">gtk_combo_box_text_append_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX_TEXT</span><span class="w"> </span><span class="p">(</span><span class="n">opt_menu</span><span class="p">),</span><span class="w"> </span><span class="s">"png"</span><span class="p">);</span> +<a id="line-1752" name="line-1752"></a><span class="w"> </span><span class="n">gtk_combo_box_text_append_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX_TEXT</span><span class="w"> </span><span class="p">(</span><span class="n">opt_menu</span><span class="p">),</span><span class="w"> </span><span class="s">"jpeg"</span><span class="p">);</span> +<a id="line-1753" name="line-1753"></a><span class="w"> </span><span class="n">gtk_combo_box_text_append_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX_TEXT</span><span class="w"> </span><span class="p">(</span><span class="n">opt_menu</span><span class="p">),</span><span class="w"> </span><span class="s">"bmp"</span><span class="p">);</span> +<a id="line-1754" name="line-1754"></a><span class="w"> </span><span class="n">gtk_combo_box_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">opt_menu</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1755" name="line-1755"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">opt_menu</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1756" name="line-1756"></a> +<a id="line-1757" name="line-1757"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">opt_menu</span><span class="p">);</span> +<a id="line-1758" name="line-1758"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">);</span> +<a id="line-1759" name="line-1759"></a> +<a id="line-1760" name="line-1760"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">fs_dlg</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_ACCEPT</span><span class="p">)</span> +<a id="line-1761" name="line-1761"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1762" name="line-1762"></a><span class="w"> </span><span class="n">filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_get_filename</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">fs_dlg</span><span class="p">));</span> +<a id="line-1763" name="line-1763"></a><span class="w"> </span><span class="n">sel_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_combo_box_text_get_active_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX_TEXT</span><span class="w"> </span><span class="p">(</span><span class="n">opt_menu</span><span class="p">));</span> +<a id="line-1764" name="line-1764"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="w"> </span><span class="n">g_str_has_suffix</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">,</span><span class="w"> </span><span class="n">sel_type</span><span class="p">))</span> +<a id="line-1765" name="line-1765"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1766" name="line-1766"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">tmp</span><span class="p">;</span> +<a id="line-1767" name="line-1767"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">filename</span><span class="p">;</span> +<a id="line-1768" name="line-1768"></a><span class="w"> </span><span class="n">filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strjoin</span><span class="w"> </span><span class="p">(</span><span class="s">"."</span><span class="p">,</span><span class="w"> </span><span class="n">filename</span><span class="p">,</span><span class="w"> </span><span class="n">sel_type</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1769" name="line-1769"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-1770" name="line-1770"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1771" name="line-1771"></a><span class="w"> </span><span class="n">gdk_pixbuf_save</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">filename</span><span class="p">,</span><span class="w"> </span><span class="n">sel_type</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1772" name="line-1772"></a> +<a id="line-1773" name="line-1773"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">);</span> +<a id="line-1774" name="line-1774"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">sel_type</span><span class="p">);</span> +<a id="line-1775" name="line-1775"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1776" name="line-1776"></a> +<a id="line-1777" name="line-1777"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">fs_dlg</span><span class="p">);</span> +<a id="line-1778" name="line-1778"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">);</span> +<a id="line-1779" name="line-1779"></a><span class="p">}</span> +<a id="line-1780" name="line-1780"></a> +<a id="line-1781" name="line-1781"></a><span class="cm">/**</span> +<a id="line-1782" name="line-1782"></a><span class="cm"> * baobab_chart_is_frozen:</span> +<a id="line-1783" name="line-1783"></a><span class="cm"> * @chart: the #BaobabChart to ask if frozen.</span> +<a id="line-1784" name="line-1784"></a><span class="cm"> *</span> +<a id="line-1785" name="line-1785"></a><span class="cm"> * Returns a boolean telling whether the chart is in a frozen state, meanning</span> +<a id="line-1786" name="line-1786"></a><span class="cm"> * that no actions should be taken uppon it.</span> +<a id="line-1787" name="line-1787"></a><span class="cm"> *</span> +<a id="line-1788" name="line-1788"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1789" name="line-1789"></a><span class="cm"> **/</span> +<a id="line-1790" name="line-1790"></a><span class="n">gboolean</span> +<a id="line-1791" name="line-1791"></a><span class="nf">baobab_chart_is_frozen</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1792" name="line-1792"></a><span class="p">{</span> +<a id="line-1793" name="line-1793"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1794" name="line-1794"></a> +<a id="line-1795" name="line-1795"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1796" name="line-1796"></a> +<a id="line-1797" name="line-1797"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1798" name="line-1798"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_frozen</span><span class="p">;</span> +<a id="line-1799" name="line-1799"></a><span class="p">}</span> +<a id="line-1800" name="line-1800"></a> +<a id="line-1801" name="line-1801"></a><span class="cm">/**</span> +<a id="line-1802" name="line-1802"></a><span class="cm"> * baobab_chart_is_frozen:</span> +<a id="line-1803" name="line-1803"></a><span class="cm"> * @chart: the #BaobabChart to obtain the highlighted it from.</span> +<a id="line-1804" name="line-1804"></a><span class="cm"> *</span> +<a id="line-1805" name="line-1805"></a><span class="cm"> * Returns a BaobabChartItem corresponding to the item that currently has mouse</span> +<a id="line-1806" name="line-1806"></a><span class="cm"> * pointer over, or NULL if no item is highlighted.</span> +<a id="line-1807" name="line-1807"></a><span class="cm"> *</span> +<a id="line-1808" name="line-1808"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1809" name="line-1809"></a><span class="cm"> **/</span> +<a id="line-1810" name="line-1810"></a><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span> +<a id="line-1811" name="line-1811"></a><span class="nf">baobab_chart_get_highlighted_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1812" name="line-1812"></a><span class="p">{</span> +<a id="line-1813" name="line-1813"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1814" name="line-1814"></a> +<a id="line-1815" name="line-1815"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1816" name="line-1816"></a> +<a id="line-1817" name="line-1817"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1818" name="line-1818"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">?</span> +<a id="line-1819" name="line-1819"></a><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1820" name="line-1820"></a><span class="p">}</span> +<a id="line-1821" name="line-1821"></a> +<a id="line-1822" name="line-1822"></a><span class="cm">/**</span> +<a id="line-1823" name="line-1823"></a><span class="cm"> * baobab_chart_can_zoom_in:</span> +<a id="line-1824" name="line-1824"></a><span class="cm"> * @chart: the #BaobabChart to ask if can be zoomed in.</span> +<a id="line-1825" name="line-1825"></a><span class="cm"> *</span> +<a id="line-1826" name="line-1826"></a><span class="cm"> * Returns a boolean telling whether the chart can be zoomed in, given its current</span> +<a id="line-1827" name="line-1827"></a><span class="cm"> * visualization conditions.</span> +<a id="line-1828" name="line-1828"></a><span class="cm"> *</span> +<a id="line-1829" name="line-1829"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1830" name="line-1830"></a><span class="cm"> **/</span> +<a id="line-1831" name="line-1831"></a><span class="n">gboolean</span> +<a id="line-1832" name="line-1832"></a><span class="nf">baobab_chart_can_zoom_in</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1833" name="line-1833"></a><span class="p">{</span> +<a id="line-1834" name="line-1834"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1835" name="line-1835"></a><span class="w"> </span><span class="n">BaobabChartClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">;</span> +<a id="line-1836" name="line-1836"></a> +<a id="line-1837" name="line-1837"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1838" name="line-1838"></a> +<a id="line-1839" name="line-1839"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1840" name="line-1840"></a><span class="w"> </span><span class="n">class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1841" name="line-1841"></a> +<a id="line-1842" name="line-1842"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="o">-></span><span class="n">can_zoom_in</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1843" name="line-1843"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">can_zoom_in</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1844" name="line-1844"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1845" name="line-1845"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1846" name="line-1846"></a><span class="p">}</span> +<a id="line-1847" name="line-1847"></a> +<a id="line-1848" name="line-1848"></a><span class="cm">/**</span> +<a id="line-1849" name="line-1849"></a><span class="cm"> * baobab_chart_can_zoom_out:</span> +<a id="line-1850" name="line-1850"></a><span class="cm"> * @chart: the #BaobabChart to ask if can be zoomed out.</span> +<a id="line-1851" name="line-1851"></a><span class="cm"> *</span> +<a id="line-1852" name="line-1852"></a><span class="cm"> * Returns a boolean telling whether the chart can be zoomed out, given its current</span> +<a id="line-1853" name="line-1853"></a><span class="cm"> * visualization conditions.</span> +<a id="line-1854" name="line-1854"></a><span class="cm"> *</span> +<a id="line-1855" name="line-1855"></a><span class="cm"> * Fails if @chart is not a #BaobabChart.</span> +<a id="line-1856" name="line-1856"></a><span class="cm"> **/</span> +<a id="line-1857" name="line-1857"></a><span class="n">gboolean</span> +<a id="line-1858" name="line-1858"></a><span class="nf">baobab_chart_can_zoom_out</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1859" name="line-1859"></a><span class="p">{</span> +<a id="line-1860" name="line-1860"></a><span class="w"> </span><span class="n">BaobabChartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1861" name="line-1861"></a><span class="w"> </span><span class="n">BaobabChartClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">;</span> +<a id="line-1862" name="line-1862"></a> +<a id="line-1863" name="line-1863"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_IS_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1864" name="line-1864"></a> +<a id="line-1865" name="line-1865"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1866" name="line-1866"></a><span class="w"> </span><span class="n">class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1867" name="line-1867"></a> +<a id="line-1868" name="line-1868"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="o">-></span><span class="n">can_zoom_out</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1869" name="line-1869"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">class</span><span class="o">-></span><span class="n">can_zoom_out</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1870" name="line-1870"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1871" name="line-1871"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">max_depth</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">BAOBAB_CHART_MAX_DEPTH</span><span class="p">);</span> +<a id="line-1872" name="line-1872"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/10.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/10.html new file mode 100644 index 00000000..3f5494a4 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/10.html @@ -0,0 +1,3385 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: gsearchtool/mate-submodules/libegg/eggdesktopfile.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> eggdesktopfile.c</p> +<a href="10.html#line-497"> variableScope 497</a><a href="10.html#line-497"> variableScope 497</a><a href="10.html#line-498"> variableScope 498</a><a href="10.html#line-498"> variableScope 498</a><a href="10.html#line-500"> variableScope 500</a><a href="10.html#line-622"> variableScope 622</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span> +<span class="normal">1328</span> +<span class="normal">1329</span> +<span class="normal">1330</span> +<span class="normal">1331</span> +<span class="normal">1332</span> +<span class="normal">1333</span> +<span class="normal">1334</span> +<span class="normal">1335</span> +<span class="normal">1336</span> +<span class="normal">1337</span> +<span class="normal">1338</span> +<span class="normal">1339</span> +<span class="normal">1340</span> +<span class="normal">1341</span> +<span class="normal">1342</span> +<span class="normal">1343</span> +<span class="normal">1344</span> +<span class="normal">1345</span> +<span class="normal">1346</span> +<span class="normal">1347</span> +<span class="normal">1348</span> +<span class="normal">1349</span> +<span class="normal">1350</span> +<span class="normal">1351</span> +<span class="normal">1352</span> +<span class="normal">1353</span> +<span class="normal">1354</span> +<span class="normal">1355</span> +<span class="normal">1356</span> +<span class="normal">1357</span> +<span class="normal">1358</span> +<span class="normal">1359</span> +<span class="normal">1360</span> +<span class="normal">1361</span> +<span class="normal">1362</span> +<span class="normal">1363</span> +<span class="normal">1364</span> +<span class="normal">1365</span> +<span class="normal">1366</span> +<span class="normal">1367</span> +<span class="normal">1368</span> +<span class="normal">1369</span> +<span class="normal">1370</span> +<span class="normal">1371</span> +<span class="normal">1372</span> +<span class="normal">1373</span> +<span class="normal">1374</span> +<span class="normal">1375</span> +<span class="normal">1376</span> +<span class="normal">1377</span> +<span class="normal">1378</span> +<span class="normal">1379</span> +<span class="normal">1380</span> +<span class="normal">1381</span> +<span class="normal">1382</span> +<span class="normal">1383</span> +<span class="normal">1384</span> +<span class="normal">1385</span> +<span class="normal">1386</span> +<span class="normal">1387</span> +<span class="normal">1388</span> +<span class="normal">1389</span> +<span class="normal">1390</span> +<span class="normal">1391</span> +<span class="normal">1392</span> +<span class="normal">1393</span> +<span class="normal">1394</span> +<span class="normal">1395</span> +<span class="normal">1396</span> +<span class="normal">1397</span> +<span class="normal">1398</span> +<span class="normal">1399</span> +<span class="normal">1400</span> +<span class="normal">1401</span> +<span class="normal">1402</span> +<span class="normal">1403</span> +<span class="normal">1404</span> +<span class="normal">1405</span> +<span class="normal">1406</span> +<span class="normal">1407</span> +<span class="normal">1408</span> +<span class="normal">1409</span> +<span class="normal">1410</span> +<span class="normal">1411</span> +<span class="normal">1412</span> +<span class="normal">1413</span> +<span class="normal">1414</span> +<span class="normal">1415</span> +<span class="normal">1416</span> +<span class="normal">1417</span> +<span class="normal">1418</span> +<span class="normal">1419</span> +<span class="normal">1420</span> +<span class="normal">1421</span> +<span class="normal">1422</span> +<span class="normal">1423</span> +<span class="normal">1424</span> +<span class="normal">1425</span> +<span class="normal">1426</span> +<span class="normal">1427</span> +<span class="normal">1428</span> +<span class="normal">1429</span> +<span class="normal">1430</span> +<span class="normal">1431</span> +<span class="normal">1432</span> +<span class="normal">1433</span> +<span class="normal">1434</span> +<span class="normal">1435</span> +<span class="normal">1436</span> +<span class="normal">1437</span> +<span class="normal">1438</span> +<span class="normal">1439</span> +<span class="normal">1440</span> +<span class="normal">1441</span> +<span class="normal">1442</span> +<span class="normal">1443</span> +<span class="normal">1444</span> +<span class="normal">1445</span> +<span class="normal">1446</span> +<span class="normal">1447</span> +<span class="normal">1448</span> +<span class="normal">1449</span> +<span class="normal">1450</span> +<span class="normal">1451</span> +<span class="normal">1452</span> +<span class="normal">1453</span> +<span class="normal">1454</span> +<span class="normal">1455</span> +<span class="normal">1456</span> +<span class="normal">1457</span> +<span class="normal">1458</span> +<span class="normal">1459</span> +<span class="normal">1460</span> +<span class="normal">1461</span> +<span class="normal">1462</span> +<span class="normal">1463</span> +<span class="normal">1464</span> +<span class="normal">1465</span> +<span class="normal">1466</span> +<span class="normal">1467</span> +<span class="normal">1468</span> +<span class="normal">1469</span> +<span class="normal">1470</span> +<span class="normal">1471</span> +<span class="normal">1472</span> +<span class="normal">1473</span> +<span class="normal">1474</span> +<span class="normal">1475</span> +<span class="normal">1476</span> +<span class="normal">1477</span> +<span class="normal">1478</span> +<span class="normal">1479</span> +<span class="normal">1480</span> +<span class="normal">1481</span> +<span class="normal">1482</span> +<span class="normal">1483</span> +<span class="normal">1484</span> +<span class="normal">1485</span> +<span class="normal">1486</span> +<span class="normal">1487</span> +<span class="normal">1488</span> +<span class="normal">1489</span> +<span class="normal">1490</span> +<span class="normal">1491</span> +<span class="normal">1492</span> +<span class="normal">1493</span> +<span class="normal">1494</span> +<span class="normal">1495</span> +<span class="normal">1496</span> +<span class="normal">1497</span> +<span class="normal">1498</span> +<span class="normal">1499</span> +<span class="normal">1500</span> +<span class="normal">1501</span> +<span class="normal">1502</span> +<span class="normal">1503</span> +<span class="normal">1504</span> +<span class="normal">1505</span> +<span class="normal">1506</span> +<span class="normal">1507</span> +<span class="normal">1508</span> +<span class="normal">1509</span> +<span class="normal">1510</span> +<span class="normal">1511</span> +<span class="normal">1512</span> +<span class="normal">1513</span> +<span class="normal">1514</span> +<span class="normal">1515</span> +<span class="normal">1516</span> +<span class="normal">1517</span> +<span class="normal">1518</span> +<span class="normal">1519</span> +<span class="normal">1520</span> +<span class="normal">1521</span> +<span class="normal">1522</span> +<span class="normal">1523</span> +<span class="normal">1524</span> +<span class="normal">1525</span> +<span class="normal">1526</span> +<span class="normal">1527</span> +<span class="normal">1528</span> +<span class="normal">1529</span> +<span class="normal">1530</span> +<span class="normal">1531</span> +<span class="normal">1532</span> +<span class="normal">1533</span> +<span class="normal">1534</span> +<span class="normal">1535</span> +<span class="normal">1536</span> +<span class="normal">1537</span> +<span class="normal">1538</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* eggdesktopfile.c - Freedesktop.Org Desktop Files</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2007 Novell, Inc.</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * Based on mate-desktop-item.c</span> +<a id="line-5" name="line-5"></a><span class="cm"> * Copyright (C) 1999, 2000 Red Hat Inc.</span> +<a id="line-6" name="line-6"></a><span class="cm"> * Copyright (C) 2001 George Lebl</span> +<a id="line-7" name="line-7"></a><span class="cm"> *</span> +<a id="line-8" name="line-8"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * modify it under the terms of the GNU Lesser General Public License</span> +<a id="line-10" name="line-10"></a><span class="cm"> * as published by the Free Software Foundation; either version 2 of</span> +<a id="line-11" name="line-11"></a><span class="cm"> * the License, or (at your option) any later version.</span> +<a id="line-12" name="line-12"></a><span class="cm"> *</span> +<a id="line-13" name="line-13"></a><span class="cm"> * This library is distributed in the hope that it will be useful, but</span> +<a id="line-14" name="line-14"></a><span class="cm"> * WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-15" name="line-15"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> +<a id="line-16" name="line-16"></a><span class="cm"> * Lesser General Public License for more details.</span> +<a id="line-17" name="line-17"></a><span class="cm"> *</span> +<a id="line-18" name="line-18"></a><span class="cm"> * You should have received a copy of the GNU Lesser General Public</span> +<a id="line-19" name="line-19"></a><span class="cm"> * License along with this library; see the file COPYING.LIB. If not,</span> +<a id="line-20" name="line-20"></a><span class="cm"> * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,</span> +<a id="line-21" name="line-21"></a><span class="cm"> * Boston, MA 02110-1301, USA.</span> +<a id="line-22" name="line-22"></a><span class="cm"> */</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"config.h"</span> +<a id="line-26" name="line-26"></a><span class="cp">#endif</span> +<a id="line-27" name="line-27"></a> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"eggdesktopfile.h"</span> +<a id="line-29" name="line-29"></a> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><unistd.h></span> +<a id="line-32" name="line-32"></a> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-35" name="line-35"></a> +<a id="line-36" name="line-36"></a><span class="cp">#if defined(GDK_WINDOWING_X11) || defined(HAVE_X11)</span> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkx.h></span> +<a id="line-38" name="line-38"></a><span class="cp">#endif</span> +<a id="line-39" name="line-39"></a> +<a id="line-40" name="line-40"></a><span class="k">struct</span><span class="w"> </span><span class="nc">EggDesktopFile</span><span class="w"> </span><span class="p">{</span> +<a id="line-41" name="line-41"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">key_file</span><span class="p">;</span> +<a id="line-42" name="line-42"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">;</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">icon</span><span class="p">;</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="n">EggDesktopFileType</span><span class="w"> </span><span class="n">type</span><span class="p">;</span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">document_code</span><span class="p">;</span> +<a id="line-47" name="line-47"></a><span class="p">};</span> +<a id="line-48" name="line-48"></a> +<a id="line-49" name="line-49"></a><span class="cm">/**</span> +<a id="line-50" name="line-50"></a><span class="cm"> * egg_desktop_file_new:</span> +<a id="line-51" name="line-51"></a><span class="cm"> * @desktop_file_path: path to a Freedesktop-style Desktop file</span> +<a id="line-52" name="line-52"></a><span class="cm"> * @error: error pointer</span> +<a id="line-53" name="line-53"></a><span class="cm"> *</span> +<a id="line-54" name="line-54"></a><span class="cm"> * Creates a new #EggDesktopFile for @desktop_file.</span> +<a id="line-55" name="line-55"></a><span class="cm"> *</span> +<a id="line-56" name="line-56"></a><span class="cm"> * Return value: the new #EggDesktopFile, or %NULL on error.</span> +<a id="line-57" name="line-57"></a><span class="cm"> **/</span> +<a id="line-58" name="line-58"></a><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span> +<a id="line-59" name="line-59"></a><span class="nf">egg_desktop_file_new</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file_path</span><span class="p">,</span><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-60" name="line-60"></a><span class="p">{</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">key_file</span><span class="p">;</span> +<a id="line-62" name="line-62"></a> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">key_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_key_file_load_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file_path</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">))</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="p">{</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">);</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="p">}</span> +<a id="line-69" name="line-69"></a> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">egg_desktop_file_new_from_key_file</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file_path</span><span class="p">,</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-72" name="line-72"></a><span class="p">}</span> +<a id="line-73" name="line-73"></a> +<a id="line-74" name="line-74"></a><span class="cm">/**</span> +<a id="line-75" name="line-75"></a><span class="cm"> * egg_desktop_file_new_from_data_dirs:</span> +<a id="line-76" name="line-76"></a><span class="cm"> * @desktop_file_path: relative path to a Freedesktop-style Desktop file</span> +<a id="line-77" name="line-77"></a><span class="cm"> * @error: error pointer</span> +<a id="line-78" name="line-78"></a><span class="cm"> *</span> +<a id="line-79" name="line-79"></a><span class="cm"> * Looks for @desktop_file_path in the paths returned from</span> +<a id="line-80" name="line-80"></a><span class="cm"> * g_get_user_data_dir() and g_get_system_data_dirs(), and creates</span> +<a id="line-81" name="line-81"></a><span class="cm"> * a new #EggDesktopFile from it.</span> +<a id="line-82" name="line-82"></a><span class="cm"> *</span> +<a id="line-83" name="line-83"></a><span class="cm"> * Return value: the new #EggDesktopFile, or %NULL on error.</span> +<a id="line-84" name="line-84"></a><span class="cm"> **/</span> +<a id="line-85" name="line-85"></a><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span> +<a id="line-86" name="line-86"></a><span class="nf">egg_desktop_file_new_from_data_dirs</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file_path</span><span class="p">,</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-88" name="line-88"></a><span class="p">{</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">;</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">key_file</span><span class="p">;</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">full_path</span><span class="p">;</span> +<a id="line-92" name="line-92"></a> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">key_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_key_file_load_from_data_dirs</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file_path</span><span class="p">,</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="o">&</span><span class="n">full_path</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">))</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="p">{</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">);</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="p">}</span> +<a id="line-100" name="line-100"></a> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">desktop_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_desktop_file_new_from_key_file</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">full_path</span><span class="p">,</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">full_path</span><span class="p">);</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">desktop_file</span><span class="p">;</span> +<a id="line-106" name="line-106"></a><span class="p">}</span> +<a id="line-107" name="line-107"></a> +<a id="line-108" name="line-108"></a><span class="cm">/**</span> +<a id="line-109" name="line-109"></a><span class="cm"> * egg_desktop_file_new_from_dirs:</span> +<a id="line-110" name="line-110"></a><span class="cm"> * @desktop_file_path: relative path to a Freedesktop-style Desktop file</span> +<a id="line-111" name="line-111"></a><span class="cm"> * @search_dirs: NULL-terminated array of directories to search</span> +<a id="line-112" name="line-112"></a><span class="cm"> * @error: error pointer</span> +<a id="line-113" name="line-113"></a><span class="cm"> *</span> +<a id="line-114" name="line-114"></a><span class="cm"> * Looks for @desktop_file_path in the paths returned from</span> +<a id="line-115" name="line-115"></a><span class="cm"> * g_get_user_data_dir() and g_get_system_data_dirs(), and creates</span> +<a id="line-116" name="line-116"></a><span class="cm"> * a new #EggDesktopFile from it.</span> +<a id="line-117" name="line-117"></a><span class="cm"> *</span> +<a id="line-118" name="line-118"></a><span class="cm"> * Return value: the new #EggDesktopFile, or %NULL on error.</span> +<a id="line-119" name="line-119"></a><span class="cm"> **/</span> +<a id="line-120" name="line-120"></a><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span> +<a id="line-121" name="line-121"></a><span class="nf">egg_desktop_file_new_from_dirs</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file_path</span><span class="p">,</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">search_dirs</span><span class="p">,</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-124" name="line-124"></a><span class="p">{</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">;</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">key_file</span><span class="p">;</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">full_path</span><span class="p">;</span> +<a id="line-128" name="line-128"></a> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="n">key_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_key_file_load_from_dirs</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file_path</span><span class="p">,</span><span class="w"> </span><span class="n">search_dirs</span><span class="p">,</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="o">&</span><span class="n">full_path</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">))</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="p">{</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">);</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="p">}</span> +<a id="line-136" name="line-136"></a> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">desktop_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_desktop_file_new_from_key_file</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">full_path</span><span class="p">,</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">full_path</span><span class="p">);</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">desktop_file</span><span class="p">;</span> +<a id="line-142" name="line-142"></a><span class="p">}</span> +<a id="line-143" name="line-143"></a> +<a id="line-144" name="line-144"></a><span class="cm">/**</span> +<a id="line-145" name="line-145"></a><span class="cm"> * egg_desktop_file_new_from_key_file:</span> +<a id="line-146" name="line-146"></a><span class="cm"> * @key_file: a #GKeyFile representing a desktop file</span> +<a id="line-147" name="line-147"></a><span class="cm"> * @source: the path or URI that @key_file was loaded from, or %NULL</span> +<a id="line-148" name="line-148"></a><span class="cm"> * @error: error pointer</span> +<a id="line-149" name="line-149"></a><span class="cm"> *</span> +<a id="line-150" name="line-150"></a><span class="cm"> * Creates a new #EggDesktopFile for @key_file. Assumes ownership of</span> +<a id="line-151" name="line-151"></a><span class="cm"> * @key_file (on success or failure); you should consider @key_file to</span> +<a id="line-152" name="line-152"></a><span class="cm"> * be freed after calling this function.</span> +<a id="line-153" name="line-153"></a><span class="cm"> *</span> +<a id="line-154" name="line-154"></a><span class="cm"> * Return value: the new #EggDesktopFile, or %NULL on error.</span> +<a id="line-155" name="line-155"></a><span class="cm"> **/</span> +<a id="line-156" name="line-156"></a><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span> +<a id="line-157" name="line-157"></a><span class="nf">egg_desktop_file_new_from_key_file</span><span class="w"> </span><span class="p">(</span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">key_file</span><span class="p">,</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-160" name="line-160"></a><span class="p">{</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">;</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">version</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">type</span><span class="p">;</span> +<a id="line-163" name="line-163"></a> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_key_file_has_group</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">))</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="p">{</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR</span><span class="p">,</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR_INVALID</span><span class="p">,</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"File is not a valid .desktop file"</span><span class="p">));</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">);</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="p">}</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">version</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_value</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_VERSION</span><span class="p">,</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">version</span><span class="p">)</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="p">{</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">version_num</span><span class="p">;</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">end</span><span class="p">;</span> +<a id="line-180" name="line-180"></a> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">version_num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ascii_strtod</span><span class="w"> </span><span class="p">(</span><span class="n">version</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">end</span><span class="p">)</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="p">{</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Invalid Version string '%s' in %s"</span><span class="p">,</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">version</span><span class="p">,</span><span class="w"> </span><span class="n">source</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">source</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"(unknown)"</span><span class="p">);</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="p">}</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">version_num</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mf">1.0</span><span class="p">)</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="p">{</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="cm">/* Translators: Version here is capitalized because it refers to a</span> +<a id="line-190" name="line-190"></a><span class="cm"> * field in the desktop file */</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR</span><span class="p">,</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR_INVALID</span><span class="p">,</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unrecognized desktop file Version '%s'"</span><span class="p">),</span><span class="w"> </span><span class="n">version</span><span class="p">);</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">version</span><span class="p">);</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">);</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="p">}</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">version</span><span class="p">);</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="p">}</span> +<a id="line-200" name="line-200"></a> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">desktop_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new0</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">key_file</span><span class="p">;</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_path_is_absolute</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">))</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_to_uri</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="k">else</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-208" name="line-208"></a> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">name</span><span class="p">)</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="p">{</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">egg_desktop_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">);</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="p">}</span> +<a id="line-216" name="line-216"></a> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_TYPE</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">type</span><span class="p">)</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="p">{</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">egg_desktop_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">);</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="p">}</span> +<a id="line-224" name="line-224"></a> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="p">,</span><span class="w"> </span><span class="s">"Application"</span><span class="p">))</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="p">{</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">exec</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-228" name="line-228"></a> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_TYPE_APPLICATION</span><span class="p">;</span> +<a id="line-230" name="line-230"></a> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">exec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_EXEC</span><span class="p">,</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">exec</span><span class="p">)</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="p">{</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">egg_desktop_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">);</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="p">);</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="p">}</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="cm">/* See if it takes paths or URIs or neither */</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">exec</span><span class="p">;</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span><span class="w"> </span><span class="n">p</span><span class="o">++</span><span class="p">)</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="p">{</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'%'</span><span class="p">)</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="p">{</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">strchr</span><span class="w"> </span><span class="p">(</span><span class="s">"FfUu"</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="p">{</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">document_code</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">[</span><span class="mi">1</span><span class="p">];</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="p">}</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">p</span><span class="o">++</span><span class="p">;</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="p">}</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="p">}</span> +<a id="line-255" name="line-255"></a> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">exec</span><span class="p">);</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="p">}</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="p">,</span><span class="w"> </span><span class="s">"Link"</span><span class="p">))</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="p">{</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">url</span><span class="p">;</span> +<a id="line-261" name="line-261"></a> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_TYPE_LINK</span><span class="p">;</span> +<a id="line-263" name="line-263"></a> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">url</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_URL</span><span class="p">,</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">url</span><span class="p">)</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="p">{</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">egg_desktop_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">);</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="p">);</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="p">}</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">url</span><span class="p">);</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="p">}</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="p">,</span><span class="w"> </span><span class="s">"Directory"</span><span class="p">))</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_TYPE_DIRECTORY</span><span class="p">;</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="k">else</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_TYPE_UNRECOGNIZED</span><span class="p">;</span> +<a id="line-280" name="line-280"></a> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="p">);</span> +<a id="line-282" name="line-282"></a> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="cm">/* Check the Icon key */</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_ICON</span><span class="p">,</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">g_path_is_absolute</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">))</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="p">{</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">ext</span><span class="p">;</span> +<a id="line-291" name="line-291"></a> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="cm">/* Lots of .desktop files still get this wrong */</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">ext</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strrchr</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">,</span><span class="w"> </span><span class="sc">'.'</span><span class="p">);</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ext</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">ext</span><span class="p">,</span><span class="w"> </span><span class="s">".png"</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">ext</span><span class="p">,</span><span class="w"> </span><span class="s">".xpm"</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">ext</span><span class="p">,</span><span class="w"> </span><span class="s">".svg"</span><span class="p">)))</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="p">{</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Desktop file '%s' has malformed Icon key '%s'"</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="s">"(should not include extension)"</span><span class="p">,</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">source</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">source</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"(unknown)"</span><span class="p">,</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">);</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="o">*</span><span class="n">ext</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="p">}</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="p">}</span> +<a id="line-305" name="line-305"></a> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">desktop_file</span><span class="p">;</span> +<a id="line-307" name="line-307"></a><span class="p">}</span> +<a id="line-308" name="line-308"></a> +<a id="line-309" name="line-309"></a><span class="cm">/**</span> +<a id="line-310" name="line-310"></a><span class="cm"> * egg_desktop_file_free:</span> +<a id="line-311" name="line-311"></a><span class="cm"> * @desktop_file: an #EggDesktopFile</span> +<a id="line-312" name="line-312"></a><span class="cm"> *</span> +<a id="line-313" name="line-313"></a><span class="cm"> * Frees @desktop_file.</span> +<a id="line-314" name="line-314"></a><span class="cm"> **/</span> +<a id="line-315" name="line-315"></a><span class="kt">void</span> +<a id="line-316" name="line-316"></a><span class="nf">egg_desktop_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-317" name="line-317"></a><span class="p">{</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">);</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">source</span><span class="p">);</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">);</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">);</span> +<a id="line-323" name="line-323"></a><span class="p">}</span> +<a id="line-324" name="line-324"></a> +<a id="line-325" name="line-325"></a><span class="cm">/**</span> +<a id="line-326" name="line-326"></a><span class="cm"> * egg_desktop_file_get_source:</span> +<a id="line-327" name="line-327"></a><span class="cm"> * @desktop_file: an #EggDesktopFile</span> +<a id="line-328" name="line-328"></a><span class="cm"> *</span> +<a id="line-329" name="line-329"></a><span class="cm"> * Gets the URI that @desktop_file was loaded from.</span> +<a id="line-330" name="line-330"></a><span class="cm"> *</span> +<a id="line-331" name="line-331"></a><span class="cm"> * Return value: @desktop_file's source URI</span> +<a id="line-332" name="line-332"></a><span class="cm"> **/</span> +<a id="line-333" name="line-333"></a><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-334" name="line-334"></a><span class="nf">egg_desktop_file_get_source</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-335" name="line-335"></a><span class="p">{</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">source</span><span class="p">;</span> +<a id="line-337" name="line-337"></a><span class="p">}</span> +<a id="line-338" name="line-338"></a> +<a id="line-339" name="line-339"></a><span class="cm">/**</span> +<a id="line-340" name="line-340"></a><span class="cm"> * egg_desktop_file_get_desktop_file_type:</span> +<a id="line-341" name="line-341"></a><span class="cm"> * @desktop_file: an #EggDesktopFile</span> +<a id="line-342" name="line-342"></a><span class="cm"> *</span> +<a id="line-343" name="line-343"></a><span class="cm"> * Gets the desktop file type of @desktop_file.</span> +<a id="line-344" name="line-344"></a><span class="cm"> *</span> +<a id="line-345" name="line-345"></a><span class="cm"> * Return value: @desktop_file's type</span> +<a id="line-346" name="line-346"></a><span class="cm"> **/</span> +<a id="line-347" name="line-347"></a><span class="n">EggDesktopFileType</span> +<a id="line-348" name="line-348"></a><span class="nf">egg_desktop_file_get_desktop_file_type</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-349" name="line-349"></a><span class="p">{</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">type</span><span class="p">;</span> +<a id="line-351" name="line-351"></a><span class="p">}</span> +<a id="line-352" name="line-352"></a> +<a id="line-353" name="line-353"></a><span class="cm">/**</span> +<a id="line-354" name="line-354"></a><span class="cm"> * egg_desktop_file_get_name:</span> +<a id="line-355" name="line-355"></a><span class="cm"> * @desktop_file: an #EggDesktopFile</span> +<a id="line-356" name="line-356"></a><span class="cm"> *</span> +<a id="line-357" name="line-357"></a><span class="cm"> * Gets the (localized) value of @desktop_file's "Name" key.</span> +<a id="line-358" name="line-358"></a><span class="cm"> *</span> +<a id="line-359" name="line-359"></a><span class="cm"> * Return value: the application/link name</span> +<a id="line-360" name="line-360"></a><span class="cm"> **/</span> +<a id="line-361" name="line-361"></a><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-362" name="line-362"></a><span class="nf">egg_desktop_file_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-363" name="line-363"></a><span class="p">{</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">name</span><span class="p">;</span> +<a id="line-365" name="line-365"></a><span class="p">}</span> +<a id="line-366" name="line-366"></a> +<a id="line-367" name="line-367"></a><span class="cm">/**</span> +<a id="line-368" name="line-368"></a><span class="cm"> * egg_desktop_file_get_icon:</span> +<a id="line-369" name="line-369"></a><span class="cm"> * @desktop_file: an #EggDesktopFile</span> +<a id="line-370" name="line-370"></a><span class="cm"> *</span> +<a id="line-371" name="line-371"></a><span class="cm"> * Gets the value of @desktop_file's "Icon" key.</span> +<a id="line-372" name="line-372"></a><span class="cm"> *</span> +<a id="line-373" name="line-373"></a><span class="cm"> * If the icon string is a full path (that is, if g_path_is_absolute()</span> +<a id="line-374" name="line-374"></a><span class="cm"> * returns %TRUE when called on it), it points to a file containing an</span> +<a id="line-375" name="line-375"></a><span class="cm"> * unthemed icon. If the icon string is not a full path, it is the</span> +<a id="line-376" name="line-376"></a><span class="cm"> * name of a themed icon, which can be looked up with %GtkIconTheme,</span> +<a id="line-377" name="line-377"></a><span class="cm"> * or passed directly to a theme-aware widget like %GtkImage or</span> +<a id="line-378" name="line-378"></a><span class="cm"> * %GtkCellRendererPixbuf.</span> +<a id="line-379" name="line-379"></a><span class="cm"> *</span> +<a id="line-380" name="line-380"></a><span class="cm"> * Return value: the icon path or name</span> +<a id="line-381" name="line-381"></a><span class="cm"> **/</span> +<a id="line-382" name="line-382"></a><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-383" name="line-383"></a><span class="nf">egg_desktop_file_get_icon</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-384" name="line-384"></a><span class="p">{</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">;</span> +<a id="line-386" name="line-386"></a><span class="p">}</span> +<a id="line-387" name="line-387"></a> +<a id="line-388" name="line-388"></a><span class="n">gboolean</span> +<a id="line-389" name="line-389"></a><span class="nf">egg_desktop_file_has_key</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-392" name="line-392"></a><span class="p">{</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_key_file_has_key</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">,</span> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-396" name="line-396"></a><span class="p">}</span> +<a id="line-397" name="line-397"></a> +<a id="line-398" name="line-398"></a><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-399" name="line-399"></a><span class="nf">egg_desktop_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-402" name="line-402"></a><span class="p">{</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">,</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-406" name="line-406"></a><span class="p">}</span> +<a id="line-407" name="line-407"></a> +<a id="line-408" name="line-408"></a><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-409" name="line-409"></a><span class="nf">egg_desktop_file_get_locale_string</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">locale</span><span class="p">,</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-413" name="line-413"></a><span class="p">{</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_key_file_get_locale_string</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">,</span><span class="w"> </span><span class="n">locale</span><span class="p">,</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-417" name="line-417"></a><span class="p">}</span> +<a id="line-418" name="line-418"></a> +<a id="line-419" name="line-419"></a><span class="n">gboolean</span> +<a id="line-420" name="line-420"></a><span class="nf">egg_desktop_file_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-423" name="line-423"></a><span class="p">{</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_key_file_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">,</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-427" name="line-427"></a><span class="p">}</span> +<a id="line-428" name="line-428"></a> +<a id="line-429" name="line-429"></a><span class="kt">double</span> +<a id="line-430" name="line-430"></a><span class="nf">egg_desktop_file_get_numeric</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-433" name="line-433"></a><span class="p">{</span> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_key_file_get_double</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">,</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-437" name="line-437"></a><span class="p">}</span> +<a id="line-438" name="line-438"></a> +<a id="line-439" name="line-439"></a><span class="kt">int</span> +<a id="line-440" name="line-440"></a><span class="nf">egg_desktop_file_get_integer</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-443" name="line-443"></a><span class="p">{</span> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_key_file_get_integer</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">,</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-447" name="line-447"></a><span class="p">}</span> +<a id="line-448" name="line-448"></a> +<a id="line-449" name="line-449"></a><span class="kt">char</span><span class="w"> </span><span class="o">**</span> +<a id="line-450" name="line-450"></a><span class="nf">egg_desktop_file_get_string_list</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="o">*</span><span class="n">length</span><span class="p">,</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-454" name="line-454"></a><span class="p">{</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_key_file_get_string_list</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">,</span><span class="w"> </span><span class="n">length</span><span class="p">,</span> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-458" name="line-458"></a><span class="p">}</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="kt">char</span><span class="w"> </span><span class="o">**</span> +<a id="line-461" name="line-461"></a><span class="nf">egg_desktop_file_get_locale_string_list</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">locale</span><span class="p">,</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="o">*</span><span class="n">length</span><span class="p">,</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-466" name="line-466"></a><span class="p">{</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_key_file_get_locale_string_list</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">,</span> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="n">locale</span><span class="p">,</span><span class="w"> </span><span class="n">length</span><span class="p">,</span> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-471" name="line-471"></a><span class="p">}</span> +<a id="line-472" name="line-472"></a> +<a id="line-473" name="line-473"></a><span class="cm">/**</span> +<a id="line-474" name="line-474"></a><span class="cm"> * egg_desktop_file_can_launch:</span> +<a id="line-475" name="line-475"></a><span class="cm"> * @desktop_file: an #EggDesktopFile</span> +<a id="line-476" name="line-476"></a><span class="cm"> * @desktop_environment: the name of the running desktop environment,</span> +<a id="line-477" name="line-477"></a><span class="cm"> * or %NULL</span> +<a id="line-478" name="line-478"></a><span class="cm"> *</span> +<a id="line-479" name="line-479"></a><span class="cm"> * Tests if @desktop_file can/should be launched in the current</span> +<a id="line-480" name="line-480"></a><span class="cm"> * environment. If @desktop_environment is non-%NULL, @desktop_file's</span> +<a id="line-481" name="line-481"></a><span class="cm"> * "OnlyShowIn" and "NotShowIn" keys are checked to make sure that</span> +<a id="line-482" name="line-482"></a><span class="cm"> * this desktop_file is appropriate for the named environment.</span> +<a id="line-483" name="line-483"></a><span class="cm"> *</span> +<a id="line-484" name="line-484"></a><span class="cm"> * Furthermore, if @desktop_file has type</span> +<a id="line-485" name="line-485"></a><span class="cm"> * %EGG_DESKTOP_FILE_TYPE_APPLICATION, its "TryExec" key (if any) is</span> +<a id="line-486" name="line-486"></a><span class="cm"> * also checked, to make sure the binary it points to exists.</span> +<a id="line-487" name="line-487"></a><span class="cm"> *</span> +<a id="line-488" name="line-488"></a><span class="cm"> * egg_desktop_file_can_launch() does NOT check the value of the</span> +<a id="line-489" name="line-489"></a><span class="cm"> * "Hidden" key.</span> +<a id="line-490" name="line-490"></a><span class="cm"> *</span> +<a id="line-491" name="line-491"></a><span class="cm"> * Return value: %TRUE if @desktop_file can be launched</span> +<a id="line-492" name="line-492"></a><span class="cm"> **/</span> +<a id="line-493" name="line-493"></a><span class="n">gboolean</span> +<a id="line-494" name="line-494"></a><span class="nf">egg_desktop_file_can_launch</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_environment</span><span class="p">)</span> +<a id="line-496" name="line-496"></a><span class="p">{</span> +<a id="line-497" name="line-497"></a><span class="hll"><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">try_exec</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">found_program</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'try_exec' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'try_exec' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'found_program' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'found_program' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-498" name="line-498"></a><span class="hll"><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">only_show_in</span><span class="p">,</span><span class="w"> </span><span class="o">**</span><span class="n">not_show_in</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'only_show_in' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'only_show_in' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'not_show_in' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'not_show_in' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-499" name="line-499"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">found</span><span class="p">;</span> +<a id="line-500" name="line-500"></a><span class="hll"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'i' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-501" name="line-501"></a> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_TYPE_APPLICATION</span><span class="w"> </span><span class="o">&&</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_TYPE_LINK</span><span class="p">)</span> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-505" name="line-505"></a> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_environment</span><span class="p">)</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="p">{</span> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="n">only_show_in</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string_list</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_ONLY_SHOW_IN</span><span class="p">,</span> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">only_show_in</span><span class="p">)</span> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="p">{</span> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span><span class="w"> </span><span class="n">only_show_in</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">found</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="p">{</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">only_show_in</span><span class="p">[</span><span class="n">i</span><span class="p">],</span><span class="w"> </span><span class="n">desktop_environment</span><span class="p">))</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="p">}</span> +<a id="line-519" name="line-519"></a> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">only_show_in</span><span class="p">);</span> +<a id="line-521" name="line-521"></a> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">found</span><span class="p">)</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="p">}</span> +<a id="line-525" name="line-525"></a> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">not_show_in</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string_list</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_NOT_SHOW_IN</span><span class="p">,</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">not_show_in</span><span class="p">)</span> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="p">{</span> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span><span class="w"> </span><span class="n">not_show_in</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">found</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="p">{</span> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">not_show_in</span><span class="p">[</span><span class="n">i</span><span class="p">],</span><span class="w"> </span><span class="n">desktop_environment</span><span class="p">))</span> +<a id="line-535" name="line-535"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="p">}</span> +<a id="line-537" name="line-537"></a> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">not_show_in</span><span class="p">);</span> +<a id="line-539" name="line-539"></a> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">found</span><span class="p">)</span> +<a id="line-541" name="line-541"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="p">}</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="p">}</span> +<a id="line-544" name="line-544"></a> +<a id="line-545" name="line-545"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_TYPE_APPLICATION</span><span class="p">)</span> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="p">{</span> +<a id="line-547" name="line-547"></a><span class="w"> </span><span class="n">try_exec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_TRY_EXEC</span><span class="p">,</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">try_exec</span><span class="p">)</span> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="p">{</span> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="n">found_program</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_find_program_in_path</span><span class="w"> </span><span class="p">(</span><span class="n">try_exec</span><span class="p">);</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">try_exec</span><span class="p">);</span> +<a id="line-555" name="line-555"></a> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">found_program</span><span class="p">)</span> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">found_program</span><span class="p">);</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="p">}</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="p">}</span> +<a id="line-561" name="line-561"></a> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-563" name="line-563"></a><span class="p">}</span> +<a id="line-564" name="line-564"></a> +<a id="line-565" name="line-565"></a><span class="cm">/**</span> +<a id="line-566" name="line-566"></a><span class="cm"> * egg_desktop_file_accepts_documents:</span> +<a id="line-567" name="line-567"></a><span class="cm"> * @desktop_file: an #EggDesktopFile</span> +<a id="line-568" name="line-568"></a><span class="cm"> *</span> +<a id="line-569" name="line-569"></a><span class="cm"> * Tests if @desktop_file represents an application that can accept</span> +<a id="line-570" name="line-570"></a><span class="cm"> * documents on the command line.</span> +<a id="line-571" name="line-571"></a><span class="cm"> *</span> +<a id="line-572" name="line-572"></a><span class="cm"> * Return value: %TRUE or %FALSE</span> +<a id="line-573" name="line-573"></a><span class="cm"> **/</span> +<a id="line-574" name="line-574"></a><span class="n">gboolean</span> +<a id="line-575" name="line-575"></a><span class="nf">egg_desktop_file_accepts_documents</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-576" name="line-576"></a><span class="p">{</span> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">document_code</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-578" name="line-578"></a><span class="p">}</span> +<a id="line-579" name="line-579"></a> +<a id="line-580" name="line-580"></a><span class="cm">/**</span> +<a id="line-581" name="line-581"></a><span class="cm"> * egg_desktop_file_accepts_multiple:</span> +<a id="line-582" name="line-582"></a><span class="cm"> * @desktop_file: an #EggDesktopFile</span> +<a id="line-583" name="line-583"></a><span class="cm"> *</span> +<a id="line-584" name="line-584"></a><span class="cm"> * Tests if @desktop_file can accept multiple documents at once.</span> +<a id="line-585" name="line-585"></a><span class="cm"> *</span> +<a id="line-586" name="line-586"></a><span class="cm"> * If this returns %FALSE, you can still pass multiple documents to</span> +<a id="line-587" name="line-587"></a><span class="cm"> * egg_desktop_file_launch(), but that will result in multiple copies</span> +<a id="line-588" name="line-588"></a><span class="cm"> * of the application being launched. See egg_desktop_file_launch()</span> +<a id="line-589" name="line-589"></a><span class="cm"> * for more details.</span> +<a id="line-590" name="line-590"></a><span class="cm"> *</span> +<a id="line-591" name="line-591"></a><span class="cm"> * Return value: %TRUE or %FALSE</span> +<a id="line-592" name="line-592"></a><span class="cm"> **/</span> +<a id="line-593" name="line-593"></a><span class="n">gboolean</span> +<a id="line-594" name="line-594"></a><span class="nf">egg_desktop_file_accepts_multiple</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-595" name="line-595"></a><span class="p">{</span> +<a id="line-596" name="line-596"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">document_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'F'</span><span class="w"> </span><span class="o">||</span> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">document_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'U'</span><span class="p">);</span> +<a id="line-598" name="line-598"></a><span class="p">}</span> +<a id="line-599" name="line-599"></a> +<a id="line-600" name="line-600"></a><span class="cm">/**</span> +<a id="line-601" name="line-601"></a><span class="cm"> * egg_desktop_file_accepts_uris:</span> +<a id="line-602" name="line-602"></a><span class="cm"> * @desktop_file: an #EggDesktopFile</span> +<a id="line-603" name="line-603"></a><span class="cm"> *</span> +<a id="line-604" name="line-604"></a><span class="cm"> * Tests if @desktop_file can accept (non-"file:") URIs as documents to</span> +<a id="line-605" name="line-605"></a><span class="cm"> * open.</span> +<a id="line-606" name="line-606"></a><span class="cm"> *</span> +<a id="line-607" name="line-607"></a><span class="cm"> * Return value: %TRUE or %FALSE</span> +<a id="line-608" name="line-608"></a><span class="cm"> **/</span> +<a id="line-609" name="line-609"></a><span class="n">gboolean</span> +<a id="line-610" name="line-610"></a><span class="nf">egg_desktop_file_accepts_uris</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-611" name="line-611"></a><span class="p">{</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">document_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'U'</span><span class="w"> </span><span class="o">||</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">document_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'u'</span><span class="p">);</span> +<a id="line-614" name="line-614"></a><span class="p">}</span> +<a id="line-615" name="line-615"></a> +<a id="line-616" name="line-616"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-617" name="line-617"></a><span class="nf">append_quoted_word</span><span class="w"> </span><span class="p">(</span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">,</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">s</span><span class="p">,</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">in_single_quotes</span><span class="p">,</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">in_double_quotes</span><span class="p">)</span> +<a id="line-621" name="line-621"></a><span class="p">{</span> +<a id="line-622" name="line-622"></a><span class="hll"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'p' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'p' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-623" name="line-623"></a> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">in_single_quotes</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">in_double_quotes</span><span class="p">)</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="sc">'\''</span><span class="p">);</span> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">in_single_quotes</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">in_double_quotes</span><span class="p">)</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\"</span><span class="s">'"</span><span class="p">);</span> +<a id="line-628" name="line-628"></a> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strchr</span><span class="w"> </span><span class="p">(</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="sc">'\''</span><span class="p">))</span> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">s</span><span class="p">);</span> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="k">else</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="p">{</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">s</span><span class="p">;</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span><span class="w"> </span><span class="n">p</span><span class="o">++</span><span class="p">)</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="p">{</span> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\''</span><span class="p">)</span> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"'</span><span class="se">\\</span><span class="s">''"</span><span class="p">);</span> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="k">else</span> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">);</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="p">}</span> +<a id="line-640" name="line-640"></a><span class="w"> </span><span class="p">}</span> +<a id="line-641" name="line-641"></a> +<a id="line-642" name="line-642"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">in_single_quotes</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">in_double_quotes</span><span class="p">)</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="sc">'\''</span><span class="p">);</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">in_single_quotes</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">in_double_quotes</span><span class="p">)</span> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"'</span><span class="se">\"</span><span class="s">"</span><span class="p">);</span> +<a id="line-646" name="line-646"></a><span class="p">}</span> +<a id="line-647" name="line-647"></a> +<a id="line-648" name="line-648"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-649" name="line-649"></a><span class="nf">do_percent_subst</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">code</span><span class="p">,</span> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">,</span> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">**</span><span class="n">documents</span><span class="p">,</span> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">in_single_quotes</span><span class="p">,</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">in_double_quotes</span><span class="p">)</span> +<a id="line-655" name="line-655"></a><span class="p">{</span> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">d</span><span class="p">;</span> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">doc</span><span class="p">;</span> +<a id="line-658" name="line-658"></a> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">code</span><span class="p">)</span> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="p">{</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'%'</span><span class="p">:</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="sc">'%'</span><span class="p">);</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-664" name="line-664"></a> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'F'</span><span class="p">:</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'U'</span><span class="p">:</span> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">d</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">documents</span><span class="p">;</span><span class="w"> </span><span class="n">d</span><span class="p">;</span><span class="w"> </span><span class="n">d</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">d</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="p">{</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="n">doc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">d</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-670" name="line-670"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">);</span> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">append_quoted_word</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">doc</span><span class="p">,</span><span class="w"> </span><span class="n">in_single_quotes</span><span class="p">,</span><span class="w"> </span><span class="n">in_double_quotes</span><span class="p">);</span> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="p">}</span> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="o">*</span><span class="n">documents</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-675" name="line-675"></a> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'f'</span><span class="p">:</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'u'</span><span class="p">:</span> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">documents</span><span class="p">)</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="p">{</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="n">doc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">documents</span><span class="p">)</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">);</span> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="n">append_quoted_word</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">doc</span><span class="p">,</span><span class="w"> </span><span class="n">in_single_quotes</span><span class="p">,</span><span class="w"> </span><span class="n">in_double_quotes</span><span class="p">);</span> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="o">*</span><span class="n">documents</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">documents</span><span class="p">)</span><span class="o">-></span><span class="n">next</span><span class="p">;</span> +<a id="line-684" name="line-684"></a><span class="w"> </span><span class="p">}</span> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-686" name="line-686"></a> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'i'</span><span class="p">:</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">)</span> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="p">{</span> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"--icon "</span><span class="p">);</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="n">append_quoted_word</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">,</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="n">in_single_quotes</span><span class="p">,</span><span class="w"> </span><span class="n">in_double_quotes</span><span class="p">);</span> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="p">}</span> +<a id="line-694" name="line-694"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-695" name="line-695"></a> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'c'</span><span class="p">:</span> +<a id="line-697" name="line-697"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">name</span><span class="p">)</span> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="p">{</span> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="n">append_quoted_word</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">name</span><span class="p">,</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="n">in_single_quotes</span><span class="p">,</span><span class="w"> </span><span class="n">in_double_quotes</span><span class="p">);</span> +<a id="line-701" name="line-701"></a><span class="w"> </span><span class="p">}</span> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-703" name="line-703"></a> +<a id="line-704" name="line-704"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'k'</span><span class="p">:</span> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">source</span><span class="p">)</span> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="p">{</span> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="n">append_quoted_word</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">source</span><span class="p">,</span> +<a id="line-708" name="line-708"></a><span class="w"> </span><span class="n">in_single_quotes</span><span class="p">,</span><span class="w"> </span><span class="n">in_double_quotes</span><span class="p">);</span> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="p">}</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-711" name="line-711"></a> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'D'</span><span class="p">:</span> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'N'</span><span class="p">:</span> +<a id="line-714" name="line-714"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'d'</span><span class="p">:</span> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'n'</span><span class="p">:</span> +<a id="line-716" name="line-716"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'v'</span><span class="p">:</span> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'m'</span><span class="p">:</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="cm">/* Deprecated; skip */</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-720" name="line-720"></a> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Unrecognized %%-code '%%%c' in Exec"</span><span class="p">,</span><span class="w"> </span><span class="n">code</span><span class="p">);</span> +<a id="line-723" name="line-723"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="p">}</span> +<a id="line-725" name="line-725"></a><span class="p">}</span> +<a id="line-726" name="line-726"></a> +<a id="line-727" name="line-727"></a><span class="k">static</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-728" name="line-728"></a><span class="nf">parse_exec</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">**</span><span class="n">documents</span><span class="p">,</span> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-731" name="line-731"></a><span class="p">{</span> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">exec</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">command</span><span class="p">;</span> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">escape</span><span class="p">,</span><span class="w"> </span><span class="n">single_quot</span><span class="p">,</span><span class="w"> </span><span class="n">double_quot</span><span class="p">;</span> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">gs</span><span class="p">;</span> +<a id="line-735" name="line-735"></a> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="n">exec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_EXEC</span><span class="p">,</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">exec</span><span class="p">)</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-742" name="line-742"></a> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="cm">/* Build the command */</span> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="n">gs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="n">escape</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">single_quot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">double_quot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-746" name="line-746"></a> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">exec</span><span class="p">;</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span><span class="w"> </span><span class="n">p</span><span class="o">++</span><span class="p">)</span> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="p">{</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">escape</span><span class="p">)</span> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="p">{</span> +<a id="line-751" name="line-751"></a><span class="w"> </span><span class="n">escape</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">);</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="p">}</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\\'</span><span class="p">)</span> +<a id="line-755" name="line-755"></a><span class="w"> </span><span class="p">{</span> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">single_quot</span><span class="p">)</span> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="n">escape</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-758" name="line-758"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">);</span> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="p">}</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\''</span><span class="p">)</span> +<a id="line-761" name="line-761"></a><span class="w"> </span><span class="p">{</span> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">);</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">single_quot</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">double_quot</span><span class="p">)</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="n">single_quot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">single_quot</span><span class="p">)</span> +<a id="line-766" name="line-766"></a><span class="w"> </span><span class="n">single_quot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="p">}</span> +<a id="line-768" name="line-768"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'"'</span><span class="p">)</span> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="p">{</span> +<a id="line-770" name="line-770"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">);</span> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">single_quot</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">double_quot</span><span class="p">)</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="n">double_quot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">double_quot</span><span class="p">)</span> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="n">double_quot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="p">}</span> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'%'</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">p</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="p">{</span> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="n">do_percent_subst</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="n">documents</span><span class="p">,</span> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="n">single_quot</span><span class="p">,</span><span class="w"> </span><span class="n">double_quot</span><span class="p">);</span> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="n">p</span><span class="o">++</span><span class="p">;</span> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="p">}</span> +<a id="line-782" name="line-782"></a><span class="w"> </span><span class="k">else</span> +<a id="line-783" name="line-783"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">);</span> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="p">}</span> +<a id="line-785" name="line-785"></a> +<a id="line-786" name="line-786"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">exec</span><span class="p">);</span> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-788" name="line-788"></a> +<a id="line-789" name="line-789"></a><span class="w"> </span><span class="cm">/* Prepend "xdg-terminal " if needed (FIXME: use gvfs) */</span> +<a id="line-790" name="line-790"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_has_key</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-791" name="line-791"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-792" name="line-792"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_TERMINAL</span><span class="p">,</span> +<a id="line-793" name="line-793"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-794" name="line-794"></a><span class="w"> </span><span class="p">{</span> +<a id="line-795" name="line-795"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">terminal_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-796" name="line-796"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">use_terminal</span><span class="w"> </span><span class="o">=</span> +<a id="line-797" name="line-797"></a><span class="w"> </span><span class="n">g_key_file_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-798" name="line-798"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-799" name="line-799"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_TERMINAL</span><span class="p">,</span> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="o">&</span><span class="n">terminal_error</span><span class="p">);</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">terminal_error</span><span class="p">)</span> +<a id="line-802" name="line-802"></a><span class="w"> </span><span class="p">{</span> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">);</span> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">terminal_error</span><span class="p">);</span> +<a id="line-805" name="line-805"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="p">}</span> +<a id="line-807" name="line-807"></a> +<a id="line-808" name="line-808"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">use_terminal</span><span class="p">)</span> +<a id="line-809" name="line-809"></a><span class="w"> </span><span class="p">{</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="n">gs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="s">"xdg-terminal "</span><span class="p">);</span> +<a id="line-811" name="line-811"></a><span class="w"> </span><span class="n">append_quoted_word</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">);</span> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="p">}</span> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="p">}</span> +<a id="line-816" name="line-816"></a> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">command</span><span class="p">;</span> +<a id="line-818" name="line-818"></a><span class="p">}</span> +<a id="line-819" name="line-819"></a> +<a id="line-820" name="line-820"></a><span class="k">static</span><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span> +<a id="line-821" name="line-821"></a><span class="nf">translate_document_list</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">documents</span><span class="p">)</span> +<a id="line-822" name="line-822"></a><span class="p">{</span> +<a id="line-823" name="line-823"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">accepts_uris</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_desktop_file_accepts_uris</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">);</span> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">ret</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">d</span><span class="p">;</span> +<a id="line-825" name="line-825"></a> +<a id="line-826" name="line-826"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">d</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">documents</span><span class="p">,</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">d</span><span class="p">;</span><span class="w"> </span><span class="n">d</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">d</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="p">{</span> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">document</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">d</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-829" name="line-829"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">!</span><span class="n">g_path_is_absolute</span><span class="w"> </span><span class="p">(</span><span class="n">document</span><span class="p">);</span> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">translated</span><span class="p">;</span> +<a id="line-831" name="line-831"></a> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">accepts_uris</span><span class="p">)</span> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="p">{</span> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">is_uri</span><span class="p">)</span> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="n">translated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">document</span><span class="p">);</span> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="k">else</span> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="n">translated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_to_uri</span><span class="w"> </span><span class="p">(</span><span class="n">document</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="p">}</span> +<a id="line-839" name="line-839"></a><span class="w"> </span><span class="k">else</span> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="p">{</span> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">is_uri</span><span class="p">)</span> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="n">translated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_from_uri</span><span class="w"> </span><span class="p">(</span><span class="n">document</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="k">else</span> +<a id="line-844" name="line-844"></a><span class="w"> </span><span class="n">translated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">document</span><span class="p">);</span> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="p">}</span> +<a id="line-846" name="line-846"></a> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">translated</span><span class="p">)</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_prepend</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="p">,</span><span class="w"> </span><span class="n">translated</span><span class="p">);</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="p">}</span> +<a id="line-850" name="line-850"></a> +<a id="line-851" name="line-851"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_slist_reverse</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="p">);</span> +<a id="line-852" name="line-852"></a><span class="p">}</span> +<a id="line-853" name="line-853"></a> +<a id="line-854" name="line-854"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-855" name="line-855"></a><span class="nf">free_document_list</span><span class="w"> </span><span class="p">(</span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">documents</span><span class="p">)</span> +<a id="line-856" name="line-856"></a><span class="p">{</span> +<a id="line-857" name="line-857"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">d</span><span class="p">;</span> +<a id="line-858" name="line-858"></a> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">d</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">documents</span><span class="p">;</span><span class="w"> </span><span class="n">d</span><span class="p">;</span><span class="w"> </span><span class="n">d</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">d</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-860" name="line-860"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">d</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-861" name="line-861"></a><span class="w"> </span><span class="n">g_slist_free</span><span class="w"> </span><span class="p">(</span><span class="n">documents</span><span class="p">);</span> +<a id="line-862" name="line-862"></a><span class="p">}</span> +<a id="line-863" name="line-863"></a> +<a id="line-864" name="line-864"></a><span class="cm">/**</span> +<a id="line-865" name="line-865"></a><span class="cm"> * egg_desktop_file_parse_exec:</span> +<a id="line-866" name="line-866"></a><span class="cm"> * @desktop_file: a #EggDesktopFile</span> +<a id="line-867" name="line-867"></a><span class="cm"> * @documents: a list of document paths or URIs</span> +<a id="line-868" name="line-868"></a><span class="cm"> * @error: error pointer</span> +<a id="line-869" name="line-869"></a><span class="cm"> *</span> +<a id="line-870" name="line-870"></a><span class="cm"> * Parses @desktop_file's Exec key, inserting @documents into it, and</span> +<a id="line-871" name="line-871"></a><span class="cm"> * returns the result.</span> +<a id="line-872" name="line-872"></a><span class="cm"> *</span> +<a id="line-873" name="line-873"></a><span class="cm"> * If @documents contains non-file: URIs and @desktop_file does not</span> +<a id="line-874" name="line-874"></a><span class="cm"> * accept URIs, those URIs will be ignored. Likewise, if @documents</span> +<a id="line-875" name="line-875"></a><span class="cm"> * contains more elements than @desktop_file accepts, the extra</span> +<a id="line-876" name="line-876"></a><span class="cm"> * documents will be ignored.</span> +<a id="line-877" name="line-877"></a><span class="cm"> *</span> +<a id="line-878" name="line-878"></a><span class="cm"> * Return value: the parsed Exec string</span> +<a id="line-879" name="line-879"></a><span class="cm"> **/</span> +<a id="line-880" name="line-880"></a><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-881" name="line-881"></a><span class="nf">egg_desktop_file_parse_exec</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">documents</span><span class="p">,</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-884" name="line-884"></a><span class="p">{</span> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">translated</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">docs</span><span class="p">;</span> +<a id="line-886" name="line-886"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">command</span><span class="p">;</span> +<a id="line-887" name="line-887"></a> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="n">docs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">translated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">translate_document_list</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">,</span><span class="w"> </span><span class="n">documents</span><span class="p">);</span> +<a id="line-889" name="line-889"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">parse_exec</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">docs</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-890" name="line-890"></a><span class="w"> </span><span class="n">free_document_list</span><span class="w"> </span><span class="p">(</span><span class="n">translated</span><span class="p">);</span> +<a id="line-891" name="line-891"></a> +<a id="line-892" name="line-892"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">command</span><span class="p">;</span> +<a id="line-893" name="line-893"></a><span class="p">}</span> +<a id="line-894" name="line-894"></a> +<a id="line-895" name="line-895"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-896" name="line-896"></a><span class="nf">parse_link</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-897" name="line-897"></a><span class="w"> </span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">**</span><span class="n">app_desktop_file</span><span class="p">,</span> +<a id="line-898" name="line-898"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">**</span><span class="n">documents</span><span class="p">,</span> +<a id="line-899" name="line-899"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-900" name="line-900"></a><span class="p">{</span> +<a id="line-901" name="line-901"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">url</span><span class="p">;</span> +<a id="line-902" name="line-902"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">key_file</span><span class="p">;</span> +<a id="line-903" name="line-903"></a> +<a id="line-904" name="line-904"></a><span class="w"> </span><span class="n">url</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-905" name="line-905"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-906" name="line-906"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_URL</span><span class="p">,</span> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-908" name="line-908"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">url</span><span class="p">)</span> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-910" name="line-910"></a><span class="w"> </span><span class="o">*</span><span class="n">documents</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_prepend</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">url</span><span class="p">);</span> +<a id="line-911" name="line-911"></a> +<a id="line-912" name="line-912"></a><span class="w"> </span><span class="cm">/* FIXME: use gvfs */</span> +<a id="line-913" name="line-913"></a><span class="w"> </span><span class="n">key_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-914" name="line-914"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-915" name="line-915"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_NAME</span><span class="p">,</span> +<a id="line-916" name="line-916"></a><span class="w"> </span><span class="s">"xdg-open"</span><span class="p">);</span> +<a id="line-917" name="line-917"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-918" name="line-918"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_TYPE</span><span class="p">,</span> +<a id="line-919" name="line-919"></a><span class="w"> </span><span class="s">"Application"</span><span class="p">);</span> +<a id="line-920" name="line-920"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-921" name="line-921"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_EXEC</span><span class="p">,</span> +<a id="line-922" name="line-922"></a><span class="w"> </span><span class="s">"xdg-open %u"</span><span class="p">);</span> +<a id="line-923" name="line-923"></a><span class="w"> </span><span class="o">*</span><span class="n">app_desktop_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_desktop_file_new_from_key_file</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-924" name="line-924"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-925" name="line-925"></a><span class="p">}</span> +<a id="line-926" name="line-926"></a> +<a id="line-927" name="line-927"></a><span class="cp">#if defined(GDK_WINDOWING_X11) || defined(HAVE_X11)</span> +<a id="line-928" name="line-928"></a><span class="k">static</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-929" name="line-929"></a><span class="nf">start_startup_notification</span><span class="w"> </span><span class="p">(</span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">,</span> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-931" name="line-931"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">argv0</span><span class="p">,</span> +<a id="line-932" name="line-932"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">screen</span><span class="p">,</span> +<a id="line-933" name="line-933"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">workspace</span><span class="p">,</span> +<a id="line-934" name="line-934"></a><span class="w"> </span><span class="n">guint32</span><span class="w"> </span><span class="n">launch_time</span><span class="p">)</span> +<a id="line-935" name="line-935"></a><span class="p">{</span> +<a id="line-936" name="line-936"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">sequence</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-937" name="line-937"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">startup_id</span><span class="p">;</span> +<a id="line-938" name="line-938"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">description</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">wmclass</span><span class="p">;</span> +<a id="line-939" name="line-939"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">screen_str</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">workspace_str</span><span class="p">;</span> +<a id="line-940" name="line-940"></a> +<a id="line-941" name="line-941"></a><span class="w"> </span><span class="n">g_assert</span><span class="p">(</span><span class="n">GDK_IS_X11_DISPLAY</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">));</span> +<a id="line-942" name="line-942"></a> +<a id="line-943" name="line-943"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_has_key</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-944" name="line-944"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-945" name="line-945"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_STARTUP_NOTIFY</span><span class="p">,</span> +<a id="line-946" name="line-946"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="p">{</span> +<a id="line-948" name="line-948"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_key_file_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-949" name="line-949"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-950" name="line-950"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_STARTUP_NOTIFY</span><span class="p">,</span> +<a id="line-951" name="line-951"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-953" name="line-953"></a><span class="w"> </span><span class="n">wmclass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-954" name="line-954"></a><span class="w"> </span><span class="p">}</span> +<a id="line-955" name="line-955"></a><span class="w"> </span><span class="k">else</span> +<a id="line-956" name="line-956"></a><span class="w"> </span><span class="p">{</span> +<a id="line-957" name="line-957"></a><span class="w"> </span><span class="n">wmclass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">key_file</span><span class="p">,</span> +<a id="line-958" name="line-958"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-959" name="line-959"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_STARTUP_WM_CLASS</span><span class="p">,</span> +<a id="line-960" name="line-960"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-961" name="line-961"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">wmclass</span><span class="p">)</span> +<a id="line-962" name="line-962"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-963" name="line-963"></a><span class="w"> </span><span class="p">}</span> +<a id="line-964" name="line-964"></a> +<a id="line-965" name="line-965"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">launch_time</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="p">(</span><span class="n">guint32</span><span class="p">)</span><span class="mi">-1</span><span class="p">)</span> +<a id="line-966" name="line-966"></a><span class="w"> </span><span class="n">launch_time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_x11_display_get_user_time</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-967" name="line-967"></a><span class="w"> </span><span class="n">startup_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s-%lu-%s-%s-%d_TIME%lu"</span><span class="p">,</span> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="n">g_get_prgname</span><span class="w"> </span><span class="p">(),</span> +<a id="line-969" name="line-969"></a><span class="w"> </span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">long</span><span class="p">)</span><span class="n">getpid</span><span class="w"> </span><span class="p">(),</span> +<a id="line-970" name="line-970"></a><span class="w"> </span><span class="n">g_get_host_name</span><span class="w"> </span><span class="p">(),</span> +<a id="line-971" name="line-971"></a><span class="w"> </span><span class="n">argv0</span><span class="p">,</span> +<a id="line-972" name="line-972"></a><span class="w"> </span><span class="n">sequence</span><span class="o">++</span><span class="p">,</span> +<a id="line-973" name="line-973"></a><span class="w"> </span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">long</span><span class="p">)</span><span class="n">launch_time</span><span class="p">);</span> +<a id="line-974" name="line-974"></a> +<a id="line-975" name="line-975"></a><span class="w"> </span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Starting %s"</span><span class="p">),</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-976" name="line-976"></a><span class="w"> </span><span class="n">screen_str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%d"</span><span class="p">,</span><span class="w"> </span><span class="n">screen</span><span class="p">);</span> +<a id="line-977" name="line-977"></a><span class="w"> </span><span class="n">workspace_str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">workspace</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%d"</span><span class="p">,</span><span class="w"> </span><span class="n">workspace</span><span class="p">);</span> +<a id="line-978" name="line-978"></a> +<a id="line-979" name="line-979"></a><span class="w"> </span><span class="n">gdk_x11_display_broadcast_startup_message</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="s">"new"</span><span class="p">,</span> +<a id="line-980" name="line-980"></a><span class="w"> </span><span class="s">"ID"</span><span class="p">,</span><span class="w"> </span><span class="n">startup_id</span><span class="p">,</span> +<a id="line-981" name="line-981"></a><span class="w"> </span><span class="s">"NAME"</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">name</span><span class="p">,</span> +<a id="line-982" name="line-982"></a><span class="w"> </span><span class="s">"SCREEN"</span><span class="p">,</span><span class="w"> </span><span class="n">screen_str</span><span class="p">,</span> +<a id="line-983" name="line-983"></a><span class="w"> </span><span class="s">"BIN"</span><span class="p">,</span><span class="w"> </span><span class="n">argv0</span><span class="p">,</span> +<a id="line-984" name="line-984"></a><span class="w"> </span><span class="s">"ICON"</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">,</span> +<a id="line-985" name="line-985"></a><span class="w"> </span><span class="s">"DESKTOP"</span><span class="p">,</span><span class="w"> </span><span class="n">workspace_str</span><span class="p">,</span> +<a id="line-986" name="line-986"></a><span class="w"> </span><span class="s">"DESCRIPTION"</span><span class="p">,</span><span class="w"> </span><span class="n">description</span><span class="p">,</span> +<a id="line-987" name="line-987"></a><span class="w"> </span><span class="s">"WMCLASS"</span><span class="p">,</span><span class="w"> </span><span class="n">wmclass</span><span class="p">,</span> +<a id="line-988" name="line-988"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-989" name="line-989"></a> +<a id="line-990" name="line-990"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">description</span><span class="p">);</span> +<a id="line-991" name="line-991"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">wmclass</span><span class="p">);</span> +<a id="line-992" name="line-992"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">screen_str</span><span class="p">);</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">workspace_str</span><span class="p">);</span> +<a id="line-994" name="line-994"></a> +<a id="line-995" name="line-995"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">startup_id</span><span class="p">;</span> +<a id="line-996" name="line-996"></a><span class="p">}</span> +<a id="line-997" name="line-997"></a> +<a id="line-998" name="line-998"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-999" name="line-999"></a><span class="nf">end_startup_notification</span><span class="w"> </span><span class="p">(</span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">,</span> +<a id="line-1000" name="line-1000"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">startup_id</span><span class="p">)</span> +<a id="line-1001" name="line-1001"></a><span class="p">{</span> +<a id="line-1002" name="line-1002"></a><span class="w"> </span><span class="n">gdk_x11_display_broadcast_startup_message</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="s">"remove"</span><span class="p">,</span> +<a id="line-1003" name="line-1003"></a><span class="w"> </span><span class="s">"ID"</span><span class="p">,</span><span class="w"> </span><span class="n">startup_id</span><span class="p">,</span> +<a id="line-1004" name="line-1004"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1005" name="line-1005"></a><span class="p">}</span> +<a id="line-1006" name="line-1006"></a> +<a id="line-1007" name="line-1007"></a><span class="cp">#define EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH (30 </span><span class="cm">/* seconds */</span><span class="cp">)</span> +<a id="line-1008" name="line-1008"></a> +<a id="line-1009" name="line-1009"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-1010" name="line-1010"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-1011" name="line-1011"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">startup_id</span><span class="p">;</span> +<a id="line-1012" name="line-1012"></a><span class="p">}</span><span class="w"> </span><span class="n">StartupNotificationData</span><span class="p">;</span> +<a id="line-1013" name="line-1013"></a> +<a id="line-1014" name="line-1014"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1015" name="line-1015"></a><span class="nf">startup_notification_timeout</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1016" name="line-1016"></a><span class="p">{</span> +<a id="line-1017" name="line-1017"></a><span class="w"> </span><span class="n">StartupNotificationData</span><span class="w"> </span><span class="o">*</span><span class="n">sn_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1018" name="line-1018"></a> +<a id="line-1019" name="line-1019"></a><span class="w"> </span><span class="n">end_startup_notification</span><span class="w"> </span><span class="p">(</span><span class="n">sn_data</span><span class="o">-></span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">sn_data</span><span class="o">-></span><span class="n">startup_id</span><span class="p">);</span> +<a id="line-1020" name="line-1020"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">sn_data</span><span class="o">-></span><span class="n">display</span><span class="p">);</span> +<a id="line-1021" name="line-1021"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">sn_data</span><span class="o">-></span><span class="n">startup_id</span><span class="p">);</span> +<a id="line-1022" name="line-1022"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">sn_data</span><span class="p">);</span> +<a id="line-1023" name="line-1023"></a> +<a id="line-1024" name="line-1024"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1025" name="line-1025"></a><span class="p">}</span> +<a id="line-1026" name="line-1026"></a> +<a id="line-1027" name="line-1027"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1028" name="line-1028"></a><span class="nf">set_startup_notification_timeout</span><span class="w"> </span><span class="p">(</span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">,</span> +<a id="line-1029" name="line-1029"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">startup_id</span><span class="p">)</span> +<a id="line-1030" name="line-1030"></a><span class="p">{</span> +<a id="line-1031" name="line-1031"></a><span class="w"> </span><span class="n">StartupNotificationData</span><span class="w"> </span><span class="o">*</span><span class="n">sn_data</span><span class="p">;</span> +<a id="line-1032" name="line-1032"></a> +<a id="line-1033" name="line-1033"></a><span class="w"> </span><span class="n">sn_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">StartupNotificationData</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1034" name="line-1034"></a><span class="w"> </span><span class="n">sn_data</span><span class="o">-></span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-1035" name="line-1035"></a><span class="w"> </span><span class="n">sn_data</span><span class="o">-></span><span class="n">startup_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">startup_id</span><span class="p">);</span> +<a id="line-1036" name="line-1036"></a> +<a id="line-1037" name="line-1037"></a><span class="w"> </span><span class="n">g_timeout_add_seconds</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH</span><span class="p">,</span> +<a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="n">startup_notification_timeout</span><span class="p">,</span><span class="w"> </span><span class="n">sn_data</span><span class="p">);</span> +<a id="line-1039" name="line-1039"></a><span class="p">}</span> +<a id="line-1040" name="line-1040"></a><span class="cp">#endif </span><span class="c1">// GDK_WINDOWING_X11</span> +<a id="line-1041" name="line-1041"></a> +<a id="line-1042" name="line-1042"></a><span class="k">static</span><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span> +<a id="line-1043" name="line-1043"></a><span class="nf">array_putenv</span><span class="w"> </span><span class="p">(</span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">variable</span><span class="p">)</span> +<a id="line-1044" name="line-1044"></a><span class="p">{</span> +<a id="line-1045" name="line-1045"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">keylen</span><span class="p">;</span> +<a id="line-1046" name="line-1046"></a> +<a id="line-1047" name="line-1047"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">env</span><span class="p">)</span> +<a id="line-1048" name="line-1048"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1049" name="line-1049"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">envp</span><span class="p">;</span> +<a id="line-1050" name="line-1050"></a> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="n">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1052" name="line-1052"></a> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="n">envp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_listenv</span><span class="w"> </span><span class="p">();</span> +<a id="line-1054" name="line-1054"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">envp</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-1055" name="line-1055"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1056" name="line-1056"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">;</span> +<a id="line-1057" name="line-1057"></a> +<a id="line-1058" name="line-1058"></a><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_getenv</span><span class="w"> </span><span class="p">(</span><span class="n">envp</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-1059" name="line-1059"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s=%s"</span><span class="p">,</span><span class="w"> </span><span class="n">envp</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> +<a id="line-1060" name="line-1060"></a><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">""</span><span class="p">));</span> +<a id="line-1061" name="line-1061"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1062" name="line-1062"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">envp</span><span class="p">);</span> +<a id="line-1063" name="line-1063"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1064" name="line-1064"></a> +<a id="line-1065" name="line-1065"></a><span class="w"> </span><span class="n">keylen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strcspn</span><span class="w"> </span><span class="p">(</span><span class="n">variable</span><span class="p">,</span><span class="w"> </span><span class="s">"="</span><span class="p">);</span> +<a id="line-1066" name="line-1066"></a> +<a id="line-1067" name="line-1067"></a><span class="w"> </span><span class="cm">/* Remove old value of key */</span> +<a id="line-1068" name="line-1068"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">env</span><span class="o">-></span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-1069" name="line-1069"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1070" name="line-1070"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">envvar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">env</span><span class="o">-></span><span class="n">pdata</span><span class="p">[</span><span class="n">i</span><span class="p">];</span> +<a id="line-1071" name="line-1071"></a> +<a id="line-1072" name="line-1072"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strncmp</span><span class="w"> </span><span class="p">(</span><span class="n">envvar</span><span class="p">,</span><span class="w"> </span><span class="n">variable</span><span class="p">,</span><span class="w"> </span><span class="n">keylen</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">envvar</span><span class="p">[</span><span class="n">keylen</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'='</span><span class="p">)</span> +<a id="line-1073" name="line-1073"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1074" name="line-1074"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">envvar</span><span class="p">);</span> +<a id="line-1075" name="line-1075"></a><span class="w"> </span><span class="n">g_ptr_array_remove_index_fast</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span> +<a id="line-1076" name="line-1076"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1077" name="line-1077"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1078" name="line-1078"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1079" name="line-1079"></a> +<a id="line-1080" name="line-1080"></a><span class="w"> </span><span class="cm">/* Add new value */</span> +<a id="line-1081" name="line-1081"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">variable</span><span class="p">));</span> +<a id="line-1082" name="line-1082"></a> +<a id="line-1083" name="line-1083"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">env</span><span class="p">;</span> +<a id="line-1084" name="line-1084"></a><span class="p">}</span> +<a id="line-1085" name="line-1085"></a> +<a id="line-1086" name="line-1086"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1087" name="line-1087"></a><span class="nf">egg_desktop_file_launchv</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-1088" name="line-1088"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">documents</span><span class="p">,</span><span class="w"> </span><span class="kt">va_list</span><span class="w"> </span><span class="n">args</span><span class="p">,</span> +<a id="line-1089" name="line-1089"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-1090" name="line-1090"></a><span class="p">{</span> +<a id="line-1091" name="line-1091"></a><span class="w"> </span><span class="n">EggDesktopFileLaunchOption</span><span class="w"> </span><span class="n">option</span><span class="p">;</span> +<a id="line-1092" name="line-1092"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">translated_documents</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">docs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1093" name="line-1093"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">;</span> +<a id="line-1094" name="line-1094"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-1095" name="line-1095"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">success</span><span class="p">,</span><span class="w"> </span><span class="n">current_success</span><span class="p">;</span> +<a id="line-1096" name="line-1096"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-1097" name="line-1097"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">startup_id</span><span class="p">;</span> +<a id="line-1098" name="line-1098"></a> +<a id="line-1099" name="line-1099"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1100" name="line-1100"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">variables</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1101" name="line-1101"></a><span class="w"> </span><span class="n">GdkScreen</span><span class="w"> </span><span class="o">*</span><span class="n">screen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1102" name="line-1102"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">workspace</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-1103" name="line-1103"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">directory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1104" name="line-1104"></a><span class="w"> </span><span class="n">guint32</span><span class="w"> </span><span class="n">launch_time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">guint32</span><span class="p">)</span><span class="mi">-1</span><span class="p">;</span> +<a id="line-1105" name="line-1105"></a><span class="w"> </span><span class="n">GSpawnFlags</span><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_SPAWN_SEARCH_PATH</span><span class="p">;</span> +<a id="line-1106" name="line-1106"></a><span class="w"> </span><span class="n">GSpawnChildSetupFunc</span><span class="w"> </span><span class="n">setup_func</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1107" name="line-1107"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">setup_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1108" name="line-1108"></a> +<a id="line-1109" name="line-1109"></a><span class="w"> </span><span class="n">GPid</span><span class="w"> </span><span class="o">*</span><span class="n">ret_pid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1110" name="line-1110"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">ret_stdin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">ret_stdout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">ret_stderr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1111" name="line-1111"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">ret_startup_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1112" name="line-1112"></a> +<a id="line-1113" name="line-1113"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">documents</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">desktop_file</span><span class="o">-></span><span class="n">document_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-1114" name="line-1114"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1115" name="line-1115"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR</span><span class="p">,</span> +<a id="line-1116" name="line-1116"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR_NOT_LAUNCHABLE</span><span class="p">,</span> +<a id="line-1117" name="line-1117"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Application does not accept documents on command line"</span><span class="p">));</span> +<a id="line-1118" name="line-1118"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1119" name="line-1119"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1120" name="line-1120"></a> +<a id="line-1121" name="line-1121"></a><span class="w"> </span><span class="cm">/* Read the options: technically it's incorrect for the caller to</span> +<a id="line-1122" name="line-1122"></a><span class="cm"> * NULL-terminate the list of options (rather than 0-terminating</span> +<a id="line-1123" name="line-1123"></a><span class="cm"> * it), but NULL-terminating lets us use G_GNUC_NULL_TERMINATED,</span> +<a id="line-1124" name="line-1124"></a><span class="cm"> * it's more consistent with other glib/gtk methods, and it will</span> +<a id="line-1125" name="line-1125"></a><span class="cm"> * work as long as sizeof (int) <= sizeof (NULL), and NULL is</span> +<a id="line-1126" name="line-1126"></a><span class="cm"> * represented as 0. (Which is true everywhere we care about.)</span> +<a id="line-1127" name="line-1127"></a><span class="cm"> */</span> +<a id="line-1128" name="line-1128"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="n">option</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">EggDesktopFileLaunchOption</span><span class="p">)))</span> +<a id="line-1129" name="line-1129"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1130" name="line-1130"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">option</span><span class="p">)</span> +<a id="line-1131" name="line-1131"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1132" name="line-1132"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_CLEARENV</span><span class="p">:</span> +<a id="line-1133" name="line-1133"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">)</span> +<a id="line-1134" name="line-1134"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1135" name="line-1135"></a><span class="w"> </span><span class="n">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1136" name="line-1136"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1137" name="line-1137"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_PUTENV</span><span class="p">:</span> +<a id="line-1138" name="line-1138"></a><span class="w"> </span><span class="n">variables</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">);</span> +<a id="line-1139" name="line-1139"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">variables</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-1140" name="line-1140"></a><span class="w"> </span><span class="n">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">array_putenv</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="n">variables</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-1141" name="line-1141"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1142" name="line-1142"></a> +<a id="line-1143" name="line-1143"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_SCREEN</span><span class="p">:</span> +<a id="line-1144" name="line-1144"></a><span class="w"> </span><span class="n">screen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">GdkScreen</span><span class="w"> </span><span class="o">*</span><span class="p">);</span> +<a id="line-1145" name="line-1145"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1146" name="line-1146"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_WORKSPACE</span><span class="p">:</span> +<a id="line-1147" name="line-1147"></a><span class="w"> </span><span class="n">workspace</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="p">);</span> +<a id="line-1148" name="line-1148"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1149" name="line-1149"></a> +<a id="line-1150" name="line-1150"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_DIRECTORY</span><span class="p">:</span> +<a id="line-1151" name="line-1151"></a><span class="w"> </span><span class="n">directory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">);</span> +<a id="line-1152" name="line-1152"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1153" name="line-1153"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_TIME</span><span class="p">:</span> +<a id="line-1154" name="line-1154"></a><span class="w"> </span><span class="n">launch_time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">guint32</span><span class="p">);</span> +<a id="line-1155" name="line-1155"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1156" name="line-1156"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_FLAGS</span><span class="p">:</span> +<a id="line-1157" name="line-1157"></a><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">|=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">GSpawnFlags</span><span class="p">);</span> +<a id="line-1158" name="line-1158"></a><span class="w"> </span><span class="cm">/* Make sure they didn't set any flags that don't make sense. */</span> +<a id="line-1159" name="line-1159"></a><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">&=</span><span class="w"> </span><span class="o">~</span><span class="n">G_SPAWN_FILE_AND_ARGV_ZERO</span><span class="p">;</span> +<a id="line-1160" name="line-1160"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1161" name="line-1161"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_SETUP_FUNC</span><span class="p">:</span> +<a id="line-1162" name="line-1162"></a><span class="w"> </span><span class="n">setup_func</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">GSpawnChildSetupFunc</span><span class="p">);</span> +<a id="line-1163" name="line-1163"></a><span class="w"> </span><span class="n">setup_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="p">);</span> +<a id="line-1164" name="line-1164"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1165" name="line-1165"></a> +<a id="line-1166" name="line-1166"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_RETURN_PID</span><span class="p">:</span> +<a id="line-1167" name="line-1167"></a><span class="w"> </span><span class="n">ret_pid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">GPid</span><span class="w"> </span><span class="o">*</span><span class="p">);</span> +<a id="line-1168" name="line-1168"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1169" name="line-1169"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_RETURN_STDIN_PIPE</span><span class="p">:</span> +<a id="line-1170" name="line-1170"></a><span class="w"> </span><span class="n">ret_stdin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="p">);</span> +<a id="line-1171" name="line-1171"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1172" name="line-1172"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_RETURN_STDOUT_PIPE</span><span class="p">:</span> +<a id="line-1173" name="line-1173"></a><span class="w"> </span><span class="n">ret_stdout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="p">);</span> +<a id="line-1174" name="line-1174"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1175" name="line-1175"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_RETURN_STDERR_PIPE</span><span class="p">:</span> +<a id="line-1176" name="line-1176"></a><span class="w"> </span><span class="n">ret_stderr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="p">);</span> +<a id="line-1177" name="line-1177"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1178" name="line-1178"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_LAUNCH_RETURN_STARTUP_ID</span><span class="p">:</span> +<a id="line-1179" name="line-1179"></a><span class="w"> </span><span class="n">ret_startup_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">);</span> +<a id="line-1180" name="line-1180"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1181" name="line-1181"></a> +<a id="line-1182" name="line-1182"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR</span><span class="p">,</span> +<a id="line-1184" name="line-1184"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR_UNRECOGNIZED_OPTION</span><span class="p">,</span> +<a id="line-1185" name="line-1185"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unrecognized launch option: %d"</span><span class="p">),</span> +<a id="line-1186" name="line-1186"></a><span class="w"> </span><span class="n">GPOINTER_TO_INT</span><span class="w"> </span><span class="p">(</span><span class="n">option</span><span class="p">));</span> +<a id="line-1187" name="line-1187"></a><span class="w"> </span><span class="n">success</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1188" name="line-1188"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-1189" name="line-1189"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1190" name="line-1190"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1191" name="line-1191"></a> +<a id="line-1192" name="line-1192"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">)</span> +<a id="line-1193" name="line-1193"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1194" name="line-1194"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_screen_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">);</span> +<a id="line-1195" name="line-1195"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">display_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_display_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">));</span> +<a id="line-1196" name="line-1196"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">display_env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"DISPLAY=%s"</span><span class="p">,</span><span class="w"> </span><span class="n">display_name</span><span class="p">);</span> +<a id="line-1197" name="line-1197"></a><span class="w"> </span><span class="n">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">array_putenv</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="n">display_env</span><span class="p">);</span> +<a id="line-1198" name="line-1198"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">display_name</span><span class="p">);</span> +<a id="line-1199" name="line-1199"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">display_env</span><span class="p">);</span> +<a id="line-1200" name="line-1200"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1201" name="line-1201"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1202" name="line-1202"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1203" name="line-1203"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_default</span><span class="w"> </span><span class="p">();</span> +<a id="line-1204" name="line-1204"></a><span class="w"> </span><span class="n">screen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_default_screen</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-1205" name="line-1205"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1206" name="line-1206"></a> +<a id="line-1207" name="line-1207"></a><span class="w"> </span><span class="n">translated_documents</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">translate_document_list</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">,</span><span class="w"> </span><span class="n">documents</span><span class="p">);</span> +<a id="line-1208" name="line-1208"></a><span class="w"> </span><span class="n">docs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">translated_documents</span><span class="p">;</span> +<a id="line-1209" name="line-1209"></a> +<a id="line-1210" name="line-1210"></a><span class="w"> </span><span class="n">success</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1211" name="line-1211"></a> +<a id="line-1212" name="line-1212"></a><span class="w"> </span><span class="k">do</span> +<a id="line-1213" name="line-1213"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1214" name="line-1214"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">parse_exec</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">docs</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-1215" name="line-1215"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">command</span><span class="p">)</span> +<a id="line-1216" name="line-1216"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-1217" name="line-1217"></a> +<a id="line-1218" name="line-1218"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_shell_parse_argv</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">))</span> +<a id="line-1219" name="line-1219"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1220" name="line-1220"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">);</span> +<a id="line-1221" name="line-1221"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-1222" name="line-1222"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1223" name="line-1223"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">);</span> +<a id="line-1224" name="line-1224"></a> +<a id="line-1225" name="line-1225"></a><span class="w"> </span><span class="n">startup_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1226" name="line-1226"></a> +<a id="line-1227" name="line-1227"></a><span class="cp">#if defined(GDK_WINDOWING_X11) || defined(HAVE_X11)</span> +<a id="line-1228" name="line-1228"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_IS_X11_DISPLAY</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">))</span> +<a id="line-1229" name="line-1229"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1230" name="line-1230"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">screen_num</span><span class="p">;</span> +<a id="line-1231" name="line-1231"></a> +<a id="line-1232" name="line-1232"></a><span class="w"> </span><span class="n">screen_num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_x11_screen_get_screen_number</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">);</span> +<a id="line-1233" name="line-1233"></a><span class="w"> </span><span class="n">startup_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">start_startup_notification</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-1234" name="line-1234"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span><span class="w"> </span><span class="n">screen_num</span><span class="p">,</span> +<a id="line-1235" name="line-1235"></a><span class="w"> </span><span class="n">workspace</span><span class="p">,</span><span class="w"> </span><span class="n">launch_time</span><span class="p">);</span> +<a id="line-1236" name="line-1236"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">startup_id</span><span class="p">)</span> +<a id="line-1237" name="line-1237"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1238" name="line-1238"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">startup_id_env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"DESKTOP_STARTUP_ID=%s"</span><span class="p">,</span> +<a id="line-1239" name="line-1239"></a><span class="w"> </span><span class="n">startup_id</span><span class="p">);</span> +<a id="line-1240" name="line-1240"></a><span class="w"> </span><span class="n">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">array_putenv</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="n">startup_id_env</span><span class="p">);</span> +<a id="line-1241" name="line-1241"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">startup_id_env</span><span class="p">);</span> +<a id="line-1242" name="line-1242"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1243" name="line-1243"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1244" name="line-1244"></a><span class="cp">#else</span> +<a id="line-1245" name="line-1245"></a><span class="w"> </span><span class="c1">// Suppress unused variable warnings when not compiling with X</span> +<a id="line-1246" name="line-1246"></a><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">workspace</span><span class="p">;</span> +<a id="line-1247" name="line-1247"></a><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">launch_time</span><span class="p">;</span> +<a id="line-1248" name="line-1248"></a><span class="cp">#endif</span> +<a id="line-1249" name="line-1249"></a> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1251" name="line-1251"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1252" name="line-1252"></a> +<a id="line-1253" name="line-1253"></a><span class="w"> </span><span class="n">current_success</span><span class="w"> </span><span class="o">=</span> +<a id="line-1254" name="line-1254"></a><span class="w"> </span><span class="n">g_spawn_async_with_pipes</span><span class="w"> </span><span class="p">(</span><span class="n">directory</span><span class="p">,</span> +<a id="line-1255" name="line-1255"></a><span class="w"> </span><span class="n">argv</span><span class="p">,</span> +<a id="line-1256" name="line-1256"></a><span class="w"> </span><span class="n">env</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)(</span><span class="n">env</span><span class="o">-></span><span class="n">pdata</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1257" name="line-1257"></a><span class="w"> </span><span class="n">flags</span><span class="p">,</span> +<a id="line-1258" name="line-1258"></a><span class="w"> </span><span class="n">setup_func</span><span class="p">,</span><span class="w"> </span><span class="n">setup_data</span><span class="p">,</span> +<a id="line-1259" name="line-1259"></a><span class="w"> </span><span class="n">ret_pid</span><span class="p">,</span> +<a id="line-1260" name="line-1260"></a><span class="w"> </span><span class="n">ret_stdin</span><span class="p">,</span><span class="w"> </span><span class="n">ret_stdout</span><span class="p">,</span><span class="w"> </span><span class="n">ret_stderr</span><span class="p">,</span> +<a id="line-1261" name="line-1261"></a><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-1262" name="line-1262"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">argv</span><span class="p">);</span> +<a id="line-1263" name="line-1263"></a> +<a id="line-1264" name="line-1264"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">startup_id</span><span class="p">)</span> +<a id="line-1265" name="line-1265"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1266" name="line-1266"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">current_success</span><span class="p">)</span> +<a id="line-1267" name="line-1267"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1268" name="line-1268"></a><span class="cp">#if defined(GDK_WINDOWING_X11) || defined(HAVE_X11)</span> +<a id="line-1269" name="line-1269"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_IS_X11_DISPLAY</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">))</span> +<a id="line-1270" name="line-1270"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1271" name="line-1271"></a><span class="w"> </span><span class="n">set_startup_notification_timeout</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">startup_id</span><span class="p">);</span> +<a id="line-1272" name="line-1272"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1273" name="line-1273"></a><span class="cp">#endif</span> +<a id="line-1274" name="line-1274"></a> +<a id="line-1275" name="line-1275"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret_startup_id</span><span class="p">)</span> +<a id="line-1276" name="line-1276"></a><span class="w"> </span><span class="o">*</span><span class="n">ret_startup_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">startup_id</span><span class="p">;</span> +<a id="line-1277" name="line-1277"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1278" name="line-1278"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">startup_id</span><span class="p">);</span> +<a id="line-1279" name="line-1279"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1280" name="line-1280"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1281" name="line-1281"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">startup_id</span><span class="p">);</span> +<a id="line-1282" name="line-1282"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1283" name="line-1283"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret_startup_id</span><span class="p">)</span> +<a id="line-1284" name="line-1284"></a><span class="w"> </span><span class="o">*</span><span class="n">ret_startup_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1285" name="line-1285"></a> +<a id="line-1286" name="line-1286"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">current_success</span><span class="p">)</span> +<a id="line-1287" name="line-1287"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1288" name="line-1288"></a><span class="w"> </span><span class="cm">/* If we successfully launch any instances of the app, make</span> +<a id="line-1289" name="line-1289"></a><span class="cm"> * sure we return TRUE and don't set @error.</span> +<a id="line-1290" name="line-1290"></a><span class="cm"> */</span> +<a id="line-1291" name="line-1291"></a><span class="w"> </span><span class="n">success</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1292" name="line-1292"></a><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1293" name="line-1293"></a> +<a id="line-1294" name="line-1294"></a><span class="w"> </span><span class="cm">/* Also, only set the output params on the first one */</span> +<a id="line-1295" name="line-1295"></a><span class="w"> </span><span class="n">ret_pid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1296" name="line-1296"></a><span class="w"> </span><span class="n">ret_stdin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ret_stdout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ret_stderr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1297" name="line-1297"></a><span class="w"> </span><span class="n">ret_startup_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1298" name="line-1298"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1299" name="line-1299"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1300" name="line-1300"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">docs</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">current_success</span><span class="p">);</span> +<a id="line-1301" name="line-1301"></a> +<a id="line-1302" name="line-1302"></a><span class="w"> </span><span class="nl">out</span><span class="p">:</span> +<a id="line-1303" name="line-1303"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">)</span> +<a id="line-1304" name="line-1304"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1305" name="line-1305"></a><span class="w"> </span><span class="n">g_ptr_array_set_free_func</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="n">g_free</span><span class="p">);</span> +<a id="line-1306" name="line-1306"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">env</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1307" name="line-1307"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1308" name="line-1308"></a><span class="w"> </span><span class="n">free_document_list</span><span class="w"> </span><span class="p">(</span><span class="n">translated_documents</span><span class="p">);</span> +<a id="line-1309" name="line-1309"></a> +<a id="line-1310" name="line-1310"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">success</span><span class="p">;</span> +<a id="line-1311" name="line-1311"></a><span class="p">}</span> +<a id="line-1312" name="line-1312"></a> +<a id="line-1313" name="line-1313"></a><span class="cm">/**</span> +<a id="line-1314" name="line-1314"></a><span class="cm"> * egg_desktop_file_launch:</span> +<a id="line-1315" name="line-1315"></a><span class="cm"> * @desktop_file: an #EggDesktopFile</span> +<a id="line-1316" name="line-1316"></a><span class="cm"> * @documents: a list of URIs or paths to documents to open</span> +<a id="line-1317" name="line-1317"></a><span class="cm"> * @error: error pointer</span> +<a id="line-1318" name="line-1318"></a><span class="cm"> * @...: additional options</span> +<a id="line-1319" name="line-1319"></a><span class="cm"> *</span> +<a id="line-1320" name="line-1320"></a><span class="cm"> * Launches @desktop_file with the given arguments. Additional options</span> +<a id="line-1321" name="line-1321"></a><span class="cm"> * can be specified as follows:</span> +<a id="line-1322" name="line-1322"></a><span class="cm"> *</span> +<a id="line-1323" name="line-1323"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_CLEARENV: (no arguments)</span> +<a id="line-1324" name="line-1324"></a><span class="cm"> * clears the environment in the child process</span> +<a id="line-1325" name="line-1325"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_PUTENV: (char **variables)</span> +<a id="line-1326" name="line-1326"></a><span class="cm"> * adds the NAME=VALUE strings in the given %NULL-terminated</span> +<a id="line-1327" name="line-1327"></a><span class="cm"> * array to the child process's environment</span> +<a id="line-1328" name="line-1328"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_SCREEN: (GdkScreen *screen)</span> +<a id="line-1329" name="line-1329"></a><span class="cm"> * causes the application to be launched on the given screen</span> +<a id="line-1330" name="line-1330"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_WORKSPACE: (int workspace)</span> +<a id="line-1331" name="line-1331"></a><span class="cm"> * causes the application to be launched on the given workspace</span> +<a id="line-1332" name="line-1332"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_DIRECTORY: (char *dir)</span> +<a id="line-1333" name="line-1333"></a><span class="cm"> * causes the application to be launched in the given directory</span> +<a id="line-1334" name="line-1334"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_TIME: (guint32 launch_time)</span> +<a id="line-1335" name="line-1335"></a><span class="cm"> * sets the "launch time" for the application. If the user</span> +<a id="line-1336" name="line-1336"></a><span class="cm"> * interacts with another window after @launch_time but before</span> +<a id="line-1337" name="line-1337"></a><span class="cm"> * the launched application creates its first window, the window</span> +<a id="line-1338" name="line-1338"></a><span class="cm"> * manager may choose to not give focus to the new application.</span> +<a id="line-1339" name="line-1339"></a><span class="cm"> * Passing 0 for @launch_time will explicitly request that the</span> +<a id="line-1340" name="line-1340"></a><span class="cm"> * application not receive focus.</span> +<a id="line-1341" name="line-1341"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_FLAGS (GSpawnFlags flags)</span> +<a id="line-1342" name="line-1342"></a><span class="cm"> * Sets additional #GSpawnFlags to use. See g_spawn_async() for</span> +<a id="line-1343" name="line-1343"></a><span class="cm"> * more details.</span> +<a id="line-1344" name="line-1344"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_SETUP_FUNC (GSpawnChildSetupFunc, gpointer)</span> +<a id="line-1345" name="line-1345"></a><span class="cm"> * Sets the child setup callback and the data to pass to it.</span> +<a id="line-1346" name="line-1346"></a><span class="cm"> * (See g_spawn_async() for more details.)</span> +<a id="line-1347" name="line-1347"></a><span class="cm"> *</span> +<a id="line-1348" name="line-1348"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_RETURN_PID (GPid **pid)</span> +<a id="line-1349" name="line-1349"></a><span class="cm"> * On a successful launch, sets *@pid to the PID of the launched</span> +<a id="line-1350" name="line-1350"></a><span class="cm"> * application.</span> +<a id="line-1351" name="line-1351"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_RETURN_STARTUP_ID (char **startup_id)</span> +<a id="line-1352" name="line-1352"></a><span class="cm"> * On a successful launch, sets *@startup_id to the Startup</span> +<a id="line-1353" name="line-1353"></a><span class="cm"> * Notification "startup id" of the launched application.</span> +<a id="line-1354" name="line-1354"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_RETURN_STDIN_PIPE (int *fd)</span> +<a id="line-1355" name="line-1355"></a><span class="cm"> * On a successful launch, sets *@fd to the file descriptor of</span> +<a id="line-1356" name="line-1356"></a><span class="cm"> * a pipe connected to the application's stdin.</span> +<a id="line-1357" name="line-1357"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_RETURN_STDOUT_PIPE (int *fd)</span> +<a id="line-1358" name="line-1358"></a><span class="cm"> * On a successful launch, sets *@fd to the file descriptor of</span> +<a id="line-1359" name="line-1359"></a><span class="cm"> * a pipe connected to the application's stdout.</span> +<a id="line-1360" name="line-1360"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_RETURN_STDERR_PIPE (int *fd)</span> +<a id="line-1361" name="line-1361"></a><span class="cm"> * On a successful launch, sets *@fd to the file descriptor of</span> +<a id="line-1362" name="line-1362"></a><span class="cm"> * a pipe connected to the application's stderr.</span> +<a id="line-1363" name="line-1363"></a><span class="cm"> *</span> +<a id="line-1364" name="line-1364"></a><span class="cm"> * The options should be terminated with a single %NULL.</span> +<a id="line-1365" name="line-1365"></a><span class="cm"> *</span> +<a id="line-1366" name="line-1366"></a><span class="cm"> * If @documents contains multiple documents, but</span> +<a id="line-1367" name="line-1367"></a><span class="cm"> * egg_desktop_file_accepts_multiple() returns %FALSE for</span> +<a id="line-1368" name="line-1368"></a><span class="cm"> * @desktop_file, then egg_desktop_file_launch() will actually launch</span> +<a id="line-1369" name="line-1369"></a><span class="cm"> * multiple instances of the application. In that case, the return</span> +<a id="line-1370" name="line-1370"></a><span class="cm"> * value (as well as any values passed via</span> +<a id="line-1371" name="line-1371"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_RETURN_PID, etc) will only reflect the</span> +<a id="line-1372" name="line-1372"></a><span class="cm"> * first instance of the application that was launched (but the</span> +<a id="line-1373" name="line-1373"></a><span class="cm"> * %EGG_DESKTOP_FILE_LAUNCH_SETUP_FUNC will be called for each</span> +<a id="line-1374" name="line-1374"></a><span class="cm"> * instance).</span> +<a id="line-1375" name="line-1375"></a><span class="cm"> *</span> +<a id="line-1376" name="line-1376"></a><span class="cm"> * Return value: %TRUE if the application was successfully launched.</span> +<a id="line-1377" name="line-1377"></a><span class="cm"> **/</span> +<a id="line-1378" name="line-1378"></a><span class="n">gboolean</span> +<a id="line-1379" name="line-1379"></a><span class="nf">egg_desktop_file_launch</span><span class="w"> </span><span class="p">(</span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-1380" name="line-1380"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">documents</span><span class="p">,</span><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">,</span> +<a id="line-1381" name="line-1381"></a><span class="w"> </span><span class="p">...)</span> +<a id="line-1382" name="line-1382"></a><span class="p">{</span> +<a id="line-1383" name="line-1383"></a><span class="w"> </span><span class="kt">va_list</span><span class="w"> </span><span class="n">args</span><span class="p">;</span> +<a id="line-1384" name="line-1384"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">success</span><span class="p">;</span> +<a id="line-1385" name="line-1385"></a><span class="w"> </span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">app_desktop_file</span><span class="p">;</span> +<a id="line-1386" name="line-1386"></a> +<a id="line-1387" name="line-1387"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="o">-></span><span class="n">type</span><span class="p">)</span> +<a id="line-1388" name="line-1388"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1389" name="line-1389"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_TYPE_APPLICATION</span><span class="p">:</span> +<a id="line-1390" name="line-1390"></a><span class="w"> </span><span class="n">va_start</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-1391" name="line-1391"></a><span class="w"> </span><span class="n">success</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_desktop_file_launchv</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">,</span><span class="w"> </span><span class="n">documents</span><span class="p">,</span> +<a id="line-1392" name="line-1392"></a><span class="w"> </span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-1393" name="line-1393"></a><span class="w"> </span><span class="n">va_end</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">);</span> +<a id="line-1394" name="line-1394"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1395" name="line-1395"></a> +<a id="line-1396" name="line-1396"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_TYPE_LINK</span><span class="p">:</span> +<a id="line-1397" name="line-1397"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">documents</span><span class="p">)</span> +<a id="line-1398" name="line-1398"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1399" name="line-1399"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR</span><span class="p">,</span> +<a id="line-1400" name="line-1400"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR_NOT_LAUNCHABLE</span><span class="p">,</span> +<a id="line-1401" name="line-1401"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Can't pass document URIs to a 'Type=Link' desktop entry"</span><span class="p">));</span> +<a id="line-1402" name="line-1402"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1403" name="line-1403"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1404" name="line-1404"></a> +<a id="line-1405" name="line-1405"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">parse_link</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">app_desktop_file</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">documents</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">))</span> +<a id="line-1406" name="line-1406"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1407" name="line-1407"></a> +<a id="line-1408" name="line-1408"></a><span class="w"> </span><span class="n">va_start</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-1409" name="line-1409"></a><span class="w"> </span><span class="n">success</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_desktop_file_launchv</span><span class="w"> </span><span class="p">(</span><span class="n">app_desktop_file</span><span class="p">,</span><span class="w"> </span><span class="n">documents</span><span class="p">,</span> +<a id="line-1410" name="line-1410"></a><span class="w"> </span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-1411" name="line-1411"></a><span class="w"> </span><span class="n">va_end</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">);</span> +<a id="line-1412" name="line-1412"></a> +<a id="line-1413" name="line-1413"></a><span class="w"> </span><span class="n">egg_desktop_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">app_desktop_file</span><span class="p">);</span> +<a id="line-1414" name="line-1414"></a><span class="w"> </span><span class="n">free_document_list</span><span class="w"> </span><span class="p">(</span><span class="n">documents</span><span class="p">);</span> +<a id="line-1415" name="line-1415"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1416" name="line-1416"></a> +<a id="line-1417" name="line-1417"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_TYPE_UNRECOGNIZED</span><span class="p">:</span> +<a id="line-1418" name="line-1418"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">EGG_DESKTOP_FILE_TYPE_DIRECTORY</span><span class="p">:</span> +<a id="line-1419" name="line-1419"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1420" name="line-1420"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR</span><span class="p">,</span> +<a id="line-1421" name="line-1421"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_ERROR_NOT_LAUNCHABLE</span><span class="p">,</span> +<a id="line-1422" name="line-1422"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Not a launchable item"</span><span class="p">));</span> +<a id="line-1423" name="line-1423"></a><span class="w"> </span><span class="n">success</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1424" name="line-1424"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1425" name="line-1425"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1426" name="line-1426"></a> +<a id="line-1427" name="line-1427"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">success</span><span class="p">;</span> +<a id="line-1428" name="line-1428"></a><span class="p">}</span> +<a id="line-1429" name="line-1429"></a> +<a id="line-1430" name="line-1430"></a> +<a id="line-1431" name="line-1431"></a><span class="n">GQuark</span> +<a id="line-1432" name="line-1432"></a><span class="nf">egg_desktop_file_error_quark</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-1433" name="line-1433"></a><span class="p">{</span> +<a id="line-1434" name="line-1434"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_quark_from_static_string</span><span class="w"> </span><span class="p">(</span><span class="s">"egg-desktop_file-error-quark"</span><span class="p">);</span> +<a id="line-1435" name="line-1435"></a><span class="p">}</span> +<a id="line-1436" name="line-1436"></a> +<a id="line-1437" name="line-1437"></a> +<a id="line-1438" name="line-1438"></a><span class="n">G_LOCK_DEFINE_STATIC</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="p">);</span> +<a id="line-1439" name="line-1439"></a><span class="k">static</span><span class="w"> </span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">egg_desktop_file</span><span class="p">;</span> +<a id="line-1440" name="line-1440"></a> +<a id="line-1441" name="line-1441"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1442" name="line-1442"></a><span class="nf">egg_set_desktop_file_internal</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file_path</span><span class="p">,</span> +<a id="line-1443" name="line-1443"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">set_defaults</span><span class="p">)</span> +<a id="line-1444" name="line-1444"></a><span class="p">{</span> +<a id="line-1445" name="line-1445"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1446" name="line-1446"></a> +<a id="line-1447" name="line-1447"></a><span class="w"> </span><span class="n">G_LOCK</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="p">);</span> +<a id="line-1448" name="line-1448"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="p">)</span> +<a id="line-1449" name="line-1449"></a><span class="w"> </span><span class="n">egg_desktop_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="p">);</span> +<a id="line-1450" name="line-1450"></a> +<a id="line-1451" name="line-1451"></a><span class="w"> </span><span class="n">egg_desktop_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_desktop_file_new</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file_path</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-1452" name="line-1452"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span> +<a id="line-1453" name="line-1453"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1454" name="line-1454"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Could not load desktop file '%s': %s"</span><span class="p">,</span> +<a id="line-1455" name="line-1455"></a><span class="w"> </span><span class="n">desktop_file_path</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1456" name="line-1456"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-1457" name="line-1457"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1458" name="line-1458"></a> +<a id="line-1459" name="line-1459"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">set_defaults</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">egg_desktop_file</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1460" name="line-1460"></a><span class="w"> </span><span class="cm">/* Set localized application name and default window icon */</span> +<a id="line-1461" name="line-1461"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="o">-></span><span class="n">name</span><span class="p">)</span> +<a id="line-1462" name="line-1462"></a><span class="w"> </span><span class="n">g_set_application_name</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-1463" name="line-1463"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">)</span> +<a id="line-1464" name="line-1464"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1465" name="line-1465"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_path_is_absolute</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">))</span> +<a id="line-1466" name="line-1466"></a><span class="w"> </span><span class="n">gtk_window_set_default_icon_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1467" name="line-1467"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1468" name="line-1468"></a><span class="w"> </span><span class="n">gtk_window_set_default_icon_name</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="o">-></span><span class="n">icon</span><span class="p">);</span> +<a id="line-1469" name="line-1469"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1470" name="line-1470"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1471" name="line-1471"></a> +<a id="line-1472" name="line-1472"></a><span class="w"> </span><span class="n">G_UNLOCK</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="p">);</span> +<a id="line-1473" name="line-1473"></a><span class="p">}</span> +<a id="line-1474" name="line-1474"></a> +<a id="line-1475" name="line-1475"></a><span class="cm">/**</span> +<a id="line-1476" name="line-1476"></a><span class="cm"> * egg_set_desktop_file:</span> +<a id="line-1477" name="line-1477"></a><span class="cm"> * @desktop_file_path: path to the application's desktop file</span> +<a id="line-1478" name="line-1478"></a><span class="cm"> *</span> +<a id="line-1479" name="line-1479"></a><span class="cm"> * Creates an #EggDesktopFile for the application from the data at</span> +<a id="line-1480" name="line-1480"></a><span class="cm"> * @desktop_file_path. This will also call g_set_application_name()</span> +<a id="line-1481" name="line-1481"></a><span class="cm"> * with the localized application name from the desktop file, and</span> +<a id="line-1482" name="line-1482"></a><span class="cm"> * gtk_window_set_default_icon_name() or</span> +<a id="line-1483" name="line-1483"></a><span class="cm"> * gtk_window_set_default_icon_from_file() with the application's</span> +<a id="line-1484" name="line-1484"></a><span class="cm"> * icon. Other code may use additional information from the desktop</span> +<a id="line-1485" name="line-1485"></a><span class="cm"> * file.</span> +<a id="line-1486" name="line-1486"></a><span class="cm"> * See egg_set_desktop_file_without_defaults() for a variant of this</span> +<a id="line-1487" name="line-1487"></a><span class="cm"> * function that does not set the application name and default window</span> +<a id="line-1488" name="line-1488"></a><span class="cm"> * icon.</span> +<a id="line-1489" name="line-1489"></a><span class="cm"> *</span> +<a id="line-1490" name="line-1490"></a><span class="cm"> * Note that for thread safety reasons, this function can only</span> +<a id="line-1491" name="line-1491"></a><span class="cm"> * be called once, and is mutually exclusive with calling</span> +<a id="line-1492" name="line-1492"></a><span class="cm"> * egg_set_desktop_file_without_defaults().</span> +<a id="line-1493" name="line-1493"></a><span class="cm"> **/</span> +<a id="line-1494" name="line-1494"></a><span class="kt">void</span> +<a id="line-1495" name="line-1495"></a><span class="nf">egg_set_desktop_file</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file_path</span><span class="p">)</span> +<a id="line-1496" name="line-1496"></a><span class="p">{</span> +<a id="line-1497" name="line-1497"></a><span class="w"> </span><span class="n">egg_set_desktop_file_internal</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file_path</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1498" name="line-1498"></a><span class="p">}</span> +<a id="line-1499" name="line-1499"></a> +<a id="line-1500" name="line-1500"></a><span class="cm">/**</span> +<a id="line-1501" name="line-1501"></a><span class="cm"> * egg_set_desktop_file_without_defaults:</span> +<a id="line-1502" name="line-1502"></a><span class="cm"> * @desktop_file_path: path to the application's desktop file</span> +<a id="line-1503" name="line-1503"></a><span class="cm"> *</span> +<a id="line-1504" name="line-1504"></a><span class="cm"> * Creates an #EggDesktopFile for the application from the data at</span> +<a id="line-1505" name="line-1505"></a><span class="cm"> * @desktop_file_path.</span> +<a id="line-1506" name="line-1506"></a><span class="cm"> * See egg_set_desktop_file() for a variant of this function that</span> +<a id="line-1507" name="line-1507"></a><span class="cm"> * sets the application name and default window icon from the information</span> +<a id="line-1508" name="line-1508"></a><span class="cm"> * in the desktop file.</span> +<a id="line-1509" name="line-1509"></a><span class="cm"> *</span> +<a id="line-1510" name="line-1510"></a><span class="cm"> * Note that for thread safety reasons, this function can only</span> +<a id="line-1511" name="line-1511"></a><span class="cm"> * be called once, and is mutually exclusive with calling</span> +<a id="line-1512" name="line-1512"></a><span class="cm"> * egg_set_desktop_file().</span> +<a id="line-1513" name="line-1513"></a><span class="cm"> **/</span> +<a id="line-1514" name="line-1514"></a><span class="kt">void</span> +<a id="line-1515" name="line-1515"></a><span class="nf">egg_set_desktop_file_without_defaults</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file_path</span><span class="p">)</span> +<a id="line-1516" name="line-1516"></a><span class="p">{</span> +<a id="line-1517" name="line-1517"></a><span class="w"> </span><span class="n">egg_set_desktop_file_internal</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file_path</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1518" name="line-1518"></a><span class="p">}</span> +<a id="line-1519" name="line-1519"></a> +<a id="line-1520" name="line-1520"></a><span class="cm">/**</span> +<a id="line-1521" name="line-1521"></a><span class="cm"> * egg_get_desktop_file:</span> +<a id="line-1522" name="line-1522"></a><span class="cm"> *</span> +<a id="line-1523" name="line-1523"></a><span class="cm"> * Gets the application's #EggDesktopFile, as set by</span> +<a id="line-1524" name="line-1524"></a><span class="cm"> * egg_set_desktop_file().</span> +<a id="line-1525" name="line-1525"></a><span class="cm"> *</span> +<a id="line-1526" name="line-1526"></a><span class="cm"> * Return value: the #EggDesktopFile, or %NULL if it hasn't been set.</span> +<a id="line-1527" name="line-1527"></a><span class="cm"> **/</span> +<a id="line-1528" name="line-1528"></a><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span> +<a id="line-1529" name="line-1529"></a><span class="nf">egg_get_desktop_file</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-1530" name="line-1530"></a><span class="p">{</span> +<a id="line-1531" name="line-1531"></a><span class="w"> </span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-1532" name="line-1532"></a> +<a id="line-1533" name="line-1533"></a><span class="w"> </span><span class="n">G_LOCK</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="p">);</span> +<a id="line-1534" name="line-1534"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_desktop_file</span><span class="p">;</span> +<a id="line-1535" name="line-1535"></a><span class="w"> </span><span class="n">G_UNLOCK</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file</span><span class="p">);</span> +<a id="line-1536" name="line-1536"></a> +<a id="line-1537" name="line-1537"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-1538" name="line-1538"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/11.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/11.html new file mode 100644 index 00000000..4124e396 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/11.html @@ -0,0 +1,3055 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: gsearchtool/mate-submodules/libegg/eggsmclient-xsmp.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> eggsmclient-xsmp.c</p> +<a href="11.html#line-182"> unknownMacro 182</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span> +<span class="normal">1328</span> +<span class="normal">1329</span> +<span class="normal">1330</span> +<span class="normal">1331</span> +<span class="normal">1332</span> +<span class="normal">1333</span> +<span class="normal">1334</span> +<span class="normal">1335</span> +<span class="normal">1336</span> +<span class="normal">1337</span> +<span class="normal">1338</span> +<span class="normal">1339</span> +<span class="normal">1340</span> +<span class="normal">1341</span> +<span class="normal">1342</span> +<span class="normal">1343</span> +<span class="normal">1344</span> +<span class="normal">1345</span> +<span class="normal">1346</span> +<span class="normal">1347</span> +<span class="normal">1348</span> +<span class="normal">1349</span> +<span class="normal">1350</span> +<span class="normal">1351</span> +<span class="normal">1352</span> +<span class="normal">1353</span> +<span class="normal">1354</span> +<span class="normal">1355</span> +<span class="normal">1356</span> +<span class="normal">1357</span> +<span class="normal">1358</span> +<span class="normal">1359</span> +<span class="normal">1360</span> +<span class="normal">1361</span> +<span class="normal">1362</span> +<span class="normal">1363</span> +<span class="normal">1364</span> +<span class="normal">1365</span> +<span class="normal">1366</span> +<span class="normal">1367</span> +<span class="normal">1368</span> +<span class="normal">1369</span> +<span class="normal">1370</span> +<span class="normal">1371</span> +<span class="normal">1372</span> +<span class="normal">1373</span> +<span class="normal">1374</span> +<span class="normal">1375</span> +<span class="normal">1376</span> +<span class="normal">1377</span> +<span class="normal">1378</span> +<span class="normal">1379</span> +<span class="normal">1380</span> +<span class="normal">1381</span> +<span class="normal">1382</span> +<span class="normal">1383</span> +<span class="normal">1384</span> +<span class="normal">1385</span> +<span class="normal">1386</span> +<span class="normal">1387</span> +<span class="normal">1388</span> +<span class="normal">1389</span> +<span class="normal">1390</span> +<span class="normal">1391</span> +<span class="normal">1392</span> +<span class="normal">1393</span> +<span class="normal">1394</span> +<span class="normal">1395</span> +<span class="normal">1396</span> +<span class="normal">1397</span> +<span class="normal">1398</span> +<span class="normal">1399</span> +<span class="normal">1400</span> +<span class="normal">1401</span> +<span class="normal">1402</span> +<span class="normal">1403</span> +<span class="normal">1404</span> +<span class="normal">1405</span> +<span class="normal">1406</span> +<span class="normal">1407</span> +<span class="normal">1408</span> +<span class="normal">1409</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/*</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2007 Novell, Inc.</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * Inspired by various other pieces of code including GsmClient (C)</span> +<a id="line-5" name="line-5"></a><span class="cm"> * 2001 Havoc Pennington, MateClient (C) 1998 Carsten Schaar, and twm</span> +<a id="line-6" name="line-6"></a><span class="cm"> * session code (C) 1998 The Open Group.</span> +<a id="line-7" name="line-7"></a><span class="cm"> *</span> +<a id="line-8" name="line-8"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span> +<a id="line-10" name="line-10"></a><span class="cm"> * License as published by the Free Software Foundation; either</span> +<a id="line-11" name="line-11"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span> +<a id="line-12" name="line-12"></a><span class="cm"> *</span> +<a id="line-13" name="line-13"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span> +<a id="line-14" name="line-14"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-15" name="line-15"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> +<a id="line-16" name="line-16"></a><span class="cm"> * Library General Public License for more details.</span> +<a id="line-17" name="line-17"></a><span class="cm"> *</span> +<a id="line-18" name="line-18"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span> +<a id="line-19" name="line-19"></a><span class="cm"> * License along with this library; if not, write to the</span> +<a id="line-20" name="line-20"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,</span> +<a id="line-21" name="line-21"></a><span class="cm"> * Boston, MA 02110-1301, USA.</span> +<a id="line-22" name="line-22"></a><span class="cm"> */</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"config.h"</span> +<a id="line-25" name="line-25"></a> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"eggsmclient.h"</span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"eggsmclient-private.h"</span> +<a id="line-28" name="line-28"></a> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"eggdesktopfile.h"</span> +<a id="line-30" name="line-30"></a> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><errno.h></span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><fcntl.h></span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><unistd.h></span> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><X11/SM/SMlib.h></span> +<a id="line-37" name="line-37"></a> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdk.h></span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="cp">#if defined(GDK_WINDOWING_X11) || defined(HAVE_X11)</span> +<a id="line-42" name="line-42"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkx.h></span> +<a id="line-43" name="line-43"></a><span class="cp">#endif</span> +<a id="line-44" name="line-44"></a> +<a id="line-45" name="line-45"></a><span class="cp">#define EGG_TYPE_SM_CLIENT_XSMP (egg_sm_client_xsmp_get_type ())</span> +<a id="line-46" name="line-46"></a><span class="cp">#define EGG_SM_CLIENT_XSMP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_SM_CLIENT_XSMP, EggSMClientXSMP))</span> +<a id="line-47" name="line-47"></a><span class="cp">#define EGG_SM_CLIENT_XSMP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_SM_CLIENT_XSMP, EggSMClientXSMPClass))</span> +<a id="line-48" name="line-48"></a><span class="cp">#define EGG_IS_SM_CLIENT_XSMP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_SM_CLIENT_XSMP))</span> +<a id="line-49" name="line-49"></a><span class="cp">#define EGG_IS_SM_CLIENT_XSMP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_SM_CLIENT_XSMP))</span> +<a id="line-50" name="line-50"></a><span class="cp">#define EGG_SM_CLIENT_XSMP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_SM_CLIENT_XSMP, EggSMClientXSMPClass))</span> +<a id="line-51" name="line-51"></a> +<a id="line-52" name="line-52"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">_EggSMClientXSMP</span><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="p">;</span> +<a id="line-53" name="line-53"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">_EggSMClientXSMPClass</span><span class="w"> </span><span class="n">EggSMClientXSMPClass</span><span class="p">;</span> +<a id="line-54" name="line-54"></a> +<a id="line-55" name="line-55"></a><span class="cm">/* These mostly correspond to the similarly-named states in section</span> +<a id="line-56" name="line-56"></a><span class="cm"> * 9.1 of the XSMP spec. Some of the states there aren't represented</span> +<a id="line-57" name="line-57"></a><span class="cm"> * here, because we don't need them. SHUTDOWN_CANCELLED is slightly</span> +<a id="line-58" name="line-58"></a><span class="cm"> * different from the spec; we use it when the client is IDLE after a</span> +<a id="line-59" name="line-59"></a><span class="cm"> * ShutdownCancelled message, but the application is still interacting</span> +<a id="line-60" name="line-60"></a><span class="cm"> * and doesn't know the shutdown has been cancelled yet.</span> +<a id="line-61" name="line-61"></a><span class="cm"> */</span> +<a id="line-62" name="line-62"></a><span class="k">typedef</span><span class="w"> </span><span class="k">enum</span> +<a id="line-63" name="line-63"></a><span class="p">{</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">XSMP_STATE_IDLE</span><span class="p">,</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">XSMP_STATE_SAVE_YOURSELF</span><span class="p">,</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">XSMP_STATE_INTERACT_REQUEST</span><span class="p">,</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">XSMP_STATE_INTERACT</span><span class="p">,</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">XSMP_STATE_SAVE_YOURSELF_DONE</span><span class="p">,</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">XSMP_STATE_SHUTDOWN_CANCELLED</span><span class="p">,</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">XSMP_STATE_CONNECTION_CLOSED</span> +<a id="line-71" name="line-71"></a><span class="p">}</span><span class="w"> </span><span class="n">EggSMClientXSMPState</span><span class="p">;</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">state_names</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span> +<a id="line-74" name="line-74"></a><span class="p">{</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="s">"idle"</span><span class="p">,</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="s">"save-yourself"</span><span class="p">,</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="s">"interact-request"</span><span class="p">,</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="s">"interact"</span><span class="p">,</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="s">"save-yourself-done"</span><span class="p">,</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="s">"shutdown-cancelled"</span><span class="p">,</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="s">"connection-closed"</span> +<a id="line-82" name="line-82"></a><span class="p">};</span> +<a id="line-83" name="line-83"></a> +<a id="line-84" name="line-84"></a><span class="cp">#define EGG_SM_CLIENT_XSMP_STATE(xsmp) (state_names[(xsmp)->state])</span> +<a id="line-85" name="line-85"></a> +<a id="line-86" name="line-86"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_EggSMClientXSMP</span> +<a id="line-87" name="line-87"></a><span class="p">{</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">EggSMClient</span><span class="w"> </span><span class="n">parent</span><span class="p">;</span> +<a id="line-89" name="line-89"></a> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">SmcConn</span><span class="w"> </span><span class="n">connection</span><span class="p">;</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">client_id</span><span class="p">;</span> +<a id="line-92" name="line-92"></a> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">EggSMClientXSMPState</span><span class="w"> </span><span class="n">state</span><span class="p">;</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">restart_command</span><span class="p">;</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">set_restart_command</span><span class="p">;</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">restart_style</span><span class="p">;</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">discard_command</span><span class="p">;</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">set_discard_command</span><span class="p">;</span> +<a id="line-99" name="line-99"></a> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">idle</span><span class="p">;</span> +<a id="line-101" name="line-101"></a> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="cm">/* Current SaveYourself state */</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">expecting_initial_save_yourself</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">need_save_state</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">need_quit_requested</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">interact_errors</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">shutting_down</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-108" name="line-108"></a> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="cm">/* Todo list */</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">waiting_to_set_initial_properties</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">waiting_to_emit_quit</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">waiting_to_emit_quit_cancelled</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">waiting_to_save_myself</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-114" name="line-114"></a> +<a id="line-115" name="line-115"></a><span class="p">};</span> +<a id="line-116" name="line-116"></a> +<a id="line-117" name="line-117"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_EggSMClientXSMPClass</span> +<a id="line-118" name="line-118"></a><span class="p">{</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">EggSMClientClass</span><span class="w"> </span><span class="n">parent_class</span><span class="p">;</span> +<a id="line-120" name="line-120"></a> +<a id="line-121" name="line-121"></a><span class="p">};</span> +<a id="line-122" name="line-122"></a> +<a id="line-123" name="line-123"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">sm_client_xsmp_startup</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">client_id</span><span class="p">);</span> +<a id="line-125" name="line-125"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">sm_client_xsmp_set_restart_command</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">);</span> +<a id="line-128" name="line-128"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">sm_client_xsmp_set_discard_command</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">);</span> +<a id="line-131" name="line-131"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">sm_client_xsmp_will_quit</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">will_quit</span><span class="p">);</span> +<a id="line-133" name="line-133"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">sm_client_xsmp_end_session</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">EggSMClientEndStyle</span><span class="w"> </span><span class="n">style</span><span class="p">,</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">request_confirmation</span><span class="p">);</span> +<a id="line-136" name="line-136"></a> +<a id="line-137" name="line-137"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">xsmp_save_yourself</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">,</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">save_style</span><span class="p">,</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">Bool</span><span class="w"> </span><span class="n">shutdown</span><span class="p">,</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">interact_style</span><span class="p">,</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">Bool</span><span class="w"> </span><span class="n">fast</span><span class="p">);</span> +<a id="line-143" name="line-143"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">xsmp_die</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">);</span> +<a id="line-145" name="line-145"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">xsmp_save_complete</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">);</span> +<a id="line-147" name="line-147"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">xsmp_shutdown_cancelled</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">);</span> +<a id="line-149" name="line-149"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">xsmp_interact</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">);</span> +<a id="line-151" name="line-151"></a> +<a id="line-152" name="line-152"></a><span class="k">static</span><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span><span class="nf">array_prop</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="p">...);</span> +<a id="line-154" name="line-154"></a><span class="k">static</span><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span><span class="nf">ptrarray_prop</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">values</span><span class="p">);</span> +<a id="line-156" name="line-156"></a><span class="k">static</span><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span><span class="nf">string_prop</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">);</span> +<a id="line-158" name="line-158"></a><span class="k">static</span><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span><span class="nf">card8_prop</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">value</span><span class="p">);</span> +<a id="line-160" name="line-160"></a> +<a id="line-161" name="line-161"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">set_properties</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="p">...);</span> +<a id="line-162" name="line-162"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">delete_properties</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="p">...);</span> +<a id="line-163" name="line-163"></a> +<a id="line-164" name="line-164"></a><span class="k">static</span><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="nf">generate_command</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">restart_command</span><span class="p">,</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">client_id</span><span class="p">,</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">state_file</span><span class="p">);</span> +<a id="line-167" name="line-167"></a> +<a id="line-168" name="line-168"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">save_state</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-169" name="line-169"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">do_save_yourself</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-170" name="line-170"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">update_pending_events</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-171" name="line-171"></a> +<a id="line-172" name="line-172"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">ice_init</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> +<a id="line-173" name="line-173"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">process_ice_messages</span><span class="w"> </span><span class="p">(</span><span class="n">IceConn</span><span class="w"> </span><span class="n">ice_conn</span><span class="p">);</span> +<a id="line-174" name="line-174"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">smc_error_handler</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">Bool</span><span class="w"> </span><span class="n">swap</span><span class="p">,</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">offending_minor_opcode</span><span class="p">,</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="n">offending_sequence</span><span class="p">,</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">error_class</span><span class="p">,</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">severity</span><span class="p">,</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">values</span><span class="p">);</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="hll"><span class="n">G_DEFINE_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="p">,</span><span class="w"> </span><span class="n">egg_sm_client_xsmp</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_TYPE_SM_CLIENT</span><span class="p">)</span><span class="error2"><--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.</span> +</span><a id="line-183" name="line-183"></a> +<a id="line-184" name="line-184"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-185" name="line-185"></a><span class="n">egg_sm_client_xsmp_init</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">)</span> +<a id="line-186" name="line-186"></a><span class="p">{</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_CONNECTION_CLOSED</span><span class="p">;</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_style</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SmRestartIfRunning</span><span class="p">;</span> +<a id="line-190" name="line-190"></a><span class="p">}</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-193" name="line-193"></a><span class="n">egg_sm_client_xsmp_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMPClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-194" name="line-194"></a><span class="p">{</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">EggSMClientClass</span><span class="w"> </span><span class="o">*</span><span class="n">sm_client_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EGG_SM_CLIENT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">sm_client_class</span><span class="o">-></span><span class="n">startup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sm_client_xsmp_startup</span><span class="p">;</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="n">sm_client_class</span><span class="o">-></span><span class="n">set_restart_command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sm_client_xsmp_set_restart_command</span><span class="p">;</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">sm_client_class</span><span class="o">-></span><span class="n">set_discard_command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sm_client_xsmp_set_discard_command</span><span class="p">;</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">sm_client_class</span><span class="o">-></span><span class="n">will_quit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sm_client_xsmp_will_quit</span><span class="p">;</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">sm_client_class</span><span class="o">-></span><span class="n">end_session</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sm_client_xsmp_end_session</span><span class="p">;</span> +<a id="line-202" name="line-202"></a><span class="p">}</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span> +<a id="line-205" name="line-205"></a><span class="n">egg_sm_client_xsmp_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-206" name="line-206"></a><span class="p">{</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_getenv</span><span class="w"> </span><span class="p">(</span><span class="s">"SESSION_MANAGER"</span><span class="p">))</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-209" name="line-209"></a> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_TYPE_SM_CLIENT_XSMP</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-211" name="line-211"></a><span class="p">}</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-214" name="line-214"></a><span class="n">sm_client_xsmp_set_initial_properties</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-215" name="line-215"></a><span class="p">{</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">;</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">clone</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">restart</span><span class="p">;</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">pid_str</span><span class="p">[</span><span class="mi">64</span><span class="p">];</span> +<a id="line-220" name="line-220"></a> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">idle</span><span class="p">)</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="p">{</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">idle</span><span class="p">);</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">idle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="p">}</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_set_initial_properties</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-227" name="line-227"></a> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">egg_sm_client_get_mode</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">EGG_SM_CLIENT_MODE_NO_RESTART</span><span class="p">)</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_style</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SmRestartNever</span><span class="p">;</span> +<a id="line-230" name="line-230"></a> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="cm">/* Parse info out of desktop file */</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">desktop_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_get_desktop_file</span><span class="w"> </span><span class="p">();</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="p">{</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">;</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">;</span> +<a id="line-238" name="line-238"></a> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_style</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SmRestartIfRunning</span><span class="p">)</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="p">{</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">,</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="s">"X-MATE-AutoRestart"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_style</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SmRestartImmediately</span><span class="p">;</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="p">}</span> +<a id="line-245" name="line-245"></a> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">xsmp</span><span class="o">-></span><span class="n">set_restart_command</span><span class="p">)</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="p">{</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">cmdline</span><span class="p">;</span> +<a id="line-249" name="line-249"></a> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">cmdline</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_desktop_file_parse_exec</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">cmdline</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">g_shell_parse_argv</span><span class="w"> </span><span class="p">(</span><span class="n">cmdline</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">))</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="p">{</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">egg_sm_client_set_restart_command</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_SM_CLIENT</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">),</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="n">argv</span><span class="p">);</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">argv</span><span class="p">);</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="p">}</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="k">else</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="p">{</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Could not parse Exec line in desktop file: %s"</span><span class="p">,</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">err</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">);</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="p">}</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmdline</span><span class="p">);</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="p">}</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="p">}</span> +<a id="line-266" name="line-266"></a> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">xsmp</span><span class="o">-></span><span class="n">set_restart_command</span><span class="p">)</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strsplit</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_prgname</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-269" name="line-269"></a> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">clone</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">generate_command</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_command</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">restart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">generate_command</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_command</span><span class="p">,</span><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-272" name="line-272"></a> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Setting initial properties"</span><span class="p">);</span> +<a id="line-274" name="line-274"></a> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="cm">/* Program, CloneCommand, RestartCommand, and UserID are required.</span> +<a id="line-276" name="line-276"></a><span class="cm"> * ProcessID isn't required, but the SM may be able to do something</span> +<a id="line-277" name="line-277"></a><span class="cm"> * useful with it.</span> +<a id="line-278" name="line-278"></a><span class="cm"> */</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">g_snprintf</span><span class="w"> </span><span class="p">(</span><span class="n">pid_str</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">pid_str</span><span class="p">),</span><span class="w"> </span><span class="s">"%lu"</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">gulong</span><span class="p">)</span><span class="w"> </span><span class="n">getpid</span><span class="w"> </span><span class="p">());</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">set_properties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">string_prop</span><span class="w"> </span><span class="p">(</span><span class="n">SmProgram</span><span class="p">,</span><span class="w"> </span><span class="n">g_get_prgname</span><span class="w"> </span><span class="p">()),</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">ptrarray_prop</span><span class="w"> </span><span class="p">(</span><span class="n">SmCloneCommand</span><span class="p">,</span><span class="w"> </span><span class="n">clone</span><span class="p">),</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">ptrarray_prop</span><span class="w"> </span><span class="p">(</span><span class="n">SmRestartCommand</span><span class="p">,</span><span class="w"> </span><span class="n">restart</span><span class="p">),</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">string_prop</span><span class="w"> </span><span class="p">(</span><span class="n">SmUserID</span><span class="p">,</span><span class="w"> </span><span class="n">g_get_user_name</span><span class="w"> </span><span class="p">()),</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">string_prop</span><span class="w"> </span><span class="p">(</span><span class="n">SmProcessID</span><span class="p">,</span><span class="w"> </span><span class="n">pid_str</span><span class="p">),</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">card8_prop</span><span class="w"> </span><span class="p">(</span><span class="n">SmRestartStyleHint</span><span class="p">,</span><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_style</span><span class="p">),</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">clone</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">restart</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-290" name="line-290"></a> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="p">{</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">set_properties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">string_prop</span><span class="w"> </span><span class="p">(</span><span class="s">"_GSM_DesktopFile"</span><span class="p">,</span><span class="w"> </span><span class="n">egg_desktop_file_get_source</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">)),</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="p">}</span> +<a id="line-297" name="line-297"></a> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">update_pending_events</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-300" name="line-300"></a><span class="p">}</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="cm">/* This gets called from two different places: xsmp_die() (when the</span> +<a id="line-303" name="line-303"></a><span class="cm"> * server asks us to disconnect) and process_ice_messages() (when the</span> +<a id="line-304" name="line-304"></a><span class="cm"> * server disconnects unexpectedly).</span> +<a id="line-305" name="line-305"></a><span class="cm"> */</span> +<a id="line-306" name="line-306"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-307" name="line-307"></a><span class="n">sm_client_xsmp_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">)</span> +<a id="line-308" name="line-308"></a><span class="p">{</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">SmcConn</span><span class="w"> </span><span class="n">connection</span><span class="p">;</span> +<a id="line-310" name="line-310"></a> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">)</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-313" name="line-313"></a> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Disconnecting"</span><span class="p">);</span> +<a id="line-315" name="line-315"></a> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">;</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">SmcCloseConnection</span><span class="w"> </span><span class="p">(</span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_CONNECTION_CLOSED</span><span class="p">;</span> +<a id="line-320" name="line-320"></a> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_save_myself</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">update_pending_events</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-323" name="line-323"></a><span class="p">}</span> +<a id="line-324" name="line-324"></a> +<a id="line-325" name="line-325"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-326" name="line-326"></a><span class="n">sm_client_xsmp_startup</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">client_id</span><span class="p">)</span> +<a id="line-328" name="line-328"></a><span class="p">{</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">client</span><span class="p">;</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">SmcCallbacks</span><span class="w"> </span><span class="n">callbacks</span><span class="p">;</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">ret_client_id</span><span class="p">;</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">error_string_ret</span><span class="p">[</span><span class="mi">256</span><span class="p">];</span> +<a id="line-333" name="line-333"></a> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">client_id</span><span class="p">);</span> +<a id="line-335" name="line-335"></a> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="n">ice_init</span><span class="w"> </span><span class="p">();</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">SmcSetErrorHandler</span><span class="w"> </span><span class="p">(</span><span class="n">smc_error_handler</span><span class="p">);</span> +<a id="line-338" name="line-338"></a> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">callbacks</span><span class="p">.</span><span class="n">save_yourself</span><span class="p">.</span><span class="n">callback</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">xsmp_save_yourself</span><span class="p">;</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">callbacks</span><span class="p">.</span><span class="n">die</span><span class="p">.</span><span class="n">callback</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">xsmp_die</span><span class="p">;</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">callbacks</span><span class="p">.</span><span class="n">save_complete</span><span class="p">.</span><span class="n">callback</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">xsmp_save_complete</span><span class="p">;</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">callbacks</span><span class="p">.</span><span class="n">shutdown_cancelled</span><span class="p">.</span><span class="n">callback</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">xsmp_shutdown_cancelled</span><span class="p">;</span> +<a id="line-343" name="line-343"></a> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">callbacks</span><span class="p">.</span><span class="n">save_yourself</span><span class="p">.</span><span class="n">client_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">xsmp</span><span class="p">;</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">callbacks</span><span class="p">.</span><span class="n">die</span><span class="p">.</span><span class="n">client_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">xsmp</span><span class="p">;</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">callbacks</span><span class="p">.</span><span class="n">save_complete</span><span class="p">.</span><span class="n">client_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">xsmp</span><span class="p">;</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">callbacks</span><span class="p">.</span><span class="n">shutdown_cancelled</span><span class="p">.</span><span class="n">client_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">xsmp</span><span class="p">;</span> +<a id="line-348" name="line-348"></a> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">client_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">error_string_ret</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="w"> </span><span class="o">=</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">SmcOpenConnection</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="n">SmProtoMajor</span><span class="p">,</span><span class="w"> </span><span class="n">SmProtoMinor</span><span class="p">,</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="n">SmcSaveYourselfProcMask</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">SmcDieProcMask</span><span class="w"> </span><span class="o">|</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">SmcSaveCompleteProcMask</span><span class="w"> </span><span class="o">|</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">SmcShutdownCancelledProcMask</span><span class="p">,</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="o">&</span><span class="n">callbacks</span><span class="p">,</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">ret_client_id</span><span class="p">,</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">error_string_ret</span><span class="p">),</span><span class="w"> </span><span class="n">error_string_ret</span><span class="p">);</span> +<a id="line-359" name="line-359"></a> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">)</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="p">{</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Failed to connect to the session manager: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">error_string_ret</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">?</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="nl">error_string_ret</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="s">"no error message given"</span><span class="p">);</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_CONNECTION_CLOSED</span><span class="p">;</span> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="p">}</span> +<a id="line-368" name="line-368"></a> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="cm">/* We expect a pointless initial SaveYourself if either (a) we</span> +<a id="line-370" name="line-370"></a><span class="cm"> * didn't have an initial client ID, or (b) we DID have an initial</span> +<a id="line-371" name="line-371"></a><span class="cm"> * client ID, but the server rejected it and gave us a new one.</span> +<a id="line-372" name="line-372"></a><span class="cm"> */</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="w"> </span><span class="o">||</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="p">(</span><span class="n">ret_client_id</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="p">,</span><span class="w"> </span><span class="n">ret_client_id</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">expecting_initial_save_yourself</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret_client_id</span><span class="p">)</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="p">{</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="p">);</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">ret_client_id</span><span class="p">);</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">free</span><span class="w"> </span><span class="p">(</span><span class="n">ret_client_id</span><span class="p">);</span> +<a id="line-382" name="line-382"></a> +<a id="line-383" name="line-383"></a><span class="cp">#if defined(GDK_WINDOWING_X11) || defined(HAVE_X11)</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_IS_X11_DISPLAY</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_display_get_default</span><span class="w"> </span><span class="p">()))</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">gdk_x11_set_sm_client_id</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="p">);</span> +<a id="line-386" name="line-386"></a><span class="cp">#endif</span> +<a id="line-387" name="line-387"></a> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Got client ID </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="p">);</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="p">}</span> +<a id="line-390" name="line-390"></a> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_IDLE</span><span class="p">;</span> +<a id="line-392" name="line-392"></a> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="cm">/* Do not set the initial properties until we reach the main loop,</span> +<a id="line-394" name="line-394"></a><span class="cm"> * so that the application has a chance to call</span> +<a id="line-395" name="line-395"></a><span class="cm"> * egg_set_desktop_file(). (This may also help the session manager</span> +<a id="line-396" name="line-396"></a><span class="cm"> * have a better idea of when the application is fully up and</span> +<a id="line-397" name="line-397"></a><span class="cm"> * running.)</span> +<a id="line-398" name="line-398"></a><span class="cm"> */</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_set_initial_properties</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">idle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_idle_add</span><span class="w"> </span><span class="p">(</span><span class="n">sm_client_xsmp_set_initial_properties</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="p">);</span> +<a id="line-401" name="line-401"></a><span class="p">}</span> +<a id="line-402" name="line-402"></a> +<a id="line-403" name="line-403"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-404" name="line-404"></a><span class="n">sm_client_xsmp_set_restart_command</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">)</span> +<a id="line-407" name="line-407"></a><span class="p">{</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">client</span><span class="p">;</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-410" name="line-410"></a> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_command</span><span class="p">);</span> +<a id="line-412" name="line-412"></a> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="n">argc</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">argc</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_command</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_command</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-417" name="line-417"></a> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">set_restart_command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-419" name="line-419"></a><span class="p">}</span> +<a id="line-420" name="line-420"></a> +<a id="line-421" name="line-421"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-422" name="line-422"></a><span class="n">sm_client_xsmp_set_discard_command</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">)</span> +<a id="line-425" name="line-425"></a><span class="p">{</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">client</span><span class="p">;</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-428" name="line-428"></a> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">discard_command</span><span class="p">);</span> +<a id="line-430" name="line-430"></a> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">discard_command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="n">argc</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">argc</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">discard_command</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">discard_command</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-435" name="line-435"></a> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">set_discard_command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-437" name="line-437"></a><span class="p">}</span> +<a id="line-438" name="line-438"></a> +<a id="line-439" name="line-439"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-440" name="line-440"></a><span class="n">sm_client_xsmp_will_quit</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">will_quit</span><span class="p">)</span> +<a id="line-442" name="line-442"></a><span class="p">{</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">client</span><span class="p">;</span> +<a id="line-444" name="line-444"></a> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">XSMP_STATE_CONNECTION_CLOSED</span><span class="p">)</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="p">{</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="cm">/* The session manager has already exited! Schedule a quit</span> +<a id="line-448" name="line-448"></a><span class="cm"> * signal.</span> +<a id="line-449" name="line-449"></a><span class="cm"> */</span> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_emit_quit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="n">update_pending_events</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="p">}</span> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">XSMP_STATE_SHUTDOWN_CANCELLED</span><span class="p">)</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="p">{</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="cm">/* We received a ShutdownCancelled message while the application</span> +<a id="line-457" name="line-457"></a><span class="cm"> * was interacting; Schedule a quit_cancelled signal.</span> +<a id="line-458" name="line-458"></a><span class="cm"> */</span> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_emit_quit_cancelled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">update_pending_events</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="p">}</span> +<a id="line-463" name="line-463"></a> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">XSMP_STATE_INTERACT</span><span class="p">);</span> +<a id="line-465" name="line-465"></a> +<a id="line-466" name="line-466"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Sending InteractDone(%s)"</span><span class="p">,</span><span class="w"> </span><span class="n">will_quit</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"False"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"True"</span><span class="p">);</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="n">SmcInteractDone</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="o">!</span><span class="n">will_quit</span><span class="p">);</span> +<a id="line-468" name="line-468"></a> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">will_quit</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">need_save_state</span><span class="p">)</span> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">save_state</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-471" name="line-471"></a> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Sending SaveYourselfDone(%s)"</span><span class="p">,</span><span class="w"> </span><span class="n">will_quit</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"True"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"False"</span><span class="p">);</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="n">SmcSaveYourselfDone</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="n">will_quit</span><span class="p">);</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_SAVE_YOURSELF_DONE</span><span class="p">;</span> +<a id="line-475" name="line-475"></a><span class="p">}</span> +<a id="line-476" name="line-476"></a> +<a id="line-477" name="line-477"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-478" name="line-478"></a><span class="n">sm_client_xsmp_end_session</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">EggSMClientEndStyle</span><span class="w"> </span><span class="n">style</span><span class="p">,</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">request_confirmation</span><span class="p">)</span> +<a id="line-481" name="line-481"></a><span class="p">{</span> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">client</span><span class="p">;</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">save_type</span><span class="p">;</span> +<a id="line-484" name="line-484"></a> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="cm">/* To end the session via XSMP, we have to send a</span> +<a id="line-486" name="line-486"></a><span class="cm"> * SaveYourselfRequest. We aren't allowed to do that if anything</span> +<a id="line-487" name="line-487"></a><span class="cm"> * else is going on, but we don't want to expose this fact to the</span> +<a id="line-488" name="line-488"></a><span class="cm"> * application. So we do our best to patch things up here...</span> +<a id="line-489" name="line-489"></a><span class="cm"> *</span> +<a id="line-490" name="line-490"></a><span class="cm"> * In the worst case, this method might block for some length of</span> +<a id="line-491" name="line-491"></a><span class="cm"> * time in process_ice_messages, but the only time that code path is</span> +<a id="line-492" name="line-492"></a><span class="cm"> * honestly likely to get hit is if the application tries to end the</span> +<a id="line-493" name="line-493"></a><span class="cm"> * session as the very first thing it does, in which case it</span> +<a id="line-494" name="line-494"></a><span class="cm"> * probably won't actually block anyway. It's not worth gunking up</span> +<a id="line-495" name="line-495"></a><span class="cm"> * the API to try to deal nicely with the other 0.01% of cases where</span> +<a id="line-496" name="line-496"></a><span class="cm"> * this happens.</span> +<a id="line-497" name="line-497"></a><span class="cm"> */</span> +<a id="line-498" name="line-498"></a> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">XSMP_STATE_IDLE</span><span class="w"> </span><span class="o">||</span> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">expecting_initial_save_yourself</span><span class="p">)</span> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="p">{</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="cm">/* If we're already shutting down, we don't need to do anything. */</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">shutting_down</span><span class="p">)</span> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-505" name="line-505"></a> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="p">)</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="p">{</span> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">XSMP_STATE_CONNECTION_CLOSED</span><span class="p">:</span> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-510" name="line-510"></a> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">XSMP_STATE_SAVE_YOURSELF</span><span class="p">:</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="cm">/* Trying to log out from the save_state callback? Whatever.</span> +<a id="line-513" name="line-513"></a><span class="cm"> * Abort the save_state.</span> +<a id="line-514" name="line-514"></a><span class="cm"> */</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="n">SmcSaveYourselfDone</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_SAVE_YOURSELF_DONE</span><span class="p">;</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-518" name="line-518"></a> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">XSMP_STATE_INTERACT_REQUEST</span><span class="p">:</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">XSMP_STATE_INTERACT</span><span class="p">:</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">XSMP_STATE_SHUTDOWN_CANCELLED</span><span class="p">:</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="cm">/* Already in a shutdown-related state, just ignore</span> +<a id="line-523" name="line-523"></a><span class="cm"> * the new shutdown request...</span> +<a id="line-524" name="line-524"></a><span class="cm"> */</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-526" name="line-526"></a> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">XSMP_STATE_IDLE</span><span class="p">:</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_set_initial_properties</span><span class="p">)</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">sm_client_xsmp_set_initial_properties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-530" name="line-530"></a> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">xsmp</span><span class="o">-></span><span class="n">expecting_initial_save_yourself</span><span class="p">)</span> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="cm">/* else fall through */</span> +<a id="line-534" name="line-534"></a> +<a id="line-535" name="line-535"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">XSMP_STATE_SAVE_YOURSELF_DONE</span><span class="p">:</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="cm">/* We need to wait for some response from the server.*/</span> +<a id="line-537" name="line-537"></a><span class="w"> </span><span class="n">process_ice_messages</span><span class="w"> </span><span class="p">(</span><span class="n">SmcGetIceConnection</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">));</span> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-539" name="line-539"></a> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-541" name="line-541"></a><span class="w"> </span><span class="cm">/* Hm... shouldn't happen */</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="p">}</span> +<a id="line-544" name="line-544"></a><span class="w"> </span><span class="p">}</span> +<a id="line-545" name="line-545"></a> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="cm">/* xfce4-session will do the wrong thing if we pass SmSaveGlobal and</span> +<a id="line-547" name="line-547"></a><span class="cm"> * the user chooses to save the session. But mate-session will do</span> +<a id="line-548" name="line-548"></a><span class="cm"> * the wrong thing if we pass SmSaveBoth and the user chooses NOT to</span> +<a id="line-549" name="line-549"></a><span class="cm"> * save the session... Sigh.</span> +<a id="line-550" name="line-550"></a><span class="cm"> */</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">SmcVendor</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">),</span><span class="w"> </span><span class="s">"xfce4-session"</span><span class="p">))</span> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="n">save_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SmSaveBoth</span><span class="p">;</span> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="k">else</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="n">save_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SmSaveGlobal</span><span class="p">;</span> +<a id="line-555" name="line-555"></a> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Sending SaveYourselfRequest(SmSaveGlobal, Shutdown, SmInteractStyleAny, %sFast)"</span><span class="p">,</span><span class="w"> </span><span class="n">request_confirmation</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"!"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="n">SmcRequestSaveYourself</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="n">save_type</span><span class="p">,</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="n">True</span><span class="p">,</span><span class="w"> </span><span class="cm">/* shutdown */</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="n">SmInteractStyleAny</span><span class="p">,</span> +<a id="line-561" name="line-561"></a><span class="w"> </span><span class="o">!</span><span class="n">request_confirmation</span><span class="p">,</span><span class="w"> </span><span class="cm">/* fast */</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">True</span><span class="w"> </span><span class="cm">/* global */</span><span class="p">);</span> +<a id="line-563" name="line-563"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-564" name="line-564"></a><span class="p">}</span> +<a id="line-565" name="line-565"></a> +<a id="line-566" name="line-566"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-567" name="line-567"></a><span class="n">idle_do_pending_events</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-568" name="line-568"></a><span class="p">{</span> +<a id="line-569" name="line-569"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-571" name="line-571"></a> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">idle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-573" name="line-573"></a> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_emit_quit</span><span class="p">)</span> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="p">{</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_emit_quit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="n">egg_sm_client_quit</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">);</span> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-579" name="line-579"></a><span class="w"> </span><span class="p">}</span> +<a id="line-580" name="line-580"></a> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_emit_quit_cancelled</span><span class="p">)</span> +<a id="line-582" name="line-582"></a><span class="w"> </span><span class="p">{</span> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_emit_quit_cancelled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-584" name="line-584"></a><span class="w"> </span><span class="n">egg_sm_client_quit_cancelled</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">);</span> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_IDLE</span><span class="p">;</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="p">}</span> +<a id="line-587" name="line-587"></a> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_save_myself</span><span class="p">)</span> +<a id="line-589" name="line-589"></a><span class="w"> </span><span class="p">{</span> +<a id="line-590" name="line-590"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_save_myself</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-591" name="line-591"></a><span class="w"> </span><span class="n">do_save_yourself</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="p">}</span> +<a id="line-593" name="line-593"></a> +<a id="line-594" name="line-594"></a><span class="nl">out</span><span class="p">:</span> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-596" name="line-596"></a><span class="p">}</span> +<a id="line-597" name="line-597"></a> +<a id="line-598" name="line-598"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-599" name="line-599"></a><span class="n">update_pending_events</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">)</span> +<a id="line-600" name="line-600"></a><span class="p">{</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">want_idle</span><span class="w"> </span><span class="o">=</span> +<a id="line-602" name="line-602"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_emit_quit</span><span class="w"> </span><span class="o">||</span> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_emit_quit_cancelled</span><span class="w"> </span><span class="o">||</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_save_myself</span><span class="p">;</span> +<a id="line-605" name="line-605"></a> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">want_idle</span><span class="p">)</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="p">{</span> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">idle</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">idle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_idle_add</span><span class="w"> </span><span class="p">(</span><span class="n">idle_do_pending_events</span><span class="p">,</span><span class="w"> </span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="p">}</span> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="k">else</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="p">{</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">idle</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">idle</span><span class="p">);</span> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">idle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="p">}</span> +<a id="line-617" name="line-617"></a><span class="p">}</span> +<a id="line-618" name="line-618"></a> +<a id="line-619" name="line-619"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-620" name="line-620"></a><span class="n">fix_broken_state</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">,</span> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">send_interact_done</span><span class="p">,</span> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">send_save_yourself_done</span><span class="p">)</span> +<a id="line-623" name="line-623"></a><span class="p">{</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Received XSMP %s message in state %s: client or server error"</span><span class="p">,</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_SM_CLIENT_XSMP_STATE</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">));</span> +<a id="line-626" name="line-626"></a> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="cm">/* Forget any pending SaveYourself plans we had */</span> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_save_myself</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="n">update_pending_events</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-630" name="line-630"></a> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">send_interact_done</span><span class="p">)</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="n">SmcInteractDone</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="n">False</span><span class="p">);</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">send_save_yourself_done</span><span class="p">)</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="n">SmcSaveYourselfDone</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="n">True</span><span class="p">);</span> +<a id="line-635" name="line-635"></a> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">send_save_yourself_done</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">XSMP_STATE_SAVE_YOURSELF_DONE</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">XSMP_STATE_IDLE</span><span class="p">;</span> +<a id="line-637" name="line-637"></a><span class="p">}</span> +<a id="line-638" name="line-638"></a> +<a id="line-639" name="line-639"></a><span class="cm">/* SM callbacks */</span> +<a id="line-640" name="line-640"></a> +<a id="line-641" name="line-641"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-642" name="line-642"></a><span class="n">xsmp_save_yourself</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">,</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">save_type</span><span class="p">,</span> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="n">Bool</span><span class="w"> </span><span class="n">shutdown</span><span class="p">,</span> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">interact_style</span><span class="p">,</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="n">Bool</span><span class="w"> </span><span class="n">fast</span><span class="p">)</span> +<a id="line-648" name="line-648"></a><span class="p">{</span> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">client_data</span><span class="p">;</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">wants_quit_requested</span><span class="p">;</span> +<a id="line-651" name="line-651"></a> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Received SaveYourself(%s, %s, %s, %s) in state %s"</span><span class="p">,</span> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="n">save_type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SmSaveLocal</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"SmSaveLocal"</span><span class="w"> </span><span class="o">:</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="n">save_type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SmSaveGlobal</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"SmSaveGlobal"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"SmSaveBoth"</span><span class="p">,</span> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="n">shutdown</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"Shutdown"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"!Shutdown"</span><span class="p">,</span> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="n">interact_style</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SmInteractStyleAny</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"SmInteractStyleAny"</span><span class="w"> </span><span class="o">:</span> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="n">interact_style</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SmInteractStyleErrors</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"SmInteractStyleErrors"</span><span class="w"> </span><span class="o">:</span> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="s">"SmInteractStyleNone"</span><span class="p">,</span><span class="w"> </span><span class="n">fast</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"Fast"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"!Fast"</span><span class="p">,</span> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_XSMP_STATE</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">));</span> +<a id="line-660" name="line-660"></a> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">XSMP_STATE_IDLE</span><span class="w"> </span><span class="o">&&</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">XSMP_STATE_SHUTDOWN_CANCELLED</span><span class="p">)</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="p">{</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="n">fix_broken_state</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="s">"SaveYourself"</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="p">}</span> +<a id="line-667" name="line-667"></a> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_set_initial_properties</span><span class="p">)</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="n">sm_client_xsmp_set_initial_properties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-670" name="line-670"></a> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="cm">/* If this is the initial SaveYourself, ignore it; we've already set</span> +<a id="line-672" name="line-672"></a><span class="cm"> * properties and there's no reason to actually save state too.</span> +<a id="line-673" name="line-673"></a><span class="cm"> */</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">expecting_initial_save_yourself</span><span class="p">)</span> +<a id="line-675" name="line-675"></a><span class="w"> </span><span class="p">{</span> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">expecting_initial_save_yourself</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-677" name="line-677"></a> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">save_type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SmSaveLocal</span><span class="w"> </span><span class="o">&&</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="n">interact_style</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SmInteractStyleNone</span><span class="w"> </span><span class="o">&&</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="o">!</span><span class="n">shutdown</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">fast</span><span class="p">)</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="p">{</span> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Sending SaveYourselfDone(True) for initial SaveYourself"</span><span class="p">);</span> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">SmcSaveYourselfDone</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="n">True</span><span class="p">);</span> +<a id="line-684" name="line-684"></a><span class="w"> </span><span class="cm">/* As explained in the comment at the end of</span> +<a id="line-685" name="line-685"></a><span class="cm"> * do_save_yourself(), SAVE_YOURSELF_DONE is the correct</span> +<a id="line-686" name="line-686"></a><span class="cm"> * state here, not IDLE.</span> +<a id="line-687" name="line-687"></a><span class="cm"> */</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_SAVE_YOURSELF_DONE</span><span class="p">;</span> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="p">}</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="k">else</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"First SaveYourself was not the expected one!"</span><span class="p">);</span> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="p">}</span> +<a id="line-694" name="line-694"></a> +<a id="line-695" name="line-695"></a><span class="w"> </span><span class="cm">/* Even ignoring the "fast" flag completely, there are still 18</span> +<a id="line-696" name="line-696"></a><span class="cm"> * different combinations of save_type, shutdown and interact_style.</span> +<a id="line-697" name="line-697"></a><span class="cm"> * We interpret them as follows:</span> +<a id="line-698" name="line-698"></a><span class="cm"> *</span> +<a id="line-699" name="line-699"></a><span class="cm"> * Type Shutdown Interact Interpretation</span> +<a id="line-700" name="line-700"></a><span class="cm"> * G F A/E/N do nothing (1)</span> +<a id="line-701" name="line-701"></a><span class="cm"> * G T N do nothing (1)*</span> +<a id="line-702" name="line-702"></a><span class="cm"> * G T A/E quit_requested (2)</span> +<a id="line-703" name="line-703"></a><span class="cm"> * L/B F A/E/N save_state (3)</span> +<a id="line-704" name="line-704"></a><span class="cm"> * L/B T N save_state (3)*</span> +<a id="line-705" name="line-705"></a><span class="cm"> * L/B T A/E quit_requested, then save_state (4)</span> +<a id="line-706" name="line-706"></a><span class="cm"> *</span> +<a id="line-707" name="line-707"></a><span class="cm"> * 1. Do nothing, because the SM asked us to do something</span> +<a id="line-708" name="line-708"></a><span class="cm"> * uninteresting (save open files, but then don't quit</span> +<a id="line-709" name="line-709"></a><span class="cm"> * afterward) or rude (save open files without asking the user</span> +<a id="line-710" name="line-710"></a><span class="cm"> * for confirmation).</span> +<a id="line-711" name="line-711"></a><span class="cm"> *</span> +<a id="line-712" name="line-712"></a><span class="cm"> * 2. Request interaction and then emit ::quit_requested. This</span> +<a id="line-713" name="line-713"></a><span class="cm"> * perhaps isn't quite correct for the SmInteractStyleErrors</span> +<a id="line-714" name="line-714"></a><span class="cm"> * case, but we don't care.</span> +<a id="line-715" name="line-715"></a><span class="cm"> *</span> +<a id="line-716" name="line-716"></a><span class="cm"> * 3. Emit ::save_state. The SmSaveBoth SaveYourselfs in these</span> +<a id="line-717" name="line-717"></a><span class="cm"> * rows essentially get demoted to SmSaveLocal, because their</span> +<a id="line-718" name="line-718"></a><span class="cm"> * Global halves correspond to "do nothing".</span> +<a id="line-719" name="line-719"></a><span class="cm"> *</span> +<a id="line-720" name="line-720"></a><span class="cm"> * 4. Request interaction, emit ::quit_requested, and then emit</span> +<a id="line-721" name="line-721"></a><span class="cm"> * ::save_state after interacting. This is the SmSaveBoth</span> +<a id="line-722" name="line-722"></a><span class="cm"> * equivalent of #2, but we also promote SmSaveLocal shutdown</span> +<a id="line-723" name="line-723"></a><span class="cm"> * SaveYourselfs to SmSaveBoth here, because we want to give</span> +<a id="line-724" name="line-724"></a><span class="cm"> * the user a chance to save open files before quitting.</span> +<a id="line-725" name="line-725"></a><span class="cm"> *</span> +<a id="line-726" name="line-726"></a><span class="cm"> * (* It would be nice if we could do something useful when the</span> +<a id="line-727" name="line-727"></a><span class="cm"> * session manager sends a SaveYourself with shutdown True and</span> +<a id="line-728" name="line-728"></a><span class="cm"> * SmInteractStyleNone. But we can't, so we just pretend it didn't</span> +<a id="line-729" name="line-729"></a><span class="cm"> * even tell us it was shutting down. The docs for ::quit mention</span> +<a id="line-730" name="line-730"></a><span class="cm"> * that it might not always be preceded by ::quit_requested.)</span> +<a id="line-731" name="line-731"></a><span class="cm"> */</span> +<a id="line-732" name="line-732"></a> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="cm">/* As an optimization, we don't actually request interaction and</span> +<a id="line-734" name="line-734"></a><span class="cm"> * emit ::quit_requested if the application isn't listening to the</span> +<a id="line-735" name="line-735"></a><span class="cm"> * signal.</span> +<a id="line-736" name="line-736"></a><span class="cm"> */</span> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="n">wants_quit_requested</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_has_handler_pending</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="n">g_signal_lookup</span><span class="w"> </span><span class="p">(</span><span class="s">"quit_requested"</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_TYPE_SM_CLIENT</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-738" name="line-738"></a> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">need_save_state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">save_type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">SmSaveGlobal</span><span class="p">);</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">need_quit_requested</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">shutdown</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">wants_quit_requested</span><span class="w"> </span><span class="o">&&</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">interact_style</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">SmInteractStyleNone</span><span class="p">);</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">interact_errors</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">interact_style</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SmInteractStyleErrors</span><span class="p">);</span> +<a id="line-743" name="line-743"></a> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">shutting_down</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">shutdown</span><span class="p">;</span> +<a id="line-745" name="line-745"></a> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="n">do_save_yourself</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-747" name="line-747"></a><span class="p">}</span> +<a id="line-748" name="line-748"></a> +<a id="line-749" name="line-749"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-750" name="line-750"></a><span class="n">do_save_yourself</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">)</span> +<a id="line-751" name="line-751"></a><span class="p">{</span> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">XSMP_STATE_SHUTDOWN_CANCELLED</span><span class="p">)</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="p">{</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="cm">/* The SM cancelled a previous SaveYourself, but we haven't yet</span> +<a id="line-755" name="line-755"></a><span class="cm"> * had a chance to tell the application, so we can't start</span> +<a id="line-756" name="line-756"></a><span class="cm"> * processing this SaveYourself yet.</span> +<a id="line-757" name="line-757"></a><span class="cm"> */</span> +<a id="line-758" name="line-758"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_save_myself</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="n">update_pending_events</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-761" name="line-761"></a><span class="w"> </span><span class="p">}</span> +<a id="line-762" name="line-762"></a> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">need_quit_requested</span><span class="p">)</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="p">{</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_INTERACT_REQUEST</span><span class="p">;</span> +<a id="line-766" name="line-766"></a> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Sending InteractRequest(%s)"</span><span class="p">,</span> +<a id="line-768" name="line-768"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">interact_errors</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"Error"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"Normal"</span><span class="p">);</span> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="n">SmcInteractRequest</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span> +<a id="line-770" name="line-770"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">interact_errors</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">SmDialogError</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">SmDialogNormal</span><span class="p">,</span> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="n">xsmp_interact</span><span class="p">,</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="p">}</span> +<a id="line-775" name="line-775"></a> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">need_save_state</span><span class="p">)</span> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="p">{</span> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="n">save_state</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-779" name="line-779"></a> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="cm">/* Though unlikely, the client could have been disconnected</span> +<a id="line-781" name="line-781"></a><span class="cm"> * while the application was saving its state.</span> +<a id="line-782" name="line-782"></a><span class="cm"> */</span> +<a id="line-783" name="line-783"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">)</span> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="p">}</span> +<a id="line-786" name="line-786"></a> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Sending SaveYourselfDone(True)"</span><span class="p">);</span> +<a id="line-788" name="line-788"></a><span class="w"> </span><span class="n">SmcSaveYourselfDone</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="n">True</span><span class="p">);</span> +<a id="line-789" name="line-789"></a> +<a id="line-790" name="line-790"></a><span class="w"> </span><span class="cm">/* The client state diagram in the XSMP spec says that after a</span> +<a id="line-791" name="line-791"></a><span class="cm"> * non-shutdown SaveYourself, we go directly back to "idle". But</span> +<a id="line-792" name="line-792"></a><span class="cm"> * everything else in both the XSMP spec and the libSM docs</span> +<a id="line-793" name="line-793"></a><span class="cm"> * disagrees.</span> +<a id="line-794" name="line-794"></a><span class="cm"> */</span> +<a id="line-795" name="line-795"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_SAVE_YOURSELF_DONE</span><span class="p">;</span> +<a id="line-796" name="line-796"></a><span class="p">}</span> +<a id="line-797" name="line-797"></a> +<a id="line-798" name="line-798"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-799" name="line-799"></a><span class="n">save_state</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">)</span> +<a id="line-800" name="line-800"></a><span class="p">{</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">state_file</span><span class="p">;</span> +<a id="line-802" name="line-802"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">state_file_path</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">;</span> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="n">EggDesktopFile</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file</span><span class="p">;</span> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">restart</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">discard</span><span class="p">;</span> +<a id="line-805" name="line-805"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">offset</span><span class="p">,</span><span class="w"> </span><span class="n">fd</span><span class="p">;</span> +<a id="line-806" name="line-806"></a> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="cm">/* We set xsmp->state before emitting save_state, but our caller is</span> +<a id="line-808" name="line-808"></a><span class="cm"> * responsible for setting it back afterward.</span> +<a id="line-809" name="line-809"></a><span class="cm"> */</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_SAVE_YOURSELF</span><span class="p">;</span> +<a id="line-811" name="line-811"></a> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="n">state_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_sm_client_save_state</span><span class="w"> </span><span class="p">((</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">state_file</span><span class="p">)</span> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="p">{</span> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="n">restart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">generate_command</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_command</span><span class="p">,</span><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-816" name="line-816"></a><span class="w"> </span><span class="n">set_properties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">ptrarray_prop</span><span class="w"> </span><span class="p">(</span><span class="n">SmRestartCommand</span><span class="p">,</span><span class="w"> </span><span class="n">restart</span><span class="p">),</span> +<a id="line-818" name="line-818"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-819" name="line-819"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">restart</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-820" name="line-820"></a> +<a id="line-821" name="line-821"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">set_discard_command</span><span class="p">)</span> +<a id="line-822" name="line-822"></a><span class="w"> </span><span class="p">{</span> +<a id="line-823" name="line-823"></a><span class="w"> </span><span class="n">discard</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">generate_command</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">discard_command</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="n">set_properties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span> +<a id="line-825" name="line-825"></a><span class="w"> </span><span class="n">ptrarray_prop</span><span class="w"> </span><span class="p">(</span><span class="n">SmDiscardCommand</span><span class="p">,</span><span class="w"> </span><span class="n">discard</span><span class="p">),</span> +<a id="line-826" name="line-826"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">discard</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="p">}</span> +<a id="line-829" name="line-829"></a><span class="w"> </span><span class="k">else</span> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="n">delete_properties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="n">SmDiscardCommand</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-831" name="line-831"></a> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="p">}</span> +<a id="line-834" name="line-834"></a> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="n">desktop_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_get_desktop_file</span><span class="w"> </span><span class="p">();</span> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">)</span> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="p">{</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">merged_file</span><span class="p">;</span> +<a id="line-839" name="line-839"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_file_path</span><span class="p">;</span> +<a id="line-840" name="line-840"></a> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="n">merged_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="n">desktop_file_path</span><span class="w"> </span><span class="o">=</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="n">g_filename_from_uri</span><span class="w"> </span><span class="p">(</span><span class="n">egg_desktop_file_get_source</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file</span><span class="p">),</span> +<a id="line-844" name="line-844"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file_path</span><span class="w"> </span><span class="o">&&</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="n">g_key_file_load_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">merged_file</span><span class="p">,</span><span class="w"> </span><span class="n">desktop_file_path</span><span class="p">,</span> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="n">G_KEY_FILE_KEEP_COMMENTS</span><span class="w"> </span><span class="o">|</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">G_KEY_FILE_KEEP_TRANSLATIONS</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="p">{</span> +<a id="line-850" name="line-850"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">g</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-851" name="line-851"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">groups</span><span class="p">,</span><span class="w"> </span><span class="o">**</span><span class="n">keys</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">exec</span><span class="p">;</span> +<a id="line-852" name="line-852"></a> +<a id="line-853" name="line-853"></a><span class="w"> </span><span class="n">groups</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_groups</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-854" name="line-854"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">g</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">groups</span><span class="p">[</span><span class="n">g</span><span class="p">];</span><span class="w"> </span><span class="n">g</span><span class="o">++</span><span class="p">)</span> +<a id="line-855" name="line-855"></a><span class="w"> </span><span class="p">{</span> +<a id="line-856" name="line-856"></a><span class="w"> </span><span class="n">keys</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_keys</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">,</span><span class="w"> </span><span class="n">groups</span><span class="p">[</span><span class="n">g</span><span class="p">],</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-857" name="line-857"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">k</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">keys</span><span class="p">[</span><span class="n">k</span><span class="p">];</span><span class="w"> </span><span class="n">k</span><span class="o">++</span><span class="p">)</span> +<a id="line-858" name="line-858"></a><span class="w"> </span><span class="p">{</span> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_value</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">,</span><span class="w"> </span><span class="n">groups</span><span class="p">[</span><span class="n">g</span><span class="p">],</span> +<a id="line-860" name="line-860"></a><span class="w"> </span><span class="n">keys</span><span class="p">[</span><span class="n">k</span><span class="p">],</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-861" name="line-861"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">)</span> +<a id="line-862" name="line-862"></a><span class="w"> </span><span class="p">{</span> +<a id="line-863" name="line-863"></a><span class="w"> </span><span class="n">g_key_file_set_value</span><span class="w"> </span><span class="p">(</span><span class="n">merged_file</span><span class="p">,</span><span class="w"> </span><span class="n">groups</span><span class="p">[</span><span class="n">g</span><span class="p">],</span> +<a id="line-864" name="line-864"></a><span class="w"> </span><span class="n">keys</span><span class="p">[</span><span class="n">k</span><span class="p">],</span><span class="w"> </span><span class="n">value</span><span class="p">);</span> +<a id="line-865" name="line-865"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-866" name="line-866"></a><span class="w"> </span><span class="p">}</span> +<a id="line-867" name="line-867"></a><span class="w"> </span><span class="p">}</span> +<a id="line-868" name="line-868"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">keys</span><span class="p">);</span> +<a id="line-869" name="line-869"></a><span class="w"> </span><span class="p">}</span> +<a id="line-870" name="line-870"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">groups</span><span class="p">);</span> +<a id="line-871" name="line-871"></a> +<a id="line-872" name="line-872"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">);</span> +<a id="line-873" name="line-873"></a><span class="w"> </span><span class="n">state_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">merged_file</span><span class="p">;</span> +<a id="line-874" name="line-874"></a> +<a id="line-875" name="line-875"></a><span class="w"> </span><span class="cm">/* Update Exec key using "--sm-client-state-file %k" */</span> +<a id="line-876" name="line-876"></a><span class="w"> </span><span class="n">restart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">generate_command</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_command</span><span class="p">,</span> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="s">"%k"</span><span class="p">);</span> +<a id="line-878" name="line-878"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">restart</span><span class="o">-></span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="n">restart</span><span class="o">-></span><span class="n">pdata</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">restart</span><span class="o">-></span><span class="n">pdata</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-880" name="line-880"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">restart</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-881" name="line-881"></a><span class="w"> </span><span class="n">exec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strjoinv</span><span class="w"> </span><span class="p">(</span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="n">restart</span><span class="o">-></span><span class="n">pdata</span><span class="p">);</span> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">((</span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="n">restart</span><span class="o">-></span><span class="n">pdata</span><span class="p">);</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">restart</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-884" name="line-884"></a> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">,</span><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_GROUP</span><span class="p">,</span> +<a id="line-886" name="line-886"></a><span class="w"> </span><span class="n">EGG_DESKTOP_FILE_KEY_EXEC</span><span class="p">,</span> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="n">exec</span><span class="p">);</span> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">exec</span><span class="p">);</span> +<a id="line-889" name="line-889"></a><span class="w"> </span><span class="p">}</span> +<a id="line-890" name="line-890"></a><span class="w"> </span><span class="k">else</span> +<a id="line-891" name="line-891"></a><span class="w"> </span><span class="n">desktop_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-892" name="line-892"></a> +<a id="line-893" name="line-893"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_file_path</span><span class="p">);</span> +<a id="line-894" name="line-894"></a><span class="w"> </span><span class="p">}</span> +<a id="line-895" name="line-895"></a> +<a id="line-896" name="line-896"></a><span class="w"> </span><span class="cm">/* Now write state_file to disk. (We can't use mktemp(), because</span> +<a id="line-897" name="line-897"></a><span class="cm"> * that requires the filename to end with "XXXXXX", and we want</span> +<a id="line-898" name="line-898"></a><span class="cm"> * it to end with ".desktop".)</span> +<a id="line-899" name="line-899"></a><span class="cm"> */</span> +<a id="line-900" name="line-900"></a> +<a id="line-901" name="line-901"></a><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_to_data</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-902" name="line-902"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">);</span> +<a id="line-903" name="line-903"></a> +<a id="line-904" name="line-904"></a><span class="w"> </span><span class="n">offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-905" name="line-905"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> +<a id="line-906" name="line-906"></a><span class="w"> </span><span class="p">{</span> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="n">state_file_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s%csession-state%c%s-%ld.%s"</span><span class="p">,</span> +<a id="line-908" name="line-908"></a><span class="w"> </span><span class="n">g_get_user_config_dir</span><span class="w"> </span><span class="p">(),</span> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="n">G_DIR_SEPARATOR</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR</span><span class="p">,</span> +<a id="line-910" name="line-910"></a><span class="w"> </span><span class="n">g_get_prgname</span><span class="w"> </span><span class="p">(),</span> +<a id="line-911" name="line-911"></a><span class="w"> </span><span class="p">(</span><span class="kt">long</span><span class="p">)</span><span class="n">time</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">offset</span><span class="p">,</span> +<a id="line-912" name="line-912"></a><span class="w"> </span><span class="n">desktop_file</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"desktop"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"state"</span><span class="p">);</span> +<a id="line-913" name="line-913"></a> +<a id="line-914" name="line-914"></a><span class="w"> </span><span class="n">fd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">open</span><span class="w"> </span><span class="p">(</span><span class="n">state_file_path</span><span class="p">,</span><span class="w"> </span><span class="n">O_WRONLY</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">O_CREAT</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">O_EXCL</span><span class="p">,</span><span class="w"> </span><span class="mo">0644</span><span class="p">);</span> +<a id="line-915" name="line-915"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">fd</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-916" name="line-916"></a><span class="w"> </span><span class="p">{</span> +<a id="line-917" name="line-917"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">EEXIST</span><span class="p">)</span> +<a id="line-918" name="line-918"></a><span class="w"> </span><span class="p">{</span> +<a id="line-919" name="line-919"></a><span class="w"> </span><span class="n">offset</span><span class="o">++</span><span class="p">;</span> +<a id="line-920" name="line-920"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file_path</span><span class="p">);</span> +<a id="line-921" name="line-921"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-922" name="line-922"></a><span class="w"> </span><span class="p">}</span> +<a id="line-923" name="line-923"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">ENOTDIR</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">errno</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">ENOENT</span><span class="p">)</span> +<a id="line-924" name="line-924"></a><span class="w"> </span><span class="p">{</span> +<a id="line-925" name="line-925"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">sep</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strrchr</span><span class="w"> </span><span class="p">(</span><span class="n">state_file_path</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR</span><span class="p">);</span> +<a id="line-926" name="line-926"></a> +<a id="line-927" name="line-927"></a><span class="w"> </span><span class="o">*</span><span class="n">sep</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-928" name="line-928"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_mkdir_with_parents</span><span class="w"> </span><span class="p">(</span><span class="n">state_file_path</span><span class="p">,</span><span class="w"> </span><span class="mo">0755</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-929" name="line-929"></a><span class="w"> </span><span class="p">{</span> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Could not create directory '%s'"</span><span class="p">,</span> +<a id="line-931" name="line-931"></a><span class="w"> </span><span class="n">state_file_path</span><span class="p">);</span> +<a id="line-932" name="line-932"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file_path</span><span class="p">);</span> +<a id="line-933" name="line-933"></a><span class="w"> </span><span class="n">state_file_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-934" name="line-934"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-935" name="line-935"></a><span class="w"> </span><span class="p">}</span> +<a id="line-936" name="line-936"></a> +<a id="line-937" name="line-937"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-938" name="line-938"></a><span class="w"> </span><span class="p">}</span> +<a id="line-939" name="line-939"></a> +<a id="line-940" name="line-940"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Could not create file '%s': %s"</span><span class="p">,</span> +<a id="line-941" name="line-941"></a><span class="w"> </span><span class="n">state_file_path</span><span class="p">,</span><span class="w"> </span><span class="n">g_strerror</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="p">));</span> +<a id="line-942" name="line-942"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file_path</span><span class="p">);</span> +<a id="line-943" name="line-943"></a><span class="w"> </span><span class="n">state_file_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-944" name="line-944"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-945" name="line-945"></a><span class="w"> </span><span class="p">}</span> +<a id="line-946" name="line-946"></a> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="n">close</span><span class="w"> </span><span class="p">(</span><span class="n">fd</span><span class="p">);</span> +<a id="line-948" name="line-948"></a><span class="w"> </span><span class="n">g_file_set_contents</span><span class="w"> </span><span class="p">(</span><span class="n">state_file_path</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-949" name="line-949"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-950" name="line-950"></a><span class="w"> </span><span class="p">}</span> +<a id="line-951" name="line-951"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">);</span> +<a id="line-952" name="line-952"></a> +<a id="line-953" name="line-953"></a><span class="w"> </span><span class="n">restart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">generate_command</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">restart_command</span><span class="p">,</span><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">client_id</span><span class="p">,</span> +<a id="line-954" name="line-954"></a><span class="w"> </span><span class="n">state_file_path</span><span class="p">);</span> +<a id="line-955" name="line-955"></a><span class="w"> </span><span class="n">set_properties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span> +<a id="line-956" name="line-956"></a><span class="w"> </span><span class="n">ptrarray_prop</span><span class="w"> </span><span class="p">(</span><span class="n">SmRestartCommand</span><span class="p">,</span><span class="w"> </span><span class="n">restart</span><span class="p">),</span> +<a id="line-957" name="line-957"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-958" name="line-958"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">restart</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-959" name="line-959"></a> +<a id="line-960" name="line-960"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">state_file_path</span><span class="p">)</span> +<a id="line-961" name="line-961"></a><span class="w"> </span><span class="p">{</span> +<a id="line-962" name="line-962"></a><span class="w"> </span><span class="n">set_properties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span> +<a id="line-963" name="line-963"></a><span class="w"> </span><span class="n">array_prop</span><span class="w"> </span><span class="p">(</span><span class="n">SmDiscardCommand</span><span class="p">,</span> +<a id="line-964" name="line-964"></a><span class="w"> </span><span class="s">"/bin/rm"</span><span class="p">,</span><span class="w"> </span><span class="s">"-rf"</span><span class="p">,</span><span class="w"> </span><span class="n">state_file_path</span><span class="p">,</span> +<a id="line-965" name="line-965"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">),</span> +<a id="line-966" name="line-966"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-967" name="line-967"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file_path</span><span class="p">);</span> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="p">}</span> +<a id="line-969" name="line-969"></a><span class="p">}</span> +<a id="line-970" name="line-970"></a> +<a id="line-971" name="line-971"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-972" name="line-972"></a><span class="n">xsmp_interact</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-973" name="line-973"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">)</span> +<a id="line-974" name="line-974"></a><span class="p">{</span> +<a id="line-975" name="line-975"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">client_data</span><span class="p">;</span> +<a id="line-976" name="line-976"></a><span class="w"> </span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">client_data</span><span class="p">;</span> +<a id="line-977" name="line-977"></a> +<a id="line-978" name="line-978"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Received Interact message in state %s"</span><span class="p">,</span> +<a id="line-979" name="line-979"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_XSMP_STATE</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">));</span> +<a id="line-980" name="line-980"></a> +<a id="line-981" name="line-981"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">XSMP_STATE_INTERACT_REQUEST</span><span class="p">)</span> +<a id="line-982" name="line-982"></a><span class="w"> </span><span class="p">{</span> +<a id="line-983" name="line-983"></a><span class="w"> </span><span class="n">fix_broken_state</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="s">"Interact"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-984" name="line-984"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-985" name="line-985"></a><span class="w"> </span><span class="p">}</span> +<a id="line-986" name="line-986"></a> +<a id="line-987" name="line-987"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_INTERACT</span><span class="p">;</span> +<a id="line-988" name="line-988"></a><span class="w"> </span><span class="n">egg_sm_client_quit_requested</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">);</span> +<a id="line-989" name="line-989"></a><span class="p">}</span> +<a id="line-990" name="line-990"></a> +<a id="line-991" name="line-991"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-992" name="line-992"></a><span class="n">xsmp_die</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">)</span> +<a id="line-994" name="line-994"></a><span class="p">{</span> +<a id="line-995" name="line-995"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">client_data</span><span class="p">;</span> +<a id="line-996" name="line-996"></a><span class="w"> </span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">client_data</span><span class="p">;</span> +<a id="line-997" name="line-997"></a> +<a id="line-998" name="line-998"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Received Die message in state %s"</span><span class="p">,</span> +<a id="line-999" name="line-999"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_XSMP_STATE</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">));</span> +<a id="line-1000" name="line-1000"></a> +<a id="line-1001" name="line-1001"></a><span class="w"> </span><span class="n">sm_client_xsmp_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-1002" name="line-1002"></a><span class="w"> </span><span class="n">egg_sm_client_quit</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">);</span> +<a id="line-1003" name="line-1003"></a><span class="p">}</span> +<a id="line-1004" name="line-1004"></a> +<a id="line-1005" name="line-1005"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1006" name="line-1006"></a><span class="n">xsmp_save_complete</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-1007" name="line-1007"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">)</span> +<a id="line-1008" name="line-1008"></a><span class="p">{</span> +<a id="line-1009" name="line-1009"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">client_data</span><span class="p">;</span> +<a id="line-1010" name="line-1010"></a> +<a id="line-1011" name="line-1011"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Received SaveComplete message in state %s"</span><span class="p">,</span> +<a id="line-1012" name="line-1012"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_XSMP_STATE</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">));</span> +<a id="line-1013" name="line-1013"></a> +<a id="line-1014" name="line-1014"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">XSMP_STATE_SAVE_YOURSELF_DONE</span><span class="p">)</span> +<a id="line-1015" name="line-1015"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_IDLE</span><span class="p">;</span> +<a id="line-1016" name="line-1016"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1017" name="line-1017"></a><span class="w"> </span><span class="n">fix_broken_state</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="s">"SaveComplete"</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1018" name="line-1018"></a><span class="p">}</span> +<a id="line-1019" name="line-1019"></a> +<a id="line-1020" name="line-1020"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1021" name="line-1021"></a><span class="n">xsmp_shutdown_cancelled</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-1022" name="line-1022"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">)</span> +<a id="line-1023" name="line-1023"></a><span class="p">{</span> +<a id="line-1024" name="line-1024"></a><span class="w"> </span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">client_data</span><span class="p">;</span> +<a id="line-1025" name="line-1025"></a><span class="w"> </span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">client_data</span><span class="p">;</span> +<a id="line-1026" name="line-1026"></a> +<a id="line-1027" name="line-1027"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Received ShutdownCancelled message in state %s"</span><span class="p">,</span> +<a id="line-1028" name="line-1028"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_XSMP_STATE</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">));</span> +<a id="line-1029" name="line-1029"></a> +<a id="line-1030" name="line-1030"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">shutting_down</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1031" name="line-1031"></a> +<a id="line-1032" name="line-1032"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">XSMP_STATE_SAVE_YOURSELF_DONE</span><span class="p">)</span> +<a id="line-1033" name="line-1033"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1034" name="line-1034"></a><span class="w"> </span><span class="cm">/* We've finished interacting and now the SM has agreed to</span> +<a id="line-1035" name="line-1035"></a><span class="cm"> * cancel the shutdown.</span> +<a id="line-1036" name="line-1036"></a><span class="cm"> */</span> +<a id="line-1037" name="line-1037"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_IDLE</span><span class="p">;</span> +<a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="n">egg_sm_client_quit_cancelled</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">);</span> +<a id="line-1039" name="line-1039"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1040" name="line-1040"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">XSMP_STATE_SHUTDOWN_CANCELLED</span><span class="p">)</span> +<a id="line-1041" name="line-1041"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1042" name="line-1042"></a><span class="w"> </span><span class="cm">/* Hm... ok, so we got a shutdown SaveYourself, which got</span> +<a id="line-1043" name="line-1043"></a><span class="cm"> * cancelled, but the application was still interacting, so we</span> +<a id="line-1044" name="line-1044"></a><span class="cm"> * didn't tell it yet, and then *another* SaveYourself arrived,</span> +<a id="line-1045" name="line-1045"></a><span class="cm"> * which we must still be waiting to tell the app about, except</span> +<a id="line-1046" name="line-1046"></a><span class="cm"> * that now that SaveYourself has been cancelled too! Dizzy yet?</span> +<a id="line-1047" name="line-1047"></a><span class="cm"> */</span> +<a id="line-1048" name="line-1048"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">waiting_to_save_myself</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1049" name="line-1049"></a><span class="w"> </span><span class="n">update_pending_events</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-1050" name="line-1050"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1052" name="line-1052"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Sending SaveYourselfDone(False)"</span><span class="p">);</span> +<a id="line-1054" name="line-1054"></a><span class="w"> </span><span class="n">SmcSaveYourselfDone</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="n">False</span><span class="p">);</span> +<a id="line-1055" name="line-1055"></a> +<a id="line-1056" name="line-1056"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">XSMP_STATE_INTERACT</span><span class="p">)</span> +<a id="line-1057" name="line-1057"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1058" name="line-1058"></a><span class="w"> </span><span class="cm">/* The application is currently interacting, so we can't</span> +<a id="line-1059" name="line-1059"></a><span class="cm"> * tell it about the cancellation yet; we will wait until</span> +<a id="line-1060" name="line-1060"></a><span class="cm"> * after it calls egg_sm_client_will_quit().</span> +<a id="line-1061" name="line-1061"></a><span class="cm"> */</span> +<a id="line-1062" name="line-1062"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_SHUTDOWN_CANCELLED</span><span class="p">;</span> +<a id="line-1063" name="line-1063"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1064" name="line-1064"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1065" name="line-1065"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1066" name="line-1066"></a><span class="w"> </span><span class="cm">/* The shutdown was cancelled before the application got a</span> +<a id="line-1067" name="line-1067"></a><span class="cm"> * chance to interact.</span> +<a id="line-1068" name="line-1068"></a><span class="cm"> */</span> +<a id="line-1069" name="line-1069"></a><span class="w"> </span><span class="n">xsmp</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XSMP_STATE_IDLE</span><span class="p">;</span> +<a id="line-1070" name="line-1070"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1071" name="line-1071"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1072" name="line-1072"></a><span class="p">}</span> +<a id="line-1073" name="line-1073"></a> +<a id="line-1074" name="line-1074"></a><span class="cm">/* Utilities */</span> +<a id="line-1075" name="line-1075"></a> +<a id="line-1076" name="line-1076"></a><span class="cm">/* Create a restart/clone/Exec command based on @restart_command.</span> +<a id="line-1077" name="line-1077"></a><span class="cm"> * If @client_id is non-%NULL, add "--sm-client-id @client_id".</span> +<a id="line-1078" name="line-1078"></a><span class="cm"> * If @state_file is non-%NULL, add "--sm-client-state-file @state_file".</span> +<a id="line-1079" name="line-1079"></a><span class="cm"> *</span> +<a id="line-1080" name="line-1080"></a><span class="cm"> * None of the input strings are g_strdup()ed; the caller must keep</span> +<a id="line-1081" name="line-1081"></a><span class="cm"> * them around until it is done with the returned GPtrArray, and must</span> +<a id="line-1082" name="line-1082"></a><span class="cm"> * then free the array, but not its contents.</span> +<a id="line-1083" name="line-1083"></a><span class="cm"> */</span> +<a id="line-1084" name="line-1084"></a><span class="k">static</span><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span> +<a id="line-1085" name="line-1085"></a><span class="n">generate_command</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">restart_command</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">client_id</span><span class="p">,</span> +<a id="line-1086" name="line-1086"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">state_file</span><span class="p">)</span> +<a id="line-1087" name="line-1087"></a><span class="p">{</span> +<a id="line-1088" name="line-1088"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">cmd</span><span class="p">;</span> +<a id="line-1089" name="line-1089"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-1090" name="line-1090"></a> +<a id="line-1091" name="line-1091"></a><span class="w"> </span><span class="n">cmd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1092" name="line-1092"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span><span class="w"> </span><span class="n">restart_command</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span> +<a id="line-1093" name="line-1093"></a> +<a id="line-1094" name="line-1094"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">client_id</span><span class="p">)</span> +<a id="line-1095" name="line-1095"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1096" name="line-1096"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="s">"--sm-client-id"</span><span class="p">);</span> +<a id="line-1097" name="line-1097"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">client_id</span><span class="p">);</span> +<a id="line-1098" name="line-1098"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1099" name="line-1099"></a> +<a id="line-1100" name="line-1100"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">)</span> +<a id="line-1101" name="line-1101"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1102" name="line-1102"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="s">"--sm-client-state-file"</span><span class="p">);</span> +<a id="line-1103" name="line-1103"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">state_file</span><span class="p">);</span> +<a id="line-1104" name="line-1104"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1105" name="line-1105"></a> +<a id="line-1106" name="line-1106"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="n">restart_command</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-1107" name="line-1107"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span><span class="w"> </span><span class="n">restart_command</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-1108" name="line-1108"></a> +<a id="line-1109" name="line-1109"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">cmd</span><span class="p">;</span> +<a id="line-1110" name="line-1110"></a><span class="p">}</span> +<a id="line-1111" name="line-1111"></a> +<a id="line-1112" name="line-1112"></a><span class="cm">/* Takes a NULL-terminated list of SmProp * values, created by</span> +<a id="line-1113" name="line-1113"></a><span class="cm"> * array_prop, ptrarray_prop, string_prop, card8_prop, sets them, and</span> +<a id="line-1114" name="line-1114"></a><span class="cm"> * frees them.</span> +<a id="line-1115" name="line-1115"></a><span class="cm"> */</span> +<a id="line-1116" name="line-1116"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1117" name="line-1117"></a><span class="n">set_properties</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="p">...)</span> +<a id="line-1118" name="line-1118"></a><span class="p">{</span> +<a id="line-1119" name="line-1119"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">props</span><span class="p">;</span> +<a id="line-1120" name="line-1120"></a><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span><span class="n">prop</span><span class="p">;</span> +<a id="line-1121" name="line-1121"></a><span class="w"> </span><span class="kt">va_list</span><span class="w"> </span><span class="n">ap</span><span class="p">;</span> +<a id="line-1122" name="line-1122"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-1123" name="line-1123"></a> +<a id="line-1124" name="line-1124"></a><span class="w"> </span><span class="n">props</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1125" name="line-1125"></a> +<a id="line-1126" name="line-1126"></a><span class="w"> </span><span class="n">va_start</span><span class="w"> </span><span class="p">(</span><span class="n">ap</span><span class="p">,</span><span class="w"> </span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-1127" name="line-1127"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="n">prop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">ap</span><span class="p">,</span><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span><span class="p">)))</span> +<a id="line-1128" name="line-1128"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">props</span><span class="p">,</span><span class="w"> </span><span class="n">prop</span><span class="p">);</span> +<a id="line-1129" name="line-1129"></a><span class="w"> </span><span class="n">va_end</span><span class="w"> </span><span class="p">(</span><span class="n">ap</span><span class="p">);</span> +<a id="line-1130" name="line-1130"></a> +<a id="line-1131" name="line-1131"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">)</span> +<a id="line-1132" name="line-1132"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1133" name="line-1133"></a><span class="w"> </span><span class="n">SmcSetProperties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="n">props</span><span class="o">-></span><span class="n">len</span><span class="p">,</span> +<a id="line-1134" name="line-1134"></a><span class="w"> </span><span class="p">(</span><span class="n">SmProp</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="n">props</span><span class="o">-></span><span class="n">pdata</span><span class="p">);</span> +<a id="line-1135" name="line-1135"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1136" name="line-1136"></a> +<a id="line-1137" name="line-1137"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">props</span><span class="o">-></span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-1138" name="line-1138"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1139" name="line-1139"></a><span class="w"> </span><span class="n">prop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">props</span><span class="o">-></span><span class="n">pdata</span><span class="p">[</span><span class="n">i</span><span class="p">];</span> +<a id="line-1140" name="line-1140"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">prop</span><span class="o">-></span><span class="n">vals</span><span class="p">);</span> +<a id="line-1141" name="line-1141"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">prop</span><span class="p">);</span> +<a id="line-1142" name="line-1142"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1143" name="line-1143"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">props</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1144" name="line-1144"></a><span class="p">}</span> +<a id="line-1145" name="line-1145"></a> +<a id="line-1146" name="line-1146"></a><span class="cm">/* Takes a NULL-terminated list of property names and deletes them. */</span> +<a id="line-1147" name="line-1147"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1148" name="line-1148"></a><span class="n">delete_properties</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientXSMP</span><span class="w"> </span><span class="o">*</span><span class="n">xsmp</span><span class="p">,</span><span class="w"> </span><span class="p">...)</span> +<a id="line-1149" name="line-1149"></a><span class="p">{</span> +<a id="line-1150" name="line-1150"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">props</span><span class="p">;</span> +<a id="line-1151" name="line-1151"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">prop</span><span class="p">;</span> +<a id="line-1152" name="line-1152"></a><span class="w"> </span><span class="kt">va_list</span><span class="w"> </span><span class="n">ap</span><span class="p">;</span> +<a id="line-1153" name="line-1153"></a> +<a id="line-1154" name="line-1154"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">)</span> +<a id="line-1155" name="line-1155"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1156" name="line-1156"></a> +<a id="line-1157" name="line-1157"></a><span class="w"> </span><span class="n">props</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1158" name="line-1158"></a> +<a id="line-1159" name="line-1159"></a><span class="w"> </span><span class="n">va_start</span><span class="w"> </span><span class="p">(</span><span class="n">ap</span><span class="p">,</span><span class="w"> </span><span class="n">xsmp</span><span class="p">);</span> +<a id="line-1160" name="line-1160"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="n">prop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">ap</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)))</span> +<a id="line-1161" name="line-1161"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">props</span><span class="p">,</span><span class="w"> </span><span class="n">prop</span><span class="p">);</span> +<a id="line-1162" name="line-1162"></a><span class="w"> </span><span class="n">va_end</span><span class="w"> </span><span class="p">(</span><span class="n">ap</span><span class="p">);</span> +<a id="line-1163" name="line-1163"></a> +<a id="line-1164" name="line-1164"></a><span class="w"> </span><span class="n">SmcDeleteProperties</span><span class="w"> </span><span class="p">(</span><span class="n">xsmp</span><span class="o">-></span><span class="n">connection</span><span class="p">,</span><span class="w"> </span><span class="n">props</span><span class="o">-></span><span class="n">len</span><span class="p">,</span> +<a id="line-1165" name="line-1165"></a><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="n">props</span><span class="o">-></span><span class="n">pdata</span><span class="p">);</span> +<a id="line-1166" name="line-1166"></a> +<a id="line-1167" name="line-1167"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">props</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1168" name="line-1168"></a><span class="p">}</span> +<a id="line-1169" name="line-1169"></a> +<a id="line-1170" name="line-1170"></a><span class="cm">/* Takes an array of strings and creates a LISTofARRAY8 property. The</span> +<a id="line-1171" name="line-1171"></a><span class="cm"> * strings are neither dupped nor freed; they need to remain valid</span> +<a id="line-1172" name="line-1172"></a><span class="cm"> * until you're done with the SmProp.</span> +<a id="line-1173" name="line-1173"></a><span class="cm"> */</span> +<a id="line-1174" name="line-1174"></a><span class="k">static</span><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span> +<a id="line-1175" name="line-1175"></a><span class="n">array_prop</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="p">...)</span> +<a id="line-1176" name="line-1176"></a><span class="p">{</span> +<a id="line-1177" name="line-1177"></a><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span><span class="n">prop</span><span class="p">;</span> +<a id="line-1178" name="line-1178"></a><span class="w"> </span><span class="n">SmPropValue</span><span class="w"> </span><span class="n">pv</span><span class="p">;</span> +<a id="line-1179" name="line-1179"></a><span class="w"> </span><span class="n">GArray</span><span class="w"> </span><span class="o">*</span><span class="n">vals</span><span class="p">;</span> +<a id="line-1180" name="line-1180"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">;</span> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="kt">va_list</span><span class="w"> </span><span class="n">ap</span><span class="p">;</span> +<a id="line-1182" name="line-1182"></a> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="n">prop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">SmProp</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1184" name="line-1184"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">name</span><span class="p">;</span> +<a id="line-1185" name="line-1185"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">SmLISTofARRAY8</span><span class="p">;</span> +<a id="line-1186" name="line-1186"></a> +<a id="line-1187" name="line-1187"></a><span class="w"> </span><span class="n">vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_array_new</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">SmPropValue</span><span class="p">));</span> +<a id="line-1188" name="line-1188"></a> +<a id="line-1189" name="line-1189"></a><span class="w"> </span><span class="n">va_start</span><span class="w"> </span><span class="p">(</span><span class="n">ap</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-1190" name="line-1190"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">va_arg</span><span class="w"> </span><span class="p">(</span><span class="n">ap</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)))</span> +<a id="line-1191" name="line-1191"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1192" name="line-1192"></a><span class="w"> </span><span class="n">pv</span><span class="p">.</span><span class="n">length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-1193" name="line-1193"></a><span class="w"> </span><span class="n">pv</span><span class="p">.</span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">value</span><span class="p">;</span> +<a id="line-1194" name="line-1194"></a><span class="w"> </span><span class="n">g_array_append_val</span><span class="w"> </span><span class="p">(</span><span class="n">vals</span><span class="p">,</span><span class="w"> </span><span class="n">pv</span><span class="p">);</span> +<a id="line-1195" name="line-1195"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1196" name="line-1196"></a><span class="w"> </span><span class="n">va_end</span><span class="w"> </span><span class="p">(</span><span class="n">ap</span><span class="p">);</span> +<a id="line-1197" name="line-1197"></a> +<a id="line-1198" name="line-1198"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">num_vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">vals</span><span class="o">-></span><span class="n">len</span><span class="p">;</span> +<a id="line-1199" name="line-1199"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">SmPropValue</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">vals</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1200" name="line-1200"></a> +<a id="line-1201" name="line-1201"></a><span class="w"> </span><span class="n">g_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">vals</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1202" name="line-1202"></a> +<a id="line-1203" name="line-1203"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">prop</span><span class="p">;</span> +<a id="line-1204" name="line-1204"></a><span class="p">}</span> +<a id="line-1205" name="line-1205"></a> +<a id="line-1206" name="line-1206"></a><span class="cm">/* Takes a GPtrArray of strings and creates a LISTofARRAY8 property.</span> +<a id="line-1207" name="line-1207"></a><span class="cm"> * The array contents are neither dupped nor freed; they need to</span> +<a id="line-1208" name="line-1208"></a><span class="cm"> * remain valid until you're done with the SmProp.</span> +<a id="line-1209" name="line-1209"></a><span class="cm"> */</span> +<a id="line-1210" name="line-1210"></a><span class="k">static</span><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span> +<a id="line-1211" name="line-1211"></a><span class="n">ptrarray_prop</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">values</span><span class="p">)</span> +<a id="line-1212" name="line-1212"></a><span class="p">{</span> +<a id="line-1213" name="line-1213"></a><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span><span class="n">prop</span><span class="p">;</span> +<a id="line-1214" name="line-1214"></a><span class="w"> </span><span class="n">SmPropValue</span><span class="w"> </span><span class="n">pv</span><span class="p">;</span> +<a id="line-1215" name="line-1215"></a><span class="w"> </span><span class="n">GArray</span><span class="w"> </span><span class="o">*</span><span class="n">vals</span><span class="p">;</span> +<a id="line-1216" name="line-1216"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-1217" name="line-1217"></a> +<a id="line-1218" name="line-1218"></a><span class="w"> </span><span class="n">prop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">SmProp</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1219" name="line-1219"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">name</span><span class="p">;</span> +<a id="line-1220" name="line-1220"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">SmLISTofARRAY8</span><span class="p">;</span> +<a id="line-1221" name="line-1221"></a> +<a id="line-1222" name="line-1222"></a><span class="w"> </span><span class="n">vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_array_new</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">SmPropValue</span><span class="p">));</span> +<a id="line-1223" name="line-1223"></a> +<a id="line-1224" name="line-1224"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">values</span><span class="o">-></span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-1225" name="line-1225"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1226" name="line-1226"></a><span class="w"> </span><span class="n">pv</span><span class="p">.</span><span class="n">length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">values</span><span class="o">-></span><span class="n">pdata</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-1227" name="line-1227"></a><span class="w"> </span><span class="n">pv</span><span class="p">.</span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">values</span><span class="o">-></span><span class="n">pdata</span><span class="p">[</span><span class="n">i</span><span class="p">];</span> +<a id="line-1228" name="line-1228"></a><span class="w"> </span><span class="n">g_array_append_val</span><span class="w"> </span><span class="p">(</span><span class="n">vals</span><span class="p">,</span><span class="w"> </span><span class="n">pv</span><span class="p">);</span> +<a id="line-1229" name="line-1229"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1230" name="line-1230"></a> +<a id="line-1231" name="line-1231"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">num_vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">vals</span><span class="o">-></span><span class="n">len</span><span class="p">;</span> +<a id="line-1232" name="line-1232"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">SmPropValue</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">vals</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1233" name="line-1233"></a> +<a id="line-1234" name="line-1234"></a><span class="w"> </span><span class="n">g_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">vals</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1235" name="line-1235"></a> +<a id="line-1236" name="line-1236"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">prop</span><span class="p">;</span> +<a id="line-1237" name="line-1237"></a><span class="p">}</span> +<a id="line-1238" name="line-1238"></a> +<a id="line-1239" name="line-1239"></a><span class="cm">/* Takes a string and creates an ARRAY8 property. The string is</span> +<a id="line-1240" name="line-1240"></a><span class="cm"> * neither dupped nor freed; it needs to remain valid until you're</span> +<a id="line-1241" name="line-1241"></a><span class="cm"> * done with the SmProp.</span> +<a id="line-1242" name="line-1242"></a><span class="cm"> */</span> +<a id="line-1243" name="line-1243"></a><span class="k">static</span><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span> +<a id="line-1244" name="line-1244"></a><span class="n">string_prop</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">)</span> +<a id="line-1245" name="line-1245"></a><span class="p">{</span> +<a id="line-1246" name="line-1246"></a><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span><span class="n">prop</span><span class="p">;</span> +<a id="line-1247" name="line-1247"></a> +<a id="line-1248" name="line-1248"></a><span class="w"> </span><span class="n">prop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">SmProp</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1249" name="line-1249"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">name</span><span class="p">;</span> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">SmARRAY8</span><span class="p">;</span> +<a id="line-1251" name="line-1251"></a> +<a id="line-1252" name="line-1252"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">num_vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1253" name="line-1253"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">SmPropValue</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1254" name="line-1254"></a> +<a id="line-1255" name="line-1255"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">vals</span><span class="p">[</span><span class="mi">0</span><span class="p">].</span><span class="n">length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-1256" name="line-1256"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">vals</span><span class="p">[</span><span class="mi">0</span><span class="p">].</span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">value</span><span class="p">;</span> +<a id="line-1257" name="line-1257"></a> +<a id="line-1258" name="line-1258"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">prop</span><span class="p">;</span> +<a id="line-1259" name="line-1259"></a><span class="p">}</span> +<a id="line-1260" name="line-1260"></a> +<a id="line-1261" name="line-1261"></a><span class="cm">/* Takes a char and creates a CARD8 property. */</span> +<a id="line-1262" name="line-1262"></a><span class="k">static</span><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span> +<a id="line-1263" name="line-1263"></a><span class="n">card8_prop</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">value</span><span class="p">)</span> +<a id="line-1264" name="line-1264"></a><span class="p">{</span> +<a id="line-1265" name="line-1265"></a><span class="w"> </span><span class="n">SmProp</span><span class="w"> </span><span class="o">*</span><span class="n">prop</span><span class="p">;</span> +<a id="line-1266" name="line-1266"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">card8val</span><span class="p">;</span> +<a id="line-1267" name="line-1267"></a> +<a id="line-1268" name="line-1268"></a><span class="w"> </span><span class="cm">/* To avoid having to allocate and free prop->vals[0], we cheat and</span> +<a id="line-1269" name="line-1269"></a><span class="cm"> * make vals a 2-element-long array and then use the second element</span> +<a id="line-1270" name="line-1270"></a><span class="cm"> * to store value.</span> +<a id="line-1271" name="line-1271"></a><span class="cm"> */</span> +<a id="line-1272" name="line-1272"></a> +<a id="line-1273" name="line-1273"></a><span class="w"> </span><span class="n">prop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">SmProp</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1274" name="line-1274"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">name</span><span class="p">;</span> +<a id="line-1275" name="line-1275"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">SmCARD8</span><span class="p">;</span> +<a id="line-1276" name="line-1276"></a> +<a id="line-1277" name="line-1277"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">num_vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1278" name="line-1278"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">SmPropValue</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-1279" name="line-1279"></a><span class="w"> </span><span class="n">card8val</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)(</span><span class="o">&</span><span class="n">prop</span><span class="o">-></span><span class="n">vals</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span> +<a id="line-1280" name="line-1280"></a><span class="w"> </span><span class="n">card8val</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">value</span><span class="p">;</span> +<a id="line-1281" name="line-1281"></a> +<a id="line-1282" name="line-1282"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">vals</span><span class="p">[</span><span class="mi">0</span><span class="p">].</span><span class="n">length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1283" name="line-1283"></a><span class="w"> </span><span class="n">prop</span><span class="o">-></span><span class="n">vals</span><span class="p">[</span><span class="mi">0</span><span class="p">].</span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">card8val</span><span class="p">;</span> +<a id="line-1284" name="line-1284"></a> +<a id="line-1285" name="line-1285"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">prop</span><span class="p">;</span> +<a id="line-1286" name="line-1286"></a><span class="p">}</span> +<a id="line-1287" name="line-1287"></a> +<a id="line-1288" name="line-1288"></a><span class="cm">/* ICE code. This makes no effort to play nice with anyone else trying</span> +<a id="line-1289" name="line-1289"></a><span class="cm"> * to use libICE. Fortunately, no one uses libICE for anything other</span> +<a id="line-1290" name="line-1290"></a><span class="cm"> * than SM. (DCOP uses ICE, but it has its own private copy of</span> +<a id="line-1291" name="line-1291"></a><span class="cm"> * libICE.)</span> +<a id="line-1292" name="line-1292"></a><span class="cm"> *</span> +<a id="line-1293" name="line-1293"></a><span class="cm"> * When this moves to gtk, it will need to be cleverer, to avoid</span> +<a id="line-1294" name="line-1294"></a><span class="cm"> * tripping over old apps that use MateClient or that use libSM</span> +<a id="line-1295" name="line-1295"></a><span class="cm"> * directly.</span> +<a id="line-1296" name="line-1296"></a><span class="cm"> */</span> +<a id="line-1297" name="line-1297"></a> +<a id="line-1298" name="line-1298"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><X11/ICE/ICElib.h></span> +<a id="line-1299" name="line-1299"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><fcntl.h></span> +<a id="line-1300" name="line-1300"></a> +<a id="line-1301" name="line-1301"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">ice_error_handler</span><span class="w"> </span><span class="p">(</span><span class="n">IceConn</span><span class="w"> </span><span class="n">ice_conn</span><span class="p">,</span> +<a id="line-1302" name="line-1302"></a><span class="w"> </span><span class="n">Bool</span><span class="w"> </span><span class="n">swap</span><span class="p">,</span> +<a id="line-1303" name="line-1303"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">offending_minor_opcode</span><span class="p">,</span> +<a id="line-1304" name="line-1304"></a><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="n">offending_sequence</span><span class="p">,</span> +<a id="line-1305" name="line-1305"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">error_class</span><span class="p">,</span> +<a id="line-1306" name="line-1306"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">severity</span><span class="p">,</span> +<a id="line-1307" name="line-1307"></a><span class="w"> </span><span class="n">IcePointer</span><span class="w"> </span><span class="n">values</span><span class="p">);</span> +<a id="line-1308" name="line-1308"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">ice_io_error_handler</span><span class="w"> </span><span class="p">(</span><span class="n">IceConn</span><span class="w"> </span><span class="n">ice_conn</span><span class="p">);</span> +<a id="line-1309" name="line-1309"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">ice_connection_watch</span><span class="w"> </span><span class="p">(</span><span class="n">IceConn</span><span class="w"> </span><span class="n">ice_conn</span><span class="p">,</span> +<a id="line-1310" name="line-1310"></a><span class="w"> </span><span class="n">IcePointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">,</span> +<a id="line-1311" name="line-1311"></a><span class="w"> </span><span class="n">Bool</span><span class="w"> </span><span class="n">opening</span><span class="p">,</span> +<a id="line-1312" name="line-1312"></a><span class="w"> </span><span class="n">IcePointer</span><span class="w"> </span><span class="o">*</span><span class="n">watch_data</span><span class="p">);</span> +<a id="line-1313" name="line-1313"></a> +<a id="line-1314" name="line-1314"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1315" name="line-1315"></a><span class="nf">ice_init</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-1316" name="line-1316"></a><span class="p">{</span> +<a id="line-1317" name="line-1317"></a><span class="w"> </span><span class="n">IceSetIOErrorHandler</span><span class="w"> </span><span class="p">(</span><span class="n">ice_io_error_handler</span><span class="p">);</span> +<a id="line-1318" name="line-1318"></a><span class="w"> </span><span class="n">IceSetErrorHandler</span><span class="w"> </span><span class="p">(</span><span class="n">ice_error_handler</span><span class="p">);</span> +<a id="line-1319" name="line-1319"></a><span class="w"> </span><span class="n">IceAddConnectionWatch</span><span class="w"> </span><span class="p">(</span><span class="n">ice_connection_watch</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1320" name="line-1320"></a><span class="p">}</span> +<a id="line-1321" name="line-1321"></a> +<a id="line-1322" name="line-1322"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1323" name="line-1323"></a><span class="nf">process_ice_messages</span><span class="w"> </span><span class="p">(</span><span class="n">IceConn</span><span class="w"> </span><span class="n">ice_conn</span><span class="p">)</span> +<a id="line-1324" name="line-1324"></a><span class="p">{</span> +<a id="line-1325" name="line-1325"></a><span class="w"> </span><span class="n">IceProcessMessagesStatus</span><span class="w"> </span><span class="n">status</span><span class="p">;</span> +<a id="line-1326" name="line-1326"></a><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">IceProcessMessages</span><span class="w"> </span><span class="p">(</span><span class="n">ice_conn</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1327" name="line-1327"></a> +<a id="line-1328" name="line-1328"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="p">)</span> +<a id="line-1329" name="line-1329"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1330" name="line-1330"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">IceProcessMessagesSuccess</span><span class="p">:</span> +<a id="line-1331" name="line-1331"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1332" name="line-1332"></a> +<a id="line-1333" name="line-1333"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">IceProcessMessagesIOError</span><span class="p">:</span> +<a id="line-1334" name="line-1334"></a><span class="w"> </span><span class="n">sm_client_xsmp_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">IceGetConnectionContext</span><span class="w"> </span><span class="p">(</span><span class="n">ice_conn</span><span class="p">));</span> +<a id="line-1335" name="line-1335"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1336" name="line-1336"></a> +<a id="line-1337" name="line-1337"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">IceProcessMessagesConnectionClosed</span><span class="p">:</span> +<a id="line-1338" name="line-1338"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1339" name="line-1339"></a> +<a id="line-1340" name="line-1340"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1341" name="line-1341"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-1342" name="line-1342"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1343" name="line-1343"></a><span class="p">}</span> +<a id="line-1344" name="line-1344"></a> +<a id="line-1345" name="line-1345"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1346" name="line-1346"></a><span class="nf">ice_iochannel_watch</span><span class="w"> </span><span class="p">(</span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="n">channel</span><span class="p">,</span> +<a id="line-1347" name="line-1347"></a><span class="w"> </span><span class="n">GIOCondition</span><span class="w"> </span><span class="n">condition</span><span class="p">,</span> +<a id="line-1348" name="line-1348"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">)</span> +<a id="line-1349" name="line-1349"></a><span class="p">{</span> +<a id="line-1350" name="line-1350"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">process_ice_messages</span><span class="w"> </span><span class="p">(</span><span class="n">client_data</span><span class="p">);</span> +<a id="line-1351" name="line-1351"></a><span class="p">}</span> +<a id="line-1352" name="line-1352"></a> +<a id="line-1353" name="line-1353"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1354" name="line-1354"></a><span class="nf">ice_connection_watch</span><span class="w"> </span><span class="p">(</span><span class="n">IceConn</span><span class="w"> </span><span class="n">ice_conn</span><span class="p">,</span> +<a id="line-1355" name="line-1355"></a><span class="w"> </span><span class="n">IcePointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">,</span> +<a id="line-1356" name="line-1356"></a><span class="w"> </span><span class="n">Bool</span><span class="w"> </span><span class="n">opening</span><span class="p">,</span> +<a id="line-1357" name="line-1357"></a><span class="w"> </span><span class="n">IcePointer</span><span class="w"> </span><span class="o">*</span><span class="n">watch_data</span><span class="p">)</span> +<a id="line-1358" name="line-1358"></a><span class="p">{</span> +<a id="line-1359" name="line-1359"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">watch_id</span><span class="p">;</span> +<a id="line-1360" name="line-1360"></a> +<a id="line-1361" name="line-1361"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">opening</span><span class="p">)</span> +<a id="line-1362" name="line-1362"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1363" name="line-1363"></a><span class="w"> </span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="n">channel</span><span class="p">;</span> +<a id="line-1364" name="line-1364"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">fd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">IceConnectionNumber</span><span class="w"> </span><span class="p">(</span><span class="n">ice_conn</span><span class="p">);</span> +<a id="line-1365" name="line-1365"></a> +<a id="line-1366" name="line-1366"></a><span class="w"> </span><span class="n">fcntl</span><span class="w"> </span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="n">F_SETFD</span><span class="p">,</span><span class="w"> </span><span class="n">fcntl</span><span class="w"> </span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="n">F_GETFD</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">FD_CLOEXEC</span><span class="p">);</span> +<a id="line-1367" name="line-1367"></a><span class="w"> </span><span class="n">channel</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_unix_new</span><span class="w"> </span><span class="p">(</span><span class="n">fd</span><span class="p">);</span> +<a id="line-1368" name="line-1368"></a><span class="w"> </span><span class="n">watch_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_add_watch</span><span class="w"> </span><span class="p">(</span><span class="n">channel</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_IO_ERR</span><span class="p">,</span> +<a id="line-1369" name="line-1369"></a><span class="w"> </span><span class="n">ice_iochannel_watch</span><span class="p">,</span><span class="w"> </span><span class="n">ice_conn</span><span class="p">);</span> +<a id="line-1370" name="line-1370"></a><span class="w"> </span><span class="n">g_io_channel_unref</span><span class="w"> </span><span class="p">(</span><span class="n">channel</span><span class="p">);</span> +<a id="line-1371" name="line-1371"></a> +<a id="line-1372" name="line-1372"></a><span class="w"> </span><span class="o">*</span><span class="n">watch_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GUINT_TO_POINTER</span><span class="w"> </span><span class="p">(</span><span class="n">watch_id</span><span class="p">);</span> +<a id="line-1373" name="line-1373"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1374" name="line-1374"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1375" name="line-1375"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1376" name="line-1376"></a><span class="w"> </span><span class="n">watch_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GPOINTER_TO_UINT</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">watch_data</span><span class="p">);</span> +<a id="line-1377" name="line-1377"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">watch_id</span><span class="p">);</span> +<a id="line-1378" name="line-1378"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1379" name="line-1379"></a><span class="p">}</span> +<a id="line-1380" name="line-1380"></a> +<a id="line-1381" name="line-1381"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1382" name="line-1382"></a><span class="nf">ice_error_handler</span><span class="w"> </span><span class="p">(</span><span class="n">IceConn</span><span class="w"> </span><span class="n">ice_conn</span><span class="p">,</span> +<a id="line-1383" name="line-1383"></a><span class="w"> </span><span class="n">Bool</span><span class="w"> </span><span class="n">swap</span><span class="p">,</span> +<a id="line-1384" name="line-1384"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">offending_minor_opcode</span><span class="p">,</span> +<a id="line-1385" name="line-1385"></a><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="n">offending_sequence</span><span class="p">,</span> +<a id="line-1386" name="line-1386"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">error_class</span><span class="p">,</span> +<a id="line-1387" name="line-1387"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">severity</span><span class="p">,</span> +<a id="line-1388" name="line-1388"></a><span class="w"> </span><span class="n">IcePointer</span><span class="w"> </span><span class="n">values</span><span class="p">)</span> +<a id="line-1389" name="line-1389"></a><span class="p">{</span> +<a id="line-1390" name="line-1390"></a><span class="w"> </span><span class="cm">/* Do nothing */</span> +<a id="line-1391" name="line-1391"></a><span class="p">}</span> +<a id="line-1392" name="line-1392"></a> +<a id="line-1393" name="line-1393"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1394" name="line-1394"></a><span class="nf">ice_io_error_handler</span><span class="w"> </span><span class="p">(</span><span class="n">IceConn</span><span class="w"> </span><span class="n">ice_conn</span><span class="p">)</span> +<a id="line-1395" name="line-1395"></a><span class="p">{</span> +<a id="line-1396" name="line-1396"></a><span class="w"> </span><span class="cm">/* Do nothing */</span> +<a id="line-1397" name="line-1397"></a><span class="p">}</span> +<a id="line-1398" name="line-1398"></a> +<a id="line-1399" name="line-1399"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1400" name="line-1400"></a><span class="nf">smc_error_handler</span><span class="w"> </span><span class="p">(</span><span class="n">SmcConn</span><span class="w"> </span><span class="n">smc_conn</span><span class="p">,</span> +<a id="line-1401" name="line-1401"></a><span class="w"> </span><span class="n">Bool</span><span class="w"> </span><span class="n">swap</span><span class="p">,</span> +<a id="line-1402" name="line-1402"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">offending_minor_opcode</span><span class="p">,</span> +<a id="line-1403" name="line-1403"></a><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="n">offending_sequence</span><span class="p">,</span> +<a id="line-1404" name="line-1404"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">error_class</span><span class="p">,</span> +<a id="line-1405" name="line-1405"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">severity</span><span class="p">,</span> +<a id="line-1406" name="line-1406"></a><span class="w"> </span><span class="n">SmPointer</span><span class="w"> </span><span class="n">values</span><span class="p">)</span> +<a id="line-1407" name="line-1407"></a><span class="p">{</span> +<a id="line-1408" name="line-1408"></a><span class="w"> </span><span class="cm">/* Do nothing */</span> +<a id="line-1409" name="line-1409"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/12.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/12.html new file mode 100644 index 00000000..747c79be --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/12.html @@ -0,0 +1,1523 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: gsearchtool/mate-submodules/libegg/eggsmclient.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> eggsmclient.c</p> +<a href="12.html#line-48"> unknownMacro 48</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span> +<span class="normal">533</span> +<span class="normal">534</span> +<span class="normal">535</span> +<span class="normal">536</span> +<span class="normal">537</span> +<span class="normal">538</span> +<span class="normal">539</span> +<span class="normal">540</span> +<span class="normal">541</span> +<span class="normal">542</span> +<span class="normal">543</span> +<span class="normal">544</span> +<span class="normal">545</span> +<span class="normal">546</span> +<span class="normal">547</span> +<span class="normal">548</span> +<span class="normal">549</span> +<span class="normal">550</span> +<span class="normal">551</span> +<span class="normal">552</span> +<span class="normal">553</span> +<span class="normal">554</span> +<span class="normal">555</span> +<span class="normal">556</span> +<span class="normal">557</span> +<span class="normal">558</span> +<span class="normal">559</span> +<span class="normal">560</span> +<span class="normal">561</span> +<span class="normal">562</span> +<span class="normal">563</span> +<span class="normal">564</span> +<span class="normal">565</span> +<span class="normal">566</span> +<span class="normal">567</span> +<span class="normal">568</span> +<span class="normal">569</span> +<span class="normal">570</span> +<span class="normal">571</span> +<span class="normal">572</span> +<span class="normal">573</span> +<span class="normal">574</span> +<span class="normal">575</span> +<span class="normal">576</span> +<span class="normal">577</span> +<span class="normal">578</span> +<span class="normal">579</span> +<span class="normal">580</span> +<span class="normal">581</span> +<span class="normal">582</span> +<span class="normal">583</span> +<span class="normal">584</span> +<span class="normal">585</span> +<span class="normal">586</span> +<span class="normal">587</span> +<span class="normal">588</span> +<span class="normal">589</span> +<span class="normal">590</span> +<span class="normal">591</span> +<span class="normal">592</span> +<span class="normal">593</span> +<span class="normal">594</span> +<span class="normal">595</span> +<span class="normal">596</span> +<span class="normal">597</span> +<span class="normal">598</span> +<span class="normal">599</span> +<span class="normal">600</span> +<span class="normal">601</span> +<span class="normal">602</span> +<span class="normal">603</span> +<span class="normal">604</span> +<span class="normal">605</span> +<span class="normal">606</span> +<span class="normal">607</span> +<span class="normal">608</span> +<span class="normal">609</span> +<span class="normal">610</span> +<span class="normal">611</span> +<span class="normal">612</span> +<span class="normal">613</span> +<span class="normal">614</span> +<span class="normal">615</span> +<span class="normal">616</span> +<span class="normal">617</span> +<span class="normal">618</span> +<span class="normal">619</span> +<span class="normal">620</span> +<span class="normal">621</span> +<span class="normal">622</span> +<span class="normal">623</span> +<span class="normal">624</span> +<span class="normal">625</span> +<span class="normal">626</span> +<span class="normal">627</span> +<span class="normal">628</span> +<span class="normal">629</span> +<span class="normal">630</span> +<span class="normal">631</span> +<span class="normal">632</span> +<span class="normal">633</span> +<span class="normal">634</span> +<span class="normal">635</span> +<span class="normal">636</span> +<span class="normal">637</span> +<span class="normal">638</span> +<span class="normal">639</span> +<span class="normal">640</span> +<span class="normal">641</span> +<span class="normal">642</span> +<span class="normal">643</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/*</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2007 Novell, Inc.</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span> +<a id="line-5" name="line-5"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span> +<a id="line-6" name="line-6"></a><span class="cm"> * License as published by the Free Software Foundation; either</span> +<a id="line-7" name="line-7"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span> +<a id="line-8" name="line-8"></a><span class="cm"> *</span> +<a id="line-9" name="line-9"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span> +<a id="line-10" name="line-10"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> +<a id="line-12" name="line-12"></a><span class="cm"> * Library General Public License for more details.</span> +<a id="line-13" name="line-13"></a><span class="cm"> *</span> +<a id="line-14" name="line-14"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span> +<a id="line-15" name="line-15"></a><span class="cm"> * License along with this library; if not, write to the</span> +<a id="line-16" name="line-16"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,</span> +<a id="line-17" name="line-17"></a><span class="cm"> * Boston, MA 02110-1301, USA.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"config.h"</span> +<a id="line-21" name="line-21"></a> +<a id="line-22" name="line-22"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-23" name="line-23"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-24" name="line-24"></a> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"eggsmclient.h"</span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"eggsmclient-private.h"</span> +<a id="line-27" name="line-27"></a> +<a id="line-28" name="line-28"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">egg_sm_client_debug_handler</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">log_domain</span><span class="p">,</span> +<a id="line-29" name="line-29"></a><span class="w"> </span><span class="n">GLogLevelFlags</span><span class="w"> </span><span class="n">log_level</span><span class="p">,</span> +<a id="line-30" name="line-30"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">,</span> +<a id="line-31" name="line-31"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">);</span> +<a id="line-32" name="line-32"></a> +<a id="line-33" name="line-33"></a><span class="k">enum</span> +<a id="line-34" name="line-34"></a><span class="p">{</span> +<a id="line-35" name="line-35"></a><span class="w"> </span><span class="n">SAVE_STATE</span><span class="p">,</span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="n">QUIT_REQUESTED</span><span class="p">,</span> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="n">QUIT_CANCELLED</span><span class="p">,</span> +<a id="line-38" name="line-38"></a><span class="w"> </span><span class="n">QUIT</span><span class="p">,</span> +<a id="line-39" name="line-39"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-40" name="line-40"></a><span class="p">};</span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">state_file</span><span class="p">;</span> +<a id="line-46" name="line-46"></a><span class="p">}</span><span class="n">EggSMClientPrivate</span><span class="p">;</span> +<a id="line-47" name="line-47"></a> +<a id="line-48" name="line-48"></a><span class="hll"><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="p">,</span><span class="w"> </span><span class="n">egg_sm_client</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_OBJECT</span><span class="p">)</span><span class="error2"><--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</span> +</span><a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="k">static</span><span class="w"> </span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">global_client</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="k">static</span><span class="w"> </span><span class="n">EggSMClientMode</span><span class="w"> </span><span class="n">global_client_mode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EGG_SM_CLIENT_MODE_NORMAL</span><span class="p">;</span> +<a id="line-52" name="line-52"></a> +<a id="line-53" name="line-53"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-54" name="line-54"></a><span class="nf">running_in_mate</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-55" name="line-55"></a><span class="p">{</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">g_getenv</span><span class="w"> </span><span class="p">(</span><span class="s">"XDG_CURRENT_DESKTOP"</span><span class="p">),</span><span class="w"> </span><span class="s">"MATE"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">g_getenv</span><span class="w"> </span><span class="p">(</span><span class="s">"XDG_SESSION_DESKTOP"</span><span class="p">),</span><span class="w"> </span><span class="s">"mate"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">g_getenv</span><span class="w"> </span><span class="p">(</span><span class="s">"DESKTOP_SESSION"</span><span class="p">),</span><span class="w"> </span><span class="s">"mate"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-59" name="line-59"></a><span class="p">}</span> +<a id="line-60" name="line-60"></a> +<a id="line-61" name="line-61"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-62" name="line-62"></a><span class="nf">egg_sm_client_init</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">)</span> +<a id="line-63" name="line-63"></a><span class="p">{</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="p">;</span> +<a id="line-65" name="line-65"></a><span class="p">}</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-68" name="line-68"></a><span class="nf">egg_sm_client_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-69" name="line-69"></a><span class="p">{</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">object_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-71" name="line-71"></a> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-73" name="line-73"></a><span class="cm"> * EggSMClient::save_state:</span> +<a id="line-74" name="line-74"></a><span class="cm"> * @client: the client</span> +<a id="line-75" name="line-75"></a><span class="cm"> * @state_file: a #GKeyFile to save state information into</span> +<a id="line-76" name="line-76"></a><span class="cm"> *</span> +<a id="line-77" name="line-77"></a><span class="cm"> * Emitted when the session manager has requested that the</span> +<a id="line-78" name="line-78"></a><span class="cm"> * application save information about its current state. The</span> +<a id="line-79" name="line-79"></a><span class="cm"> * application should save its state into @state_file, and then the</span> +<a id="line-80" name="line-80"></a><span class="cm"> * session manager may then restart the application in a future</span> +<a id="line-81" name="line-81"></a><span class="cm"> * session and tell it to initialize itself from that state.</span> +<a id="line-82" name="line-82"></a><span class="cm"> *</span> +<a id="line-83" name="line-83"></a><span class="cm"> * You should not save any data into @state_file's "start group"</span> +<a id="line-84" name="line-84"></a><span class="cm"> * (ie, the %NULL group). Instead, applications should save their</span> +<a id="line-85" name="line-85"></a><span class="cm"> * data into groups with names that start with the application name,</span> +<a id="line-86" name="line-86"></a><span class="cm"> * and libraries that connect to this signal should save their data</span> +<a id="line-87" name="line-87"></a><span class="cm"> * into groups with names that start with the library name.</span> +<a id="line-88" name="line-88"></a><span class="cm"> *</span> +<a id="line-89" name="line-89"></a><span class="cm"> * Alternatively, rather than (or in addition to) using @state_file,</span> +<a id="line-90" name="line-90"></a><span class="cm"> * the application can save its state by calling</span> +<a id="line-91" name="line-91"></a><span class="cm"> * egg_sm_client_set_restart_command() during the processing of this</span> +<a id="line-92" name="line-92"></a><span class="cm"> * signal (eg, to include a list of files to open).</span> +<a id="line-93" name="line-93"></a><span class="cm"> **/</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">SAVE_STATE</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"save_state"</span><span class="p">,</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">),</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientClass</span><span class="p">,</span><span class="w"> </span><span class="n">save_state</span><span class="p">),</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__POINTER</span><span class="p">,</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_POINTER</span><span class="p">);</span> +<a id="line-103" name="line-103"></a> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-105" name="line-105"></a><span class="cm"> * EggSMClient::quit_requested:</span> +<a id="line-106" name="line-106"></a><span class="cm"> * @client: the client</span> +<a id="line-107" name="line-107"></a><span class="cm"> *</span> +<a id="line-108" name="line-108"></a><span class="cm"> * Emitted when the session manager requests that the application</span> +<a id="line-109" name="line-109"></a><span class="cm"> * exit (generally because the user is logging out). The application</span> +<a id="line-110" name="line-110"></a><span class="cm"> * should decide whether or not it is willing to quit (perhaps after</span> +<a id="line-111" name="line-111"></a><span class="cm"> * asking the user what to do with documents that have unsaved</span> +<a id="line-112" name="line-112"></a><span class="cm"> * changes) and then call egg_sm_client_will_quit(), passing %TRUE</span> +<a id="line-113" name="line-113"></a><span class="cm"> * or %FALSE to give its answer to the session manager. (It does not</span> +<a id="line-114" name="line-114"></a><span class="cm"> * need to give an answer before returning from the signal handler;</span> +<a id="line-115" name="line-115"></a><span class="cm"> * it can interact with the user asynchronously and then give its</span> +<a id="line-116" name="line-116"></a><span class="cm"> * answer later on.) If the application does not connect to this</span> +<a id="line-117" name="line-117"></a><span class="cm"> * signal, then #EggSMClient will automatically return %TRUE on its</span> +<a id="line-118" name="line-118"></a><span class="cm"> * behalf.</span> +<a id="line-119" name="line-119"></a><span class="cm"> *</span> +<a id="line-120" name="line-120"></a><span class="cm"> * The application should not save its session state as part of</span> +<a id="line-121" name="line-121"></a><span class="cm"> * handling this signal; if the user has requested that the session</span> +<a id="line-122" name="line-122"></a><span class="cm"> * be saved when logging out, then ::save_state will be emitted</span> +<a id="line-123" name="line-123"></a><span class="cm"> * separately.</span> +<a id="line-124" name="line-124"></a><span class="cm"> *</span> +<a id="line-125" name="line-125"></a><span class="cm"> * If the application agrees to quit, it should then wait for either</span> +<a id="line-126" name="line-126"></a><span class="cm"> * the ::quit_cancelled or ::quit signals to be emitted.</span> +<a id="line-127" name="line-127"></a><span class="cm"> **/</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">QUIT_REQUESTED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"quit_requested"</span><span class="p">,</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">),</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientClass</span><span class="p">,</span><span class="w"> </span><span class="n">quit_requested</span><span class="p">),</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-137" name="line-137"></a> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-139" name="line-139"></a><span class="cm"> * EggSMClient::quit_cancelled:</span> +<a id="line-140" name="line-140"></a><span class="cm"> * @client: the client</span> +<a id="line-141" name="line-141"></a><span class="cm"> *</span> +<a id="line-142" name="line-142"></a><span class="cm"> * Emitted when the session manager decides to cancel a logout after</span> +<a id="line-143" name="line-143"></a><span class="cm"> * the application has already agreed to quit. After receiving this</span> +<a id="line-144" name="line-144"></a><span class="cm"> * signal, the application can go back to what it was doing before</span> +<a id="line-145" name="line-145"></a><span class="cm"> * receiving the ::quit_requested signal.</span> +<a id="line-146" name="line-146"></a><span class="cm"> **/</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">QUIT_CANCELLED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"quit_cancelled"</span><span class="p">,</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">),</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientClass</span><span class="p">,</span><span class="w"> </span><span class="n">quit_cancelled</span><span class="p">),</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-158" name="line-158"></a><span class="cm"> * EggSMClient::quit:</span> +<a id="line-159" name="line-159"></a><span class="cm"> * @client: the client</span> +<a id="line-160" name="line-160"></a><span class="cm"> *</span> +<a id="line-161" name="line-161"></a><span class="cm"> * Emitted when the session manager wants the application to quit</span> +<a id="line-162" name="line-162"></a><span class="cm"> * (generally because the user is logging out). The application</span> +<a id="line-163" name="line-163"></a><span class="cm"> * should exit as soon as possible after receiving this signal; if</span> +<a id="line-164" name="line-164"></a><span class="cm"> * it does not, the session manager may choose to forcibly kill it.</span> +<a id="line-165" name="line-165"></a><span class="cm"> *</span> +<a id="line-166" name="line-166"></a><span class="cm"> * Normally a GUI application would only be sent a ::quit if it</span> +<a id="line-167" name="line-167"></a><span class="cm"> * agreed to quit in response to a ::quit_requested signal. However,</span> +<a id="line-168" name="line-168"></a><span class="cm"> * this is not guaranteed; in some situations the session manager</span> +<a id="line-169" name="line-169"></a><span class="cm"> * may decide to end the session without giving applications a</span> +<a id="line-170" name="line-170"></a><span class="cm"> * chance to object.</span> +<a id="line-171" name="line-171"></a><span class="cm"> **/</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">QUIT</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"quit"</span><span class="p">,</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">),</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientClass</span><span class="p">,</span><span class="w"> </span><span class="n">quit</span><span class="p">),</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-181" name="line-181"></a><span class="p">}</span> +<a id="line-182" name="line-182"></a> +<a id="line-183" name="line-183"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">sm_client_disable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-184" name="line-184"></a><span class="k">static</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">sm_client_state_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-185" name="line-185"></a><span class="k">static</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">sm_client_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-186" name="line-186"></a><span class="k">static</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">sm_config_prefix</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-187" name="line-187"></a> +<a id="line-188" name="line-188"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-189" name="line-189"></a><span class="nf">sm_client_post_parse_func</span><span class="w"> </span><span class="p">(</span><span class="n">GOptionContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">GOptionGroup</span><span class="w"> </span><span class="o">*</span><span class="n">group</span><span class="p">,</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">,</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-193" name="line-193"></a><span class="p">{</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_sm_client_get</span><span class="w"> </span><span class="p">();</span> +<a id="line-195" name="line-195"></a> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sm_client_id</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="p">{</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">desktop_autostart_id</span><span class="p">;</span> +<a id="line-199" name="line-199"></a> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">desktop_autostart_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_getenv</span><span class="w"> </span><span class="p">(</span><span class="s">"DESKTOP_AUTOSTART_ID"</span><span class="p">);</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_autostart_id</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">sm_client_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">desktop_autostart_id</span><span class="p">);</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="p">}</span> +<a id="line-205" name="line-205"></a> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="cm">/* Unset DESKTOP_AUTOSTART_ID in order to avoid child processes to</span> +<a id="line-207" name="line-207"></a><span class="cm"> * use the same client id. */</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">g_unsetenv</span><span class="w"> </span><span class="p">(</span><span class="s">"DESKTOP_AUTOSTART_ID"</span><span class="p">);</span> +<a id="line-209" name="line-209"></a> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">global_client_mode</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">EGG_SM_CLIENT_MODE_DISABLED</span><span class="w"> </span><span class="o">&&</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="o">-></span><span class="n">startup</span><span class="p">)</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="o">-></span><span class="n">startup</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">sm_client_id</span><span class="p">);</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-214" name="line-214"></a><span class="p">}</span> +<a id="line-215" name="line-215"></a> +<a id="line-216" name="line-216"></a><span class="cm">/**</span> +<a id="line-217" name="line-217"></a><span class="cm"> * egg_sm_client_get_option_group:</span> +<a id="line-218" name="line-218"></a><span class="cm"> *</span> +<a id="line-219" name="line-219"></a><span class="cm"> * Creates a %GOptionGroup containing the session-management-related</span> +<a id="line-220" name="line-220"></a><span class="cm"> * options. You should add this group to the application's</span> +<a id="line-221" name="line-221"></a><span class="cm"> * %GOptionContext if you want to use #EggSMClient.</span> +<a id="line-222" name="line-222"></a><span class="cm"> *</span> +<a id="line-223" name="line-223"></a><span class="cm"> * Return value: the %GOptionGroup</span> +<a id="line-224" name="line-224"></a><span class="cm"> **/</span> +<a id="line-225" name="line-225"></a><span class="n">GOptionGroup</span><span class="w"> </span><span class="o">*</span> +<a id="line-226" name="line-226"></a><span class="nf">egg_sm_client_get_option_group</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-227" name="line-227"></a><span class="p">{</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GOptionEntry</span><span class="w"> </span><span class="n">entries</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="p">{</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="p">{</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="s">"sm-client-disable"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">sm_client_disable</span><span class="p">,</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Disable connection to session manager"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="p">},</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="p">{</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="s">"sm-client-state-file"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">G_OPTION_ARG_FILENAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">sm_client_state_file</span><span class="p">,</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Specify file containing saved configuration"</span><span class="p">),</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"FILE"</span><span class="p">)</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="p">},</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="p">{</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="s">"sm-client-id"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">sm_client_id</span><span class="p">,</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Specify session management ID"</span><span class="p">),</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"ID"</span><span class="p">)</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="p">},</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="cm">/* MateClient compatibility option */</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="p">{</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="s">"sm-disable"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_FLAG_HIDDEN</span><span class="p">,</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">sm_client_disable</span><span class="p">,</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="p">},</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="cm">/* MateClient compatibility option. This is a dummy option that only</span> +<a id="line-252" name="line-252"></a><span class="cm"> * exists so that sessions saved by apps with MateClient can be restored</span> +<a id="line-253" name="line-253"></a><span class="cm"> * later when they've switched to EggSMClient. See bug #575308.</span> +<a id="line-254" name="line-254"></a><span class="cm"> */</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="p">{</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="s">"sm-config-prefix"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_FLAG_HIDDEN</span><span class="p">,</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">sm_config_prefix</span><span class="p">,</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="p">},</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">}</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="p">};</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">GOptionGroup</span><span class="w"> </span><span class="o">*</span><span class="n">group</span><span class="p">;</span> +<a id="line-263" name="line-263"></a> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="cm">/* Use our own debug handler for the "EggSMClient" domain. */</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">g_log_set_handler</span><span class="w"> </span><span class="p">(</span><span class="n">G_LOG_DOMAIN</span><span class="p">,</span><span class="w"> </span><span class="n">G_LOG_LEVEL_DEBUG</span><span class="p">,</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">egg_sm_client_debug_handler</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-267" name="line-267"></a> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_option_group_new</span><span class="w"> </span><span class="p">(</span><span class="s">"sm-client"</span><span class="p">,</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Session management options:"</span><span class="p">),</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Show session management options"</span><span class="p">),</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">g_option_group_add_entries</span><span class="w"> </span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="w"> </span><span class="n">entries</span><span class="p">);</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">g_option_group_set_parse_hooks</span><span class="w"> </span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">sm_client_post_parse_func</span><span class="p">);</span> +<a id="line-274" name="line-274"></a> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">group</span><span class="p">;</span> +<a id="line-276" name="line-276"></a><span class="p">}</span> +<a id="line-277" name="line-277"></a> +<a id="line-278" name="line-278"></a><span class="cm">/**</span> +<a id="line-279" name="line-279"></a><span class="cm"> * egg_sm_client_set_mode:</span> +<a id="line-280" name="line-280"></a><span class="cm"> * @mode: an #EggSMClient mode</span> +<a id="line-281" name="line-281"></a><span class="cm"> *</span> +<a id="line-282" name="line-282"></a><span class="cm"> * Sets the "mode" of #EggSMClient as follows:</span> +<a id="line-283" name="line-283"></a><span class="cm"> *</span> +<a id="line-284" name="line-284"></a><span class="cm"> * %EGG_SM_CLIENT_MODE_DISABLED: Session management is completely</span> +<a id="line-285" name="line-285"></a><span class="cm"> * disabled, until the mode is changed again. The application will</span> +<a id="line-286" name="line-286"></a><span class="cm"> * not even connect to the session manager. (egg_sm_client_get()</span> +<a id="line-287" name="line-287"></a><span class="cm"> * will still return an #EggSMClient object.)</span> +<a id="line-288" name="line-288"></a><span class="cm"> *</span> +<a id="line-289" name="line-289"></a><span class="cm"> * %EGG_SM_CLIENT_MODE_NO_RESTART: The application will connect to</span> +<a id="line-290" name="line-290"></a><span class="cm"> * the session manager (and thus will receive notification when the</span> +<a id="line-291" name="line-291"></a><span class="cm"> * user is logging out, etc), but will request to not be</span> +<a id="line-292" name="line-292"></a><span class="cm"> * automatically restarted with saved state in future sessions.</span> +<a id="line-293" name="line-293"></a><span class="cm"> *</span> +<a id="line-294" name="line-294"></a><span class="cm"> * %EGG_SM_CLIENT_MODE_NORMAL: The default. #EggSMCLient will</span> +<a id="line-295" name="line-295"></a><span class="cm"> * function normally.</span> +<a id="line-296" name="line-296"></a><span class="cm"> *</span> +<a id="line-297" name="line-297"></a><span class="cm"> * This must be called before the application's main loop begins and</span> +<a id="line-298" name="line-298"></a><span class="cm"> * before any call to egg_sm_client_get(), unless the mode was set</span> +<a id="line-299" name="line-299"></a><span class="cm"> * earlier to %EGG_SM_CLIENT_MODE_DISABLED and this call enables</span> +<a id="line-300" name="line-300"></a><span class="cm"> * session management. Note that option parsing will call</span> +<a id="line-301" name="line-301"></a><span class="cm"> * egg_sm_client_get().</span> +<a id="line-302" name="line-302"></a><span class="cm"> **/</span> +<a id="line-303" name="line-303"></a><span class="kt">void</span> +<a id="line-304" name="line-304"></a><span class="nf">egg_sm_client_set_mode</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientMode</span><span class="w"> </span><span class="n">mode</span><span class="p">)</span> +<a id="line-305" name="line-305"></a><span class="p">{</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">EggSMClientMode</span><span class="w"> </span><span class="n">old_mode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">global_client_mode</span><span class="p">;</span> +<a id="line-307" name="line-307"></a> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">global_client</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">global_client_mode</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">EGG_SM_CLIENT_MODE_DISABLED</span><span class="p">);</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="n">global_client</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">mode</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">EGG_SM_CLIENT_MODE_DISABLED</span><span class="p">));</span> +<a id="line-310" name="line-310"></a> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">global_client_mode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mode</span><span class="p">;</span> +<a id="line-312" name="line-312"></a> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">global_client</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">old_mode</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">EGG_SM_CLIENT_MODE_DISABLED</span><span class="p">)</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="p">{</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">global_client</span><span class="p">)</span><span class="o">-></span><span class="n">startup</span><span class="p">)</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">global_client</span><span class="p">)</span><span class="o">-></span><span class="n">startup</span><span class="w"> </span><span class="p">(</span><span class="n">global_client</span><span class="p">,</span><span class="w"> </span><span class="n">sm_client_id</span><span class="p">);</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="p">}</span> +<a id="line-318" name="line-318"></a><span class="p">}</span> +<a id="line-319" name="line-319"></a> +<a id="line-320" name="line-320"></a><span class="cm">/**</span> +<a id="line-321" name="line-321"></a><span class="cm"> * egg_sm_client_get_mode:</span> +<a id="line-322" name="line-322"></a><span class="cm"> *</span> +<a id="line-323" name="line-323"></a><span class="cm"> * Gets the global #EggSMClientMode. See egg_sm_client_set_mode()</span> +<a id="line-324" name="line-324"></a><span class="cm"> * for details.</span> +<a id="line-325" name="line-325"></a><span class="cm"> *</span> +<a id="line-326" name="line-326"></a><span class="cm"> * Return value: the global #EggSMClientMode</span> +<a id="line-327" name="line-327"></a><span class="cm"> **/</span> +<a id="line-328" name="line-328"></a><span class="n">EggSMClientMode</span> +<a id="line-329" name="line-329"></a><span class="nf">egg_sm_client_get_mode</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-330" name="line-330"></a><span class="p">{</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">global_client_mode</span><span class="p">;</span> +<a id="line-332" name="line-332"></a><span class="p">}</span> +<a id="line-333" name="line-333"></a> +<a id="line-334" name="line-334"></a><span class="cm">/**</span> +<a id="line-335" name="line-335"></a><span class="cm"> * egg_sm_client_get:</span> +<a id="line-336" name="line-336"></a><span class="cm"> *</span> +<a id="line-337" name="line-337"></a><span class="cm"> * Returns the master #EggSMClient for the application.</span> +<a id="line-338" name="line-338"></a><span class="cm"> *</span> +<a id="line-339" name="line-339"></a><span class="cm"> * On platforms that support saved sessions (ie, POSIX/X11), the</span> +<a id="line-340" name="line-340"></a><span class="cm"> * application will only request to be restarted by the session</span> +<a id="line-341" name="line-341"></a><span class="cm"> * manager if you call egg_set_desktop_file() to set an application</span> +<a id="line-342" name="line-342"></a><span class="cm"> * desktop file. In particular, if the desktop file contains the key</span> +<a id="line-343" name="line-343"></a><span class="cm"> * "X</span> +<a id="line-344" name="line-344"></a><span class="cm"> *</span> +<a id="line-345" name="line-345"></a><span class="cm"> * Return value: the master #EggSMClient.</span> +<a id="line-346" name="line-346"></a><span class="cm"> **/</span> +<a id="line-347" name="line-347"></a><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span> +<a id="line-348" name="line-348"></a><span class="nf">egg_sm_client_get</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-349" name="line-349"></a><span class="p">{</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">global_client</span><span class="p">)</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="p">{</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">sm_client_disable</span><span class="p">)</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="p">{</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="cm">/* If both D-Bus and XSMP are compiled in, try XSMP first</span> +<a id="line-355" name="line-355"></a><span class="cm"> * (since it supports state saving) and fall back to D-Bus</span> +<a id="line-356" name="line-356"></a><span class="cm"> * if XSMP isn't available.</span> +<a id="line-357" name="line-357"></a><span class="cm"> */</span> +<a id="line-358" name="line-358"></a><span class="cp">#ifdef EGG_SM_CLIENT_BACKEND_XSMP</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="n">global_client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_sm_client_xsmp_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-360" name="line-360"></a><span class="cp">#endif</span> +<a id="line-361" name="line-361"></a><span class="cp">#ifdef EGG_SM_CLIENT_BACKEND_DBUS</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">global_client</span><span class="p">)</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">global_client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_sm_client_dbus_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-364" name="line-364"></a><span class="cp">#endif</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="p">}</span> +<a id="line-366" name="line-366"></a> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="cm">/* Fallback: create a dummy client, so that callers don't have</span> +<a id="line-368" name="line-368"></a><span class="cm"> * to worry about a %NULL return value.</span> +<a id="line-369" name="line-369"></a><span class="cm"> */</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">global_client</span><span class="p">)</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">global_client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_TYPE_SM_CLIENT</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="cm">/*FIXME</span> +<a id="line-373" name="line-373"></a><span class="cm"> Disabling when root/not in MATE in GtkApplication builds</span> +<a id="line-374" name="line-374"></a><span class="cm"> as egg_sm_client_set_mode must be called prior to start of main loop</span> +<a id="line-375" name="line-375"></a><span class="cm"> to stop caja restart but this is diffcult in GtkApplication */</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">geteuid</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="o">!</span><span class="n">running_in_mate</span><span class="w"> </span><span class="p">()){</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">global_client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_TYPE_SM_CLIENT</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="p">}</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="p">}</span> +<a id="line-381" name="line-381"></a> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">global_client</span><span class="p">;</span> +<a id="line-383" name="line-383"></a><span class="p">}</span> +<a id="line-384" name="line-384"></a> +<a id="line-385" name="line-385"></a><span class="cm">/**</span> +<a id="line-386" name="line-386"></a><span class="cm"> * egg_sm_client_is_resumed:</span> +<a id="line-387" name="line-387"></a><span class="cm"> * @client: the client</span> +<a id="line-388" name="line-388"></a><span class="cm"> *</span> +<a id="line-389" name="line-389"></a><span class="cm"> * Checks whether or not the current session has been resumed from</span> +<a id="line-390" name="line-390"></a><span class="cm"> * a previous saved session. If so, the application should call</span> +<a id="line-391" name="line-391"></a><span class="cm"> * egg_sm_client_get_state_file() and restore its state from the</span> +<a id="line-392" name="line-392"></a><span class="cm"> * returned #GKeyFile.</span> +<a id="line-393" name="line-393"></a><span class="cm"> *</span> +<a id="line-394" name="line-394"></a><span class="cm"> * Return value: %TRUE if the session has been resumed</span> +<a id="line-395" name="line-395"></a><span class="cm"> **/</span> +<a id="line-396" name="line-396"></a><span class="n">gboolean</span> +<a id="line-397" name="line-397"></a><span class="nf">egg_sm_client_is_resumed</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">)</span> +<a id="line-398" name="line-398"></a><span class="p">{</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">global_client</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-400" name="line-400"></a> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">sm_client_state_file</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-402" name="line-402"></a><span class="p">}</span> +<a id="line-403" name="line-403"></a> +<a id="line-404" name="line-404"></a><span class="cm">/**</span> +<a id="line-405" name="line-405"></a><span class="cm"> * egg_sm_client_get_state_file:</span> +<a id="line-406" name="line-406"></a><span class="cm"> * @client: the client</span> +<a id="line-407" name="line-407"></a><span class="cm"> *</span> +<a id="line-408" name="line-408"></a><span class="cm"> * If the application was resumed by the session manager, this will</span> +<a id="line-409" name="line-409"></a><span class="cm"> * return the #GKeyFile containing its state from the previous</span> +<a id="line-410" name="line-410"></a><span class="cm"> * session.</span> +<a id="line-411" name="line-411"></a><span class="cm"> *</span> +<a id="line-412" name="line-412"></a><span class="cm"> * Note that other libraries and #EggSMClient itself may also store</span> +<a id="line-413" name="line-413"></a><span class="cm"> * state in the key file, so if you call egg_sm_client_get_groups(),</span> +<a id="line-414" name="line-414"></a><span class="cm"> * on it, the return value will likely include groups that you did not</span> +<a id="line-415" name="line-415"></a><span class="cm"> * put there yourself. (It is also not guaranteed that the first</span> +<a id="line-416" name="line-416"></a><span class="cm"> * group created by the application will still be the "start group"</span> +<a id="line-417" name="line-417"></a><span class="cm"> * when it is resumed.)</span> +<a id="line-418" name="line-418"></a><span class="cm"> *</span> +<a id="line-419" name="line-419"></a><span class="cm"> * Return value: the #GKeyFile containing the application's earlier</span> +<a id="line-420" name="line-420"></a><span class="cm"> * state, or %NULL on error. You should not free this key file; it</span> +<a id="line-421" name="line-421"></a><span class="cm"> * is owned by @client.</span> +<a id="line-422" name="line-422"></a><span class="cm"> **/</span> +<a id="line-423" name="line-423"></a><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span> +<a id="line-424" name="line-424"></a><span class="nf">egg_sm_client_get_state_file</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">)</span> +<a id="line-425" name="line-425"></a><span class="p">{</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">EggSMClientPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_sm_client_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">);</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">state_file_path</span><span class="p">;</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-429" name="line-429"></a> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">global_client</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-431" name="line-431"></a> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">sm_client_state_file</span><span class="p">)</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">state_file</span><span class="p">)</span> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">state_file</span><span class="p">;</span> +<a id="line-436" name="line-436"></a> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strncmp</span><span class="w"> </span><span class="p">(</span><span class="n">sm_client_state_file</span><span class="p">,</span><span class="w"> </span><span class="s">"file://"</span><span class="p">,</span><span class="w"> </span><span class="mi">7</span><span class="p">))</span> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="n">state_file_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_from_uri</span><span class="w"> </span><span class="p">(</span><span class="n">sm_client_state_file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="k">else</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">state_file_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">sm_client_state_file</span><span class="p">);</span> +<a id="line-441" name="line-441"></a> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">state_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_key_file_load_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">state_file</span><span class="p">,</span><span class="w"> </span><span class="n">state_file_path</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">))</span> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="p">{</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Could not load SM state file '%s': %s"</span><span class="p">,</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="n">sm_client_state_file</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">state_file</span><span class="p">);</span> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">state_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="p">}</span> +<a id="line-451" name="line-451"></a> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file_path</span><span class="p">);</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">state_file</span><span class="p">;</span> +<a id="line-454" name="line-454"></a><span class="p">}</span> +<a id="line-455" name="line-455"></a> +<a id="line-456" name="line-456"></a><span class="cm">/**</span> +<a id="line-457" name="line-457"></a><span class="cm"> * egg_sm_client_set_restart_command:</span> +<a id="line-458" name="line-458"></a><span class="cm"> * @client: the client</span> +<a id="line-459" name="line-459"></a><span class="cm"> * @argc: the length of @argv</span> +<a id="line-460" name="line-460"></a><span class="cm"> * @argv: argument vector</span> +<a id="line-461" name="line-461"></a><span class="cm"> *</span> +<a id="line-462" name="line-462"></a><span class="cm"> * Sets the command used to restart @client if it does not have a</span> +<a id="line-463" name="line-463"></a><span class="cm"> * .desktop file that can be used to find its restart command.</span> +<a id="line-464" name="line-464"></a><span class="cm"> *</span> +<a id="line-465" name="line-465"></a><span class="cm"> * This can also be used when handling the ::save_state signal, to</span> +<a id="line-466" name="line-466"></a><span class="cm"> * save the current state via an updated command line. (Eg, providing</span> +<a id="line-467" name="line-467"></a><span class="cm"> * a list of filenames to open when the application is resumed.)</span> +<a id="line-468" name="line-468"></a><span class="cm"> **/</span> +<a id="line-469" name="line-469"></a><span class="kt">void</span> +<a id="line-470" name="line-470"></a><span class="nf">egg_sm_client_set_restart_command</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">)</span> +<a id="line-473" name="line-473"></a><span class="p">{</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_IS_SM_CLIENT</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">));</span> +<a id="line-475" name="line-475"></a> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="o">-></span><span class="n">set_restart_command</span><span class="p">)</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="o">-></span><span class="n">set_restart_command</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="n">argv</span><span class="p">);</span> +<a id="line-478" name="line-478"></a><span class="p">}</span> +<a id="line-479" name="line-479"></a> +<a id="line-480" name="line-480"></a><span class="cm">/**</span> +<a id="line-481" name="line-481"></a><span class="cm"> * egg_sm_client_set_discard_command:</span> +<a id="line-482" name="line-482"></a><span class="cm"> * @client: the client</span> +<a id="line-483" name="line-483"></a><span class="cm"> * @argc: the length of @argv</span> +<a id="line-484" name="line-484"></a><span class="cm"> * @argv: argument vector</span> +<a id="line-485" name="line-485"></a><span class="cm"> *</span> +<a id="line-486" name="line-486"></a><span class="cm"> * Sets the command used to discard a custom state file if using</span> +<a id="line-487" name="line-487"></a><span class="cm"> * egg_sm_client_set_restart_command(), which must be called before</span> +<a id="line-488" name="line-488"></a><span class="cm"> * using this function.</span> +<a id="line-489" name="line-489"></a><span class="cm"> **/</span> +<a id="line-490" name="line-490"></a><span class="kt">void</span> +<a id="line-491" name="line-491"></a><span class="nf">egg_sm_client_set_discard_command</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">)</span> +<a id="line-494" name="line-494"></a><span class="p">{</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_IS_SM_CLIENT</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">));</span> +<a id="line-496" name="line-496"></a> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="o">-></span><span class="n">set_discard_command</span><span class="p">)</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="o">-></span><span class="n">set_discard_command</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="n">argv</span><span class="p">);</span> +<a id="line-499" name="line-499"></a><span class="p">}</span> +<a id="line-500" name="line-500"></a> +<a id="line-501" name="line-501"></a><span class="cm">/**</span> +<a id="line-502" name="line-502"></a><span class="cm"> * egg_sm_client_will_quit:</span> +<a id="line-503" name="line-503"></a><span class="cm"> * @client: the client</span> +<a id="line-504" name="line-504"></a><span class="cm"> * @will_quit: whether or not the application is willing to quit</span> +<a id="line-505" name="line-505"></a><span class="cm"> *</span> +<a id="line-506" name="line-506"></a><span class="cm"> * This MUST be called in response to the ::quit_requested signal, to</span> +<a id="line-507" name="line-507"></a><span class="cm"> * indicate whether or not the application is willing to quit. The</span> +<a id="line-508" name="line-508"></a><span class="cm"> * application may call it either directly from the signal handler, or</span> +<a id="line-509" name="line-509"></a><span class="cm"> * at some later point (eg, after asynchronously interacting with the</span> +<a id="line-510" name="line-510"></a><span class="cm"> * user).</span> +<a id="line-511" name="line-511"></a><span class="cm"> *</span> +<a id="line-512" name="line-512"></a><span class="cm"> * If the application does not connect to ::quit_requested,</span> +<a id="line-513" name="line-513"></a><span class="cm"> * #EggSMClient will call this method on its behalf (passing %TRUE</span> +<a id="line-514" name="line-514"></a><span class="cm"> * for @will_quit).</span> +<a id="line-515" name="line-515"></a><span class="cm"> *</span> +<a id="line-516" name="line-516"></a><span class="cm"> * After calling this method, the application should wait to receive</span> +<a id="line-517" name="line-517"></a><span class="cm"> * either ::quit_cancelled or ::quit.</span> +<a id="line-518" name="line-518"></a><span class="cm"> **/</span> +<a id="line-519" name="line-519"></a><span class="kt">void</span> +<a id="line-520" name="line-520"></a><span class="nf">egg_sm_client_will_quit</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">,</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">will_quit</span><span class="p">)</span> +<a id="line-522" name="line-522"></a><span class="p">{</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_IS_SM_CLIENT</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">));</span> +<a id="line-524" name="line-524"></a> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="o">-></span><span class="n">will_quit</span><span class="p">)</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="o">-></span><span class="n">will_quit</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">will_quit</span><span class="p">);</span> +<a id="line-527" name="line-527"></a><span class="p">}</span> +<a id="line-528" name="line-528"></a> +<a id="line-529" name="line-529"></a><span class="cm">/**</span> +<a id="line-530" name="line-530"></a><span class="cm"> * egg_sm_client_end_session:</span> +<a id="line-531" name="line-531"></a><span class="cm"> * @style: a hint at how to end the session</span> +<a id="line-532" name="line-532"></a><span class="cm"> * @request_confirmation: whether or not the user should get a chance</span> +<a id="line-533" name="line-533"></a><span class="cm"> * to confirm the action</span> +<a id="line-534" name="line-534"></a><span class="cm"> *</span> +<a id="line-535" name="line-535"></a><span class="cm"> * Requests that the session manager end the current session. @style</span> +<a id="line-536" name="line-536"></a><span class="cm"> * indicates how the session should be ended, and</span> +<a id="line-537" name="line-537"></a><span class="cm"> * @request_confirmation indicates whether or not the user should be</span> +<a id="line-538" name="line-538"></a><span class="cm"> * given a chance to confirm the logout/reboot/shutdown. Both of these</span> +<a id="line-539" name="line-539"></a><span class="cm"> * flags are merely hints though; the session manager may choose to</span> +<a id="line-540" name="line-540"></a><span class="cm"> * ignore them.</span> +<a id="line-541" name="line-541"></a><span class="cm"> *</span> +<a id="line-542" name="line-542"></a><span class="cm"> * Return value: %TRUE if the request was sent; %FALSE if it could not</span> +<a id="line-543" name="line-543"></a><span class="cm"> * be (eg, because it could not connect to the session manager).</span> +<a id="line-544" name="line-544"></a><span class="cm"> **/</span> +<a id="line-545" name="line-545"></a><span class="n">gboolean</span> +<a id="line-546" name="line-546"></a><span class="nf">egg_sm_client_end_session</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClientEndStyle</span><span class="w"> </span><span class="n">style</span><span class="p">,</span> +<a id="line-547" name="line-547"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">request_confirmation</span><span class="p">)</span> +<a id="line-548" name="line-548"></a><span class="p">{</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_sm_client_get</span><span class="w"> </span><span class="p">();</span> +<a id="line-550" name="line-550"></a> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_IS_SM_CLIENT</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-552" name="line-552"></a> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="o">-></span><span class="n">end_session</span><span class="p">)</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="p">{</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">EGG_SM_CLIENT_GET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="o">-></span><span class="n">end_session</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">style</span><span class="p">,</span> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="n">request_confirmation</span><span class="p">);</span> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="p">}</span> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="k">else</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-560" name="line-560"></a><span class="p">}</span> +<a id="line-561" name="line-561"></a> +<a id="line-562" name="line-562"></a><span class="cm">/* Signal-emitting callbacks from platform-specific code */</span> +<a id="line-563" name="line-563"></a> +<a id="line-564" name="line-564"></a><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span> +<a id="line-565" name="line-565"></a><span class="nf">egg_sm_client_save_state</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">)</span> +<a id="line-566" name="line-566"></a><span class="p">{</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">state_file</span><span class="p">;</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">group</span><span class="p">;</span> +<a id="line-569" name="line-569"></a> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">global_client</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-571" name="line-571"></a> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="n">state_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-573" name="line-573"></a> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Emitting save_state"</span><span class="p">);</span> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">SAVE_STATE</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">state_file</span><span class="p">);</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Done emitting save_state"</span><span class="p">);</span> +<a id="line-577" name="line-577"></a> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="n">group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_start_group</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">);</span> +<a id="line-579" name="line-579"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">group</span><span class="p">)</span> +<a id="line-580" name="line-580"></a><span class="w"> </span><span class="p">{</span> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">group</span><span class="p">);</span> +<a id="line-582" name="line-582"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">state_file</span><span class="p">;</span> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="p">}</span> +<a id="line-584" name="line-584"></a><span class="w"> </span><span class="k">else</span> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="p">{</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">);</span> +<a id="line-587" name="line-587"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="p">}</span> +<a id="line-589" name="line-589"></a><span class="p">}</span> +<a id="line-590" name="line-590"></a> +<a id="line-591" name="line-591"></a><span class="kt">void</span> +<a id="line-592" name="line-592"></a><span class="nf">egg_sm_client_quit_requested</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">)</span> +<a id="line-593" name="line-593"></a><span class="p">{</span> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">global_client</span><span class="p">);</span> +<a id="line-595" name="line-595"></a> +<a id="line-596" name="line-596"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_signal_has_handler_pending</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">QUIT_REQUESTED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">))</span> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="p">{</span> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Not emitting quit_requested because no one is listening"</span><span class="p">);</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="n">egg_sm_client_will_quit</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="p">}</span> +<a id="line-602" name="line-602"></a> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Emitting quit_requested"</span><span class="p">);</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">QUIT_REQUESTED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Done emitting quit_requested"</span><span class="p">);</span> +<a id="line-606" name="line-606"></a><span class="p">}</span> +<a id="line-607" name="line-607"></a> +<a id="line-608" name="line-608"></a><span class="kt">void</span> +<a id="line-609" name="line-609"></a><span class="nf">egg_sm_client_quit_cancelled</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">)</span> +<a id="line-610" name="line-610"></a><span class="p">{</span> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">global_client</span><span class="p">);</span> +<a id="line-612" name="line-612"></a> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Emitting quit_cancelled"</span><span class="p">);</span> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">QUIT_CANCELLED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Done emitting quit_cancelled"</span><span class="p">);</span> +<a id="line-616" name="line-616"></a><span class="p">}</span> +<a id="line-617" name="line-617"></a> +<a id="line-618" name="line-618"></a><span class="kt">void</span> +<a id="line-619" name="line-619"></a><span class="nf">egg_sm_client_quit</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">)</span> +<a id="line-620" name="line-620"></a><span class="p">{</span> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">global_client</span><span class="p">);</span> +<a id="line-622" name="line-622"></a> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Emitting quit"</span><span class="p">);</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">QUIT</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="n">g_debug</span><span class="w"> </span><span class="p">(</span><span class="s">"Done emitting quit"</span><span class="p">);</span> +<a id="line-626" name="line-626"></a> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="cm">/* FIXME: should we just call gtk_main_quit() here? */</span> +<a id="line-628" name="line-628"></a><span class="p">}</span> +<a id="line-629" name="line-629"></a> +<a id="line-630" name="line-630"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-631" name="line-631"></a><span class="nf">egg_sm_client_debug_handler</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">log_domain</span><span class="p">,</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="n">GLogLevelFlags</span><span class="w"> </span><span class="n">log_level</span><span class="p">,</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">,</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-635" name="line-635"></a><span class="p">{</span> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">debug</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-637" name="line-637"></a> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">debug</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="n">debug</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">g_getenv</span><span class="w"> </span><span class="p">(</span><span class="s">"EGG_SM_CLIENT_DEBUG"</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-640" name="line-640"></a> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">debug</span><span class="p">)</span> +<a id="line-642" name="line-642"></a><span class="w"> </span><span class="n">g_log_default_handler</span><span class="w"> </span><span class="p">(</span><span class="n">log_domain</span><span class="p">,</span><span class="w"> </span><span class="n">log_level</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-643" name="line-643"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/13.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/13.html new file mode 100644 index 00000000..6d2ab7bd --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/13.html @@ -0,0 +1,1071 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: gsearchtool/mate-submodules/libegg/eggtreemultidnd.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> eggtreemultidnd.c</p> +<a href="13.html#line-46"> unusedStructMember 46</a><a href="13.html#line-49"> unusedStructMember 49</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* eggtreemultidnd.c</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2001 Red Hat, Inc.</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span> +<a id="line-5" name="line-5"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span> +<a id="line-6" name="line-6"></a><span class="cm"> * License as published by the Free Software Foundation; either</span> +<a id="line-7" name="line-7"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span> +<a id="line-8" name="line-8"></a><span class="cm"> *</span> +<a id="line-9" name="line-9"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span> +<a id="line-10" name="line-10"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> +<a id="line-12" name="line-12"></a><span class="cm"> * Library General Public License for more details.</span> +<a id="line-13" name="line-13"></a><span class="cm"> *</span> +<a id="line-14" name="line-14"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span> +<a id="line-15" name="line-15"></a><span class="cm"> * License along with this library; if not, write to the</span> +<a id="line-16" name="line-16"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,</span> +<a id="line-17" name="line-17"></a><span class="cm"> * Boston, MA 02110-1301, USA.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-22" name="line-22"></a><span class="cp">#endif</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"eggtreemultidnd.h"</span> +<a id="line-27" name="line-27"></a> +<a id="line-28" name="line-28"></a><span class="cp">#define EGG_TREE_MULTI_DND_STRING "EggTreeMultiDndString"</span> +<a id="line-29" name="line-29"></a> +<a id="line-30" name="line-30"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span> +<a id="line-31" name="line-31"></a><span class="p">{</span> +<a id="line-32" name="line-32"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">pressed_button</span><span class="p">;</span> +<a id="line-33" name="line-33"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">x</span><span class="p">;</span> +<a id="line-34" name="line-34"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">y</span><span class="p">;</span> +<a id="line-35" name="line-35"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">motion_notify_handler</span><span class="p">;</span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">button_release_handler</span><span class="p">;</span> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">drag_data_get_handler</span><span class="p">;</span> +<a id="line-38" name="line-38"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">event_list</span><span class="p">;</span> +<a id="line-39" name="line-39"></a><span class="p">}</span><span class="w"> </span><span class="n">EggTreeMultiDndData</span><span class="p">;</span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="cm">/* CUT-N-PASTE from gtktreeview.c */</span> +<a id="line-42" name="line-42"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">_TreeViewDragInfo</span><span class="w"> </span><span class="n">TreeViewDragInfo</span><span class="p">;</span> +<a id="line-43" name="line-43"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_TreeViewDragInfo</span> +<a id="line-44" name="line-44"></a><span class="p">{</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="n">GdkModifierType</span><span class="w"> </span><span class="n">start_button_mask</span><span class="p">;</span> +<a id="line-46" name="line-46"></a><span class="hll"><span class="w"> </span><span class="n">GtkTargetList</span><span class="w"> </span><span class="o">*</span><span class="n">source_target_list</span><span class="p">;</span><span class="error2"><--- struct member '_TreeViewDragInfo::source_target_list' is never used.</span> +</span><a id="line-47" name="line-47"></a><span class="w"> </span><span class="n">GdkDragAction</span><span class="w"> </span><span class="n">source_actions</span><span class="p">;</span> +<a id="line-48" name="line-48"></a> +<a id="line-49" name="line-49"></a><span class="hll"><span class="w"> </span><span class="n">GtkTargetList</span><span class="w"> </span><span class="o">*</span><span class="n">dest_target_list</span><span class="p">;</span><span class="error2"><--- struct member '_TreeViewDragInfo::dest_target_list' is never used.</span> +</span><a id="line-50" name="line-50"></a> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">source_set</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">dest_set</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-53" name="line-53"></a><span class="p">};</span> +<a id="line-54" name="line-54"></a> +<a id="line-55" name="line-55"></a> +<a id="line-56" name="line-56"></a><span class="n">GType</span> +<a id="line-57" name="line-57"></a><span class="nf">egg_tree_multi_drag_source_get_type</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-58" name="line-58"></a><span class="p">{</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GType</span><span class="w"> </span><span class="n">our_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-60" name="line-60"></a> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">our_type</span><span class="p">)</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="p">{</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GTypeInfo</span><span class="w"> </span><span class="n">our_info</span><span class="w"> </span><span class="o">=</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="p">{</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">EggTreeMultiDragSourceIface</span><span class="p">),</span><span class="w"> </span><span class="cm">/* class_size */</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="cm">/* base_init */</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="cm">/* base_finalize */</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="cm">/* class_finalize */</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="cm">/* class_data */</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="cm">/* n_preallocs */</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="nb">NULL</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="p">};</span> +<a id="line-75" name="line-75"></a> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">our_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_type_register_static</span><span class="w"> </span><span class="p">(</span><span class="n">G_TYPE_INTERFACE</span><span class="p">,</span><span class="w"> </span><span class="s">"EggTreeMultiDragSource"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">our_info</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="p">}</span> +<a id="line-78" name="line-78"></a> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">our_type</span><span class="p">;</span> +<a id="line-80" name="line-80"></a><span class="p">}</span> +<a id="line-81" name="line-81"></a> +<a id="line-82" name="line-82"></a> +<a id="line-83" name="line-83"></a><span class="cm">/**</span> +<a id="line-84" name="line-84"></a><span class="cm"> * egg_tree_multi_drag_source_row_draggable:</span> +<a id="line-85" name="line-85"></a><span class="cm"> * @drag_source: a #EggTreeMultiDragSource</span> +<a id="line-86" name="line-86"></a><span class="cm"> * @path: row on which user is initiating a drag</span> +<a id="line-87" name="line-87"></a><span class="cm"> *</span> +<a id="line-88" name="line-88"></a><span class="cm"> * Asks the #EggTreeMultiDragSource whether a particular row can be used as</span> +<a id="line-89" name="line-89"></a><span class="cm"> * the source of a DND operation. If the source doesn't implement</span> +<a id="line-90" name="line-90"></a><span class="cm"> * this interface, the row is assumed draggable.</span> +<a id="line-91" name="line-91"></a><span class="cm"> *</span> +<a id="line-92" name="line-92"></a><span class="cm"> * Return value: %TRUE if the row can be dragged</span> +<a id="line-93" name="line-93"></a><span class="cm"> **/</span> +<a id="line-94" name="line-94"></a><span class="n">gboolean</span> +<a id="line-95" name="line-95"></a><span class="nf">egg_tree_multi_drag_source_row_draggable</span><span class="w"> </span><span class="p">(</span><span class="n">EggTreeMultiDragSource</span><span class="w"> </span><span class="o">*</span><span class="n">drag_source</span><span class="p">,</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">path_list</span><span class="p">)</span> +<a id="line-97" name="line-97"></a><span class="p">{</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">EggTreeMultiDragSourceIface</span><span class="w"> </span><span class="o">*</span><span class="n">iface</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EGG_TREE_MULTI_DRAG_SOURCE_GET_IFACE</span><span class="w"> </span><span class="p">(</span><span class="n">drag_source</span><span class="p">);</span> +<a id="line-99" name="line-99"></a> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_IS_TREE_MULTI_DRAG_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">drag_source</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">iface</span><span class="o">-></span><span class="n">row_draggable</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">path_list</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-103" name="line-103"></a> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">iface</span><span class="o">-></span><span class="n">row_draggable</span><span class="p">)</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="w"> </span><span class="n">iface</span><span class="o">-></span><span class="n">row_draggable</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">drag_source</span><span class="p">,</span><span class="w"> </span><span class="n">path_list</span><span class="p">);</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="k">else</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-108" name="line-108"></a><span class="p">}</span> +<a id="line-109" name="line-109"></a> +<a id="line-110" name="line-110"></a> +<a id="line-111" name="line-111"></a><span class="cm">/**</span> +<a id="line-112" name="line-112"></a><span class="cm"> * egg_tree_multi_drag_source_drag_data_delete:</span> +<a id="line-113" name="line-113"></a><span class="cm"> * @drag_source: a #EggTreeMultiDragSource</span> +<a id="line-114" name="line-114"></a><span class="cm"> * @path: row that was being dragged</span> +<a id="line-115" name="line-115"></a><span class="cm"> *</span> +<a id="line-116" name="line-116"></a><span class="cm"> * Asks the #EggTreeMultiDragSource to delete the row at @path, because</span> +<a id="line-117" name="line-117"></a><span class="cm"> * it was moved somewhere else via drag-and-drop. Returns %FALSE</span> +<a id="line-118" name="line-118"></a><span class="cm"> * if the deletion fails because @path no longer exists, or for</span> +<a id="line-119" name="line-119"></a><span class="cm"> * some model-specific reason. Should robustly handle a @path no</span> +<a id="line-120" name="line-120"></a><span class="cm"> * longer found in the model!</span> +<a id="line-121" name="line-121"></a><span class="cm"> *</span> +<a id="line-122" name="line-122"></a><span class="cm"> * Return value: %TRUE if the row was successfully deleted</span> +<a id="line-123" name="line-123"></a><span class="cm"> **/</span> +<a id="line-124" name="line-124"></a><span class="n">gboolean</span> +<a id="line-125" name="line-125"></a><span class="nf">egg_tree_multi_drag_source_drag_data_delete</span><span class="w"> </span><span class="p">(</span><span class="n">EggTreeMultiDragSource</span><span class="w"> </span><span class="o">*</span><span class="n">drag_source</span><span class="p">,</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">path_list</span><span class="p">)</span> +<a id="line-127" name="line-127"></a><span class="p">{</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">EggTreeMultiDragSourceIface</span><span class="w"> </span><span class="o">*</span><span class="n">iface</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EGG_TREE_MULTI_DRAG_SOURCE_GET_IFACE</span><span class="w"> </span><span class="p">(</span><span class="n">drag_source</span><span class="p">);</span> +<a id="line-129" name="line-129"></a> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_IS_TREE_MULTI_DRAG_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">drag_source</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">iface</span><span class="o">-></span><span class="n">drag_data_delete</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">path_list</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-133" name="line-133"></a> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="w"> </span><span class="n">iface</span><span class="o">-></span><span class="n">drag_data_delete</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">drag_source</span><span class="p">,</span><span class="w"> </span><span class="n">path_list</span><span class="p">);</span> +<a id="line-135" name="line-135"></a><span class="p">}</span> +<a id="line-136" name="line-136"></a> +<a id="line-137" name="line-137"></a><span class="cm">/**</span> +<a id="line-138" name="line-138"></a><span class="cm"> * egg_tree_multi_drag_source_drag_data_get:</span> +<a id="line-139" name="line-139"></a><span class="cm"> * @drag_source: a #EggTreeMultiDragSource</span> +<a id="line-140" name="line-140"></a><span class="cm"> * @path: row that was dragged</span> +<a id="line-141" name="line-141"></a><span class="cm"> * @selection_data: a #EggSelectionData to fill with data from the dragged row</span> +<a id="line-142" name="line-142"></a><span class="cm"> *</span> +<a id="line-143" name="line-143"></a><span class="cm"> * Asks the #EggTreeMultiDragSource to fill in @selection_data with a</span> +<a id="line-144" name="line-144"></a><span class="cm"> * representation of the row at @path. @selection_data->target gives</span> +<a id="line-145" name="line-145"></a><span class="cm"> * the required type of the data. Should robustly handle a @path no</span> +<a id="line-146" name="line-146"></a><span class="cm"> * longer found in the model!</span> +<a id="line-147" name="line-147"></a><span class="cm"> *</span> +<a id="line-148" name="line-148"></a><span class="cm"> * Return value: %TRUE if data of the required type was provided</span> +<a id="line-149" name="line-149"></a><span class="cm"> **/</span> +<a id="line-150" name="line-150"></a><span class="n">gboolean</span> +<a id="line-151" name="line-151"></a><span class="nf">egg_tree_multi_drag_source_drag_data_get</span><span class="w"> </span><span class="p">(</span><span class="n">EggTreeMultiDragSource</span><span class="w"> </span><span class="o">*</span><span class="n">drag_source</span><span class="p">,</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">path_list</span><span class="p">,</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">GtkSelectionData</span><span class="w"> </span><span class="o">*</span><span class="n">selection_data</span><span class="p">)</span> +<a id="line-154" name="line-154"></a><span class="p">{</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">EggTreeMultiDragSourceIface</span><span class="w"> </span><span class="o">*</span><span class="n">iface</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EGG_TREE_MULTI_DRAG_SOURCE_GET_IFACE</span><span class="w"> </span><span class="p">(</span><span class="n">drag_source</span><span class="p">);</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_IS_TREE_MULTI_DRAG_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">drag_source</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">iface</span><span class="o">-></span><span class="n">drag_data_get</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">path_list</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">selection_data</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-161" name="line-161"></a> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="w"> </span><span class="n">iface</span><span class="o">-></span><span class="n">drag_data_get</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">drag_source</span><span class="p">,</span><span class="w"> </span><span class="n">path_list</span><span class="p">,</span><span class="w"> </span><span class="n">selection_data</span><span class="p">);</span> +<a id="line-163" name="line-163"></a><span class="p">}</span> +<a id="line-164" name="line-164"></a> +<a id="line-165" name="line-165"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-166" name="line-166"></a><span class="nf">stop_drag_check</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">)</span> +<a id="line-167" name="line-167"></a><span class="p">{</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">EggTreeMultiDndData</span><span class="w"> </span><span class="o">*</span><span class="n">priv_data</span><span class="p">;</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-170" name="line-170"></a> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">priv_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_get_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span><span class="w"> </span><span class="n">EGG_TREE_MULTI_DND_STRING</span><span class="p">);</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">event_list</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">gdk_event_free</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-175" name="line-175"></a> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">g_slist_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv_data</span><span class="o">-></span><span class="n">event_list</span><span class="p">);</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">event_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">motion_notify_handler</span><span class="p">);</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">button_release_handler</span><span class="p">);</span> +<a id="line-180" name="line-180"></a><span class="p">}</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-183" name="line-183"></a><span class="nf">egg_tree_multi_drag_button_release_event</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-186" name="line-186"></a><span class="p">{</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">EggTreeMultiDndData</span><span class="w"> </span><span class="o">*</span><span class="n">priv_data</span><span class="p">;</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-189" name="line-189"></a> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">priv_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_get_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span><span class="w"> </span><span class="n">EGG_TREE_MULTI_DND_STRING</span><span class="p">);</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">event_list</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">gtk_propagate_event</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-194" name="line-194"></a> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">stop_drag_check</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-198" name="line-198"></a><span class="p">}</span> +<a id="line-199" name="line-199"></a> +<a id="line-200" name="line-200"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-201" name="line-201"></a><span class="nf">selection_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-205" name="line-205"></a><span class="p">{</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">**</span><span class="n">list_ptr</span><span class="p">;</span> +<a id="line-207" name="line-207"></a> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">list_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GList</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-209" name="line-209"></a> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="o">*</span><span class="n">list_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_prepend</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">list_ptr</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_tree_row_reference_new</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">));</span> +<a id="line-211" name="line-211"></a><span class="p">}</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-214" name="line-214"></a><span class="nf">path_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">path_list</span><span class="p">)</span> +<a id="line-215" name="line-215"></a><span class="p">{</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">g_list_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">path_list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GFunc</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_row_reference_free</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">path_list</span><span class="p">);</span> +<a id="line-218" name="line-218"></a><span class="p">}</span> +<a id="line-219" name="line-219"></a> +<a id="line-220" name="line-220"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-221" name="line-221"></a><span class="nf">set_context_data</span><span class="w"> </span><span class="p">(</span><span class="n">GdkDragContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">path_list</span><span class="p">)</span> +<a id="line-223" name="line-223"></a><span class="p">{</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">g_object_set_data_full</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="s">"egg-tree-view-multi-source-row"</span><span class="p">,</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">path_list</span><span class="p">,</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">path_list_free</span><span class="p">);</span> +<a id="line-228" name="line-228"></a><span class="p">}</span> +<a id="line-229" name="line-229"></a> +<a id="line-230" name="line-230"></a><span class="k">static</span><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span> +<a id="line-231" name="line-231"></a><span class="nf">get_context_data</span><span class="w"> </span><span class="p">(</span><span class="n">GdkDragContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-232" name="line-232"></a><span class="p">{</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_get_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="s">"egg-tree-view-multi-source-row"</span><span class="p">);</span> +<a id="line-235" name="line-235"></a><span class="p">}</span> +<a id="line-236" name="line-236"></a> +<a id="line-237" name="line-237"></a><span class="cm">/* CUT-N-PASTE from gtktreeview.c */</span> +<a id="line-238" name="line-238"></a><span class="k">static</span><span class="w"> </span><span class="n">TreeViewDragInfo</span><span class="o">*</span> +<a id="line-239" name="line-239"></a><span class="nf">get_info</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="n">tree_view</span><span class="p">)</span> +<a id="line-240" name="line-240"></a><span class="p">{</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_get_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="s">"gtk-tree-view-drag-info"</span><span class="p">);</span> +<a id="line-242" name="line-242"></a><span class="p">}</span> +<a id="line-243" name="line-243"></a> +<a id="line-244" name="line-244"></a> +<a id="line-245" name="line-245"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-246" name="line-246"></a><span class="nf">egg_tree_multi_drag_drag_data_get</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">GdkDragContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">GtkSelectionData</span><span class="w"> </span><span class="o">*</span><span class="n">selection_data</span><span class="p">,</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">info</span><span class="p">,</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">time</span><span class="p">)</span> +<a id="line-251" name="line-251"></a><span class="p">{</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="n">tree_view</span><span class="p">;</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">TreeViewDragInfo</span><span class="w"> </span><span class="o">*</span><span class="n">di</span><span class="p">;</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">path_list</span><span class="p">;</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">tree_view</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-258" name="line-258"></a> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_model</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">);</span> +<a id="line-260" name="line-260"></a> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-263" name="line-263"></a> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">di</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_info</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-265" name="line-265"></a> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">di</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-268" name="line-268"></a> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">path_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_context_data</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-270" name="line-270"></a> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">path_list</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-273" name="line-273"></a> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="cm">/* We can implement the GTK_TREE_MODEL_ROW target generically for</span> +<a id="line-275" name="line-275"></a><span class="cm"> * any model; for DragSource models there are some other targets</span> +<a id="line-276" name="line-276"></a><span class="cm"> * we also support.</span> +<a id="line-277" name="line-277"></a><span class="cm"> */</span> +<a id="line-278" name="line-278"></a> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_IS_TREE_MULTI_DRAG_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">))</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="p">{</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">egg_tree_multi_drag_source_drag_data_get</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_TREE_MULTI_DRAG_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">),</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">path_list</span><span class="p">,</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">selection_data</span><span class="p">);</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="p">}</span> +<a id="line-285" name="line-285"></a><span class="p">}</span> +<a id="line-286" name="line-286"></a> +<a id="line-287" name="line-287"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-288" name="line-288"></a><span class="nf">egg_tree_multi_drag_motion_event</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">GdkEventMotion</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-291" name="line-291"></a><span class="p">{</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">EggTreeMultiDndData</span><span class="w"> </span><span class="o">*</span><span class="n">priv_data</span><span class="p">;</span> +<a id="line-293" name="line-293"></a> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">priv_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_get_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span><span class="w"> </span><span class="n">EGG_TREE_MULTI_DND_STRING</span><span class="p">);</span> +<a id="line-295" name="line-295"></a> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_drag_check_threshold</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">x</span><span class="p">,</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">y</span><span class="p">,</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x</span><span class="p">,</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y</span><span class="p">))</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="p">{</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">path_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">TreeViewDragInfo</span><span class="w"> </span><span class="o">*</span><span class="n">di</span><span class="p">;</span> +<a id="line-306" name="line-306"></a> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">di</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_info</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-308" name="line-308"></a> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">di</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-311" name="line-311"></a> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">stop_drag_check</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">gtk_tree_selection_selected_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">selection_foreach</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">path_list</span><span class="p">);</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">path_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_reverse</span><span class="w"> </span><span class="p">(</span><span class="n">path_list</span><span class="p">);</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">egg_tree_multi_drag_source_row_draggable</span><span class="w"> </span><span class="p">(</span><span class="n">EGG_TREE_MULTI_DRAG_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="n">path_list</span><span class="p">))</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="p">{</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">GdkDragContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-320" name="line-320"></a> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_drag_begin_with_coordinates</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">gtk_drag_source_get_target_list</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="n">di</span><span class="o">-></span><span class="n">source_actions</span><span class="p">,</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">pressed_button</span><span class="p">,</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="p">(</span><span class="n">GdkEvent</span><span class="o">*</span><span class="p">)</span><span class="n">event</span><span class="p">,</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x</span><span class="p">,</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">set_context_data</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">path_list</span><span class="p">);</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="n">gtk_drag_set_icon_default</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-330" name="line-330"></a> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="p">}</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="k">else</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="p">{</span> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="n">path_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">path_list</span><span class="p">);</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="p">}</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="p">}</span> +<a id="line-337" name="line-337"></a> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-339" name="line-339"></a><span class="p">}</span> +<a id="line-340" name="line-340"></a> +<a id="line-341" name="line-341"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-342" name="line-342"></a><span class="nf">egg_tree_multi_drag_button_press_event</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-345" name="line-345"></a><span class="p">{</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="n">tree_view</span><span class="p">;</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">cell_x</span><span class="p">,</span><span class="w"> </span><span class="n">cell_y</span><span class="p">;</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">EggTreeMultiDndData</span><span class="w"> </span><span class="o">*</span><span class="n">priv_data</span><span class="p">;</span> +<a id="line-352" name="line-352"></a> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="n">tree_view</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">priv_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_get_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">EGG_TREE_MULTI_DND_STRING</span><span class="p">);</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv_data</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="p">{</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">priv_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new0</span><span class="w"> </span><span class="p">(</span><span class="n">EggTreeMultiDndData</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">g_object_set_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">EGG_TREE_MULTI_DND_STRING</span><span class="p">,</span><span class="w"> </span><span class="n">priv_data</span><span class="p">);</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="p">}</span> +<a id="line-360" name="line-360"></a> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_slist_find</span><span class="w"> </span><span class="p">(</span><span class="n">priv_data</span><span class="o">-></span><span class="n">event_list</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="p">))</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-363" name="line-363"></a> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv_data</span><span class="o">-></span><span class="n">event_list</span><span class="p">)</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="p">{</span> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="cm">/* save the event to be propagated in order */</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">event_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_append</span><span class="w"> </span><span class="p">(</span><span class="n">priv_data</span><span class="o">-></span><span class="n">event_list</span><span class="p">,</span><span class="w"> </span><span class="n">gdk_event_copy</span><span class="w"> </span><span class="p">((</span><span class="n">GdkEvent</span><span class="o">*</span><span class="p">)</span><span class="n">event</span><span class="p">));</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="p">}</span> +<a id="line-370" name="line-370"></a> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_2BUTTON_PRESS</span><span class="p">)</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-373" name="line-373"></a> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">gtk_tree_view_get_path_at_pos</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">,</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y</span><span class="p">,</span> +<a id="line-376" name="line-376"></a><span class="w"> </span><span class="o">&</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">column</span><span class="p">,</span> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="o">&</span><span class="n">cell_x</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">cell_y</span><span class="p">);</span> +<a id="line-378" name="line-378"></a> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">);</span> +<a id="line-380" name="line-380"></a> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_tree_selection_path_is_selected</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">))</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="p">{</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">pressed_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="p">;</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x</span><span class="p">;</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y</span><span class="p">;</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">event_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_append</span><span class="w"> </span><span class="p">(</span><span class="n">priv_data</span><span class="o">-></span><span class="n">event_list</span><span class="p">,</span><span class="w"> </span><span class="n">gdk_event_copy</span><span class="w"> </span><span class="p">((</span><span class="n">GdkEvent</span><span class="o">*</span><span class="p">)</span><span class="n">event</span><span class="p">));</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">motion_notify_handler</span><span class="w"> </span><span class="o">=</span> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="s">"motion_notify_event"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">egg_tree_multi_drag_motion_event</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">button_release_handler</span><span class="w"> </span><span class="o">=</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="s">"button_release_event"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">egg_tree_multi_drag_button_release_event</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-391" name="line-391"></a> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv_data</span><span class="o">-></span><span class="n">drag_data_get_handler</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="p">{</span> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">priv_data</span><span class="o">-></span><span class="n">drag_data_get_handler</span><span class="w"> </span><span class="o">=</span> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="s">"drag_data_get"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">egg_tree_multi_drag_drag_data_get</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="p">}</span> +<a id="line-397" name="line-397"></a> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-399" name="line-399"></a> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="p">}</span> +<a id="line-402" name="line-402"></a> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">)</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="p">{</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="p">}</span> +<a id="line-407" name="line-407"></a> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-409" name="line-409"></a><span class="p">}</span> +<a id="line-410" name="line-410"></a> +<a id="line-411" name="line-411"></a><span class="kt">void</span> +<a id="line-412" name="line-412"></a><span class="nf">egg_tree_multi_drag_add_drag_support</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="n">tree_view</span><span class="p">)</span> +<a id="line-413" name="line-413"></a><span class="p">{</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">));</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="s">"button_press_event"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">egg_tree_multi_drag_button_press_event</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-416" name="line-416"></a><span class="p">}</span> +<a id="line-417" name="line-417"></a> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/14.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/14.html new file mode 100644 index 00000000..7ab15014 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/14.html @@ -0,0 +1,4391 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: gsearchtool/src/gsearchtool-callbacks.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gsearchtool-callbacks.c</p> +<a href="14.html#line-131"> variableScope 131</a><a href="14.html#line-1123"> variableScope 1123</a><a href="14.html#line-1154"> variableScope 1154</a><a href="14.html#line-1415"> variableScope 1415</a><a href="14.html#line-1845"> shadowArgument 1845</a><a href="14.html#line-1883"> shadowArgument 1883</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span> +<span class="normal">1328</span> +<span class="normal">1329</span> +<span class="normal">1330</span> +<span class="normal">1331</span> +<span class="normal">1332</span> +<span class="normal">1333</span> +<span class="normal">1334</span> +<span class="normal">1335</span> +<span class="normal">1336</span> +<span class="normal">1337</span> +<span class="normal">1338</span> +<span class="normal">1339</span> +<span class="normal">1340</span> +<span class="normal">1341</span> +<span class="normal">1342</span> +<span class="normal">1343</span> +<span class="normal">1344</span> +<span class="normal">1345</span> +<span class="normal">1346</span> +<span class="normal">1347</span> +<span class="normal">1348</span> +<span class="normal">1349</span> +<span class="normal">1350</span> +<span class="normal">1351</span> +<span class="normal">1352</span> +<span class="normal">1353</span> +<span class="normal">1354</span> +<span class="normal">1355</span> +<span class="normal">1356</span> +<span class="normal">1357</span> +<span class="normal">1358</span> +<span class="normal">1359</span> +<span class="normal">1360</span> +<span class="normal">1361</span> +<span class="normal">1362</span> +<span class="normal">1363</span> +<span class="normal">1364</span> +<span class="normal">1365</span> +<span class="normal">1366</span> +<span class="normal">1367</span> +<span class="normal">1368</span> +<span class="normal">1369</span> +<span class="normal">1370</span> +<span class="normal">1371</span> +<span class="normal">1372</span> +<span class="normal">1373</span> +<span class="normal">1374</span> +<span class="normal">1375</span> +<span class="normal">1376</span> +<span class="normal">1377</span> +<span class="normal">1378</span> +<span class="normal">1379</span> +<span class="normal">1380</span> +<span class="normal">1381</span> +<span class="normal">1382</span> +<span class="normal">1383</span> +<span class="normal">1384</span> +<span class="normal">1385</span> +<span class="normal">1386</span> +<span class="normal">1387</span> +<span class="normal">1388</span> +<span class="normal">1389</span> +<span class="normal">1390</span> +<span class="normal">1391</span> +<span class="normal">1392</span> +<span class="normal">1393</span> +<span class="normal">1394</span> +<span class="normal">1395</span> +<span class="normal">1396</span> +<span class="normal">1397</span> +<span class="normal">1398</span> +<span class="normal">1399</span> +<span class="normal">1400</span> +<span class="normal">1401</span> +<span class="normal">1402</span> +<span class="normal">1403</span> +<span class="normal">1404</span> +<span class="normal">1405</span> +<span class="normal">1406</span> +<span class="normal">1407</span> +<span class="normal">1408</span> +<span class="normal">1409</span> +<span class="normal">1410</span> +<span class="normal">1411</span> +<span class="normal">1412</span> +<span class="normal">1413</span> +<span class="normal">1414</span> +<span class="normal">1415</span> +<span class="normal">1416</span> +<span class="normal">1417</span> +<span class="normal">1418</span> +<span class="normal">1419</span> +<span class="normal">1420</span> +<span class="normal">1421</span> +<span class="normal">1422</span> +<span class="normal">1423</span> +<span class="normal">1424</span> +<span class="normal">1425</span> +<span class="normal">1426</span> +<span class="normal">1427</span> +<span class="normal">1428</span> +<span class="normal">1429</span> +<span class="normal">1430</span> +<span class="normal">1431</span> +<span class="normal">1432</span> +<span class="normal">1433</span> +<span class="normal">1434</span> +<span class="normal">1435</span> +<span class="normal">1436</span> +<span class="normal">1437</span> +<span class="normal">1438</span> +<span class="normal">1439</span> +<span class="normal">1440</span> +<span class="normal">1441</span> +<span class="normal">1442</span> +<span class="normal">1443</span> +<span class="normal">1444</span> +<span class="normal">1445</span> +<span class="normal">1446</span> +<span class="normal">1447</span> +<span class="normal">1448</span> +<span class="normal">1449</span> +<span class="normal">1450</span> +<span class="normal">1451</span> +<span class="normal">1452</span> +<span class="normal">1453</span> +<span class="normal">1454</span> +<span class="normal">1455</span> +<span class="normal">1456</span> +<span class="normal">1457</span> +<span class="normal">1458</span> +<span class="normal">1459</span> +<span class="normal">1460</span> +<span class="normal">1461</span> +<span class="normal">1462</span> +<span class="normal">1463</span> +<span class="normal">1464</span> +<span class="normal">1465</span> +<span class="normal">1466</span> +<span class="normal">1467</span> +<span class="normal">1468</span> +<span class="normal">1469</span> +<span class="normal">1470</span> +<span class="normal">1471</span> +<span class="normal">1472</span> +<span class="normal">1473</span> +<span class="normal">1474</span> +<span class="normal">1475</span> +<span class="normal">1476</span> +<span class="normal">1477</span> +<span class="normal">1478</span> +<span class="normal">1479</span> +<span class="normal">1480</span> +<span class="normal">1481</span> +<span class="normal">1482</span> +<span class="normal">1483</span> +<span class="normal">1484</span> +<span class="normal">1485</span> +<span class="normal">1486</span> +<span class="normal">1487</span> +<span class="normal">1488</span> +<span class="normal">1489</span> +<span class="normal">1490</span> +<span class="normal">1491</span> +<span class="normal">1492</span> +<span class="normal">1493</span> +<span class="normal">1494</span> +<span class="normal">1495</span> +<span class="normal">1496</span> +<span class="normal">1497</span> +<span class="normal">1498</span> +<span class="normal">1499</span> +<span class="normal">1500</span> +<span class="normal">1501</span> +<span class="normal">1502</span> +<span class="normal">1503</span> +<span class="normal">1504</span> +<span class="normal">1505</span> +<span class="normal">1506</span> +<span class="normal">1507</span> +<span class="normal">1508</span> +<span class="normal">1509</span> +<span class="normal">1510</span> +<span class="normal">1511</span> +<span class="normal">1512</span> +<span class="normal">1513</span> +<span class="normal">1514</span> +<span class="normal">1515</span> +<span class="normal">1516</span> +<span class="normal">1517</span> +<span class="normal">1518</span> +<span class="normal">1519</span> +<span class="normal">1520</span> +<span class="normal">1521</span> +<span class="normal">1522</span> +<span class="normal">1523</span> +<span class="normal">1524</span> +<span class="normal">1525</span> +<span class="normal">1526</span> +<span class="normal">1527</span> +<span class="normal">1528</span> +<span class="normal">1529</span> +<span class="normal">1530</span> +<span class="normal">1531</span> +<span class="normal">1532</span> +<span class="normal">1533</span> +<span class="normal">1534</span> +<span class="normal">1535</span> +<span class="normal">1536</span> +<span class="normal">1537</span> +<span class="normal">1538</span> +<span class="normal">1539</span> +<span class="normal">1540</span> +<span class="normal">1541</span> +<span class="normal">1542</span> +<span class="normal">1543</span> +<span class="normal">1544</span> +<span class="normal">1545</span> +<span class="normal">1546</span> +<span class="normal">1547</span> +<span class="normal">1548</span> +<span class="normal">1549</span> +<span class="normal">1550</span> +<span class="normal">1551</span> +<span class="normal">1552</span> +<span class="normal">1553</span> +<span class="normal">1554</span> +<span class="normal">1555</span> +<span class="normal">1556</span> +<span class="normal">1557</span> +<span class="normal">1558</span> +<span class="normal">1559</span> +<span class="normal">1560</span> +<span class="normal">1561</span> +<span class="normal">1562</span> +<span class="normal">1563</span> +<span class="normal">1564</span> +<span class="normal">1565</span> +<span class="normal">1566</span> +<span class="normal">1567</span> +<span class="normal">1568</span> +<span class="normal">1569</span> +<span class="normal">1570</span> +<span class="normal">1571</span> +<span class="normal">1572</span> +<span class="normal">1573</span> +<span class="normal">1574</span> +<span class="normal">1575</span> +<span class="normal">1576</span> +<span class="normal">1577</span> +<span class="normal">1578</span> +<span class="normal">1579</span> +<span class="normal">1580</span> +<span class="normal">1581</span> +<span class="normal">1582</span> +<span class="normal">1583</span> +<span class="normal">1584</span> +<span class="normal">1585</span> +<span class="normal">1586</span> +<span class="normal">1587</span> +<span class="normal">1588</span> +<span class="normal">1589</span> +<span class="normal">1590</span> +<span class="normal">1591</span> +<span class="normal">1592</span> +<span class="normal">1593</span> +<span class="normal">1594</span> +<span class="normal">1595</span> +<span class="normal">1596</span> +<span class="normal">1597</span> +<span class="normal">1598</span> +<span class="normal">1599</span> +<span class="normal">1600</span> +<span class="normal">1601</span> +<span class="normal">1602</span> +<span class="normal">1603</span> +<span class="normal">1604</span> +<span class="normal">1605</span> +<span class="normal">1606</span> +<span class="normal">1607</span> +<span class="normal">1608</span> +<span class="normal">1609</span> +<span class="normal">1610</span> +<span class="normal">1611</span> +<span class="normal">1612</span> +<span class="normal">1613</span> +<span class="normal">1614</span> +<span class="normal">1615</span> +<span class="normal">1616</span> +<span class="normal">1617</span> +<span class="normal">1618</span> +<span class="normal">1619</span> +<span class="normal">1620</span> +<span class="normal">1621</span> +<span class="normal">1622</span> +<span class="normal">1623</span> +<span class="normal">1624</span> +<span class="normal">1625</span> +<span class="normal">1626</span> +<span class="normal">1627</span> +<span class="normal">1628</span> +<span class="normal">1629</span> +<span class="normal">1630</span> +<span class="normal">1631</span> +<span class="normal">1632</span> +<span class="normal">1633</span> +<span class="normal">1634</span> +<span class="normal">1635</span> +<span class="normal">1636</span> +<span class="normal">1637</span> +<span class="normal">1638</span> +<span class="normal">1639</span> +<span class="normal">1640</span> +<span class="normal">1641</span> +<span class="normal">1642</span> +<span class="normal">1643</span> +<span class="normal">1644</span> +<span class="normal">1645</span> +<span class="normal">1646</span> +<span class="normal">1647</span> +<span class="normal">1648</span> +<span class="normal">1649</span> +<span class="normal">1650</span> +<span class="normal">1651</span> +<span class="normal">1652</span> +<span class="normal">1653</span> +<span class="normal">1654</span> +<span class="normal">1655</span> +<span class="normal">1656</span> +<span class="normal">1657</span> +<span class="normal">1658</span> +<span class="normal">1659</span> +<span class="normal">1660</span> +<span class="normal">1661</span> +<span class="normal">1662</span> +<span class="normal">1663</span> +<span class="normal">1664</span> +<span class="normal">1665</span> +<span class="normal">1666</span> +<span class="normal">1667</span> +<span class="normal">1668</span> +<span class="normal">1669</span> +<span class="normal">1670</span> +<span class="normal">1671</span> +<span class="normal">1672</span> +<span class="normal">1673</span> +<span class="normal">1674</span> +<span class="normal">1675</span> +<span class="normal">1676</span> +<span class="normal">1677</span> +<span class="normal">1678</span> +<span class="normal">1679</span> +<span class="normal">1680</span> +<span class="normal">1681</span> +<span class="normal">1682</span> +<span class="normal">1683</span> +<span class="normal">1684</span> +<span class="normal">1685</span> +<span class="normal">1686</span> +<span class="normal">1687</span> +<span class="normal">1688</span> +<span class="normal">1689</span> +<span class="normal">1690</span> +<span class="normal">1691</span> +<span class="normal">1692</span> +<span class="normal">1693</span> +<span class="normal">1694</span> +<span class="normal">1695</span> +<span class="normal">1696</span> +<span class="normal">1697</span> +<span class="normal">1698</span> +<span class="normal">1699</span> +<span class="normal">1700</span> +<span class="normal">1701</span> +<span class="normal">1702</span> +<span class="normal">1703</span> +<span class="normal">1704</span> +<span class="normal">1705</span> +<span class="normal">1706</span> +<span class="normal">1707</span> +<span class="normal">1708</span> +<span class="normal">1709</span> +<span class="normal">1710</span> +<span class="normal">1711</span> +<span class="normal">1712</span> +<span class="normal">1713</span> +<span class="normal">1714</span> +<span class="normal">1715</span> +<span class="normal">1716</span> +<span class="normal">1717</span> +<span class="normal">1718</span> +<span class="normal">1719</span> +<span class="normal">1720</span> +<span class="normal">1721</span> +<span class="normal">1722</span> +<span class="normal">1723</span> +<span class="normal">1724</span> +<span class="normal">1725</span> +<span class="normal">1726</span> +<span class="normal">1727</span> +<span class="normal">1728</span> +<span class="normal">1729</span> +<span class="normal">1730</span> +<span class="normal">1731</span> +<span class="normal">1732</span> +<span class="normal">1733</span> +<span class="normal">1734</span> +<span class="normal">1735</span> +<span class="normal">1736</span> +<span class="normal">1737</span> +<span class="normal">1738</span> +<span class="normal">1739</span> +<span class="normal">1740</span> +<span class="normal">1741</span> +<span class="normal">1742</span> +<span class="normal">1743</span> +<span class="normal">1744</span> +<span class="normal">1745</span> +<span class="normal">1746</span> +<span class="normal">1747</span> +<span class="normal">1748</span> +<span class="normal">1749</span> +<span class="normal">1750</span> +<span class="normal">1751</span> +<span class="normal">1752</span> +<span class="normal">1753</span> +<span class="normal">1754</span> +<span class="normal">1755</span> +<span class="normal">1756</span> +<span class="normal">1757</span> +<span class="normal">1758</span> +<span class="normal">1759</span> +<span class="normal">1760</span> +<span class="normal">1761</span> +<span class="normal">1762</span> +<span class="normal">1763</span> +<span class="normal">1764</span> +<span class="normal">1765</span> +<span class="normal">1766</span> +<span class="normal">1767</span> +<span class="normal">1768</span> +<span class="normal">1769</span> +<span class="normal">1770</span> +<span class="normal">1771</span> +<span class="normal">1772</span> +<span class="normal">1773</span> +<span class="normal">1774</span> +<span class="normal">1775</span> +<span class="normal">1776</span> +<span class="normal">1777</span> +<span class="normal">1778</span> +<span class="normal">1779</span> +<span class="normal">1780</span> +<span class="normal">1781</span> +<span class="normal">1782</span> +<span class="normal">1783</span> +<span class="normal">1784</span> +<span class="normal">1785</span> +<span class="normal">1786</span> +<span class="normal">1787</span> +<span class="normal">1788</span> +<span class="normal">1789</span> +<span class="normal">1790</span> +<span class="normal">1791</span> +<span class="normal">1792</span> +<span class="normal">1793</span> +<span class="normal">1794</span> +<span class="normal">1795</span> +<span class="normal">1796</span> +<span class="normal">1797</span> +<span class="normal">1798</span> +<span class="normal">1799</span> +<span class="normal">1800</span> +<span class="normal">1801</span> +<span class="normal">1802</span> +<span class="normal">1803</span> +<span class="normal">1804</span> +<span class="normal">1805</span> +<span class="normal">1806</span> +<span class="normal">1807</span> +<span class="normal">1808</span> +<span class="normal">1809</span> +<span class="normal">1810</span> +<span class="normal">1811</span> +<span class="normal">1812</span> +<span class="normal">1813</span> +<span class="normal">1814</span> +<span class="normal">1815</span> +<span class="normal">1816</span> +<span class="normal">1817</span> +<span class="normal">1818</span> +<span class="normal">1819</span> +<span class="normal">1820</span> +<span class="normal">1821</span> +<span class="normal">1822</span> +<span class="normal">1823</span> +<span class="normal">1824</span> +<span class="normal">1825</span> +<span class="normal">1826</span> +<span class="normal">1827</span> +<span class="normal">1828</span> +<span class="normal">1829</span> +<span class="normal">1830</span> +<span class="normal">1831</span> +<span class="normal">1832</span> +<span class="normal">1833</span> +<span class="normal">1834</span> +<span class="normal">1835</span> +<span class="normal">1836</span> +<span class="normal">1837</span> +<span class="normal">1838</span> +<span class="normal">1839</span> +<span class="normal">1840</span> +<span class="normal">1841</span> +<span class="normal">1842</span> +<span class="normal">1843</span> +<span class="normal">1844</span> +<span class="normal">1845</span> +<span class="normal">1846</span> +<span class="normal">1847</span> +<span class="normal">1848</span> +<span class="normal">1849</span> +<span class="normal">1850</span> +<span class="normal">1851</span> +<span class="normal">1852</span> +<span class="normal">1853</span> +<span class="normal">1854</span> +<span class="normal">1855</span> +<span class="normal">1856</span> +<span class="normal">1857</span> +<span class="normal">1858</span> +<span class="normal">1859</span> +<span class="normal">1860</span> +<span class="normal">1861</span> +<span class="normal">1862</span> +<span class="normal">1863</span> +<span class="normal">1864</span> +<span class="normal">1865</span> +<span class="normal">1866</span> +<span class="normal">1867</span> +<span class="normal">1868</span> +<span class="normal">1869</span> +<span class="normal">1870</span> +<span class="normal">1871</span> +<span class="normal">1872</span> +<span class="normal">1873</span> +<span class="normal">1874</span> +<span class="normal">1875</span> +<span class="normal">1876</span> +<span class="normal">1877</span> +<span class="normal">1878</span> +<span class="normal">1879</span> +<span class="normal">1880</span> +<span class="normal">1881</span> +<span class="normal">1882</span> +<span class="normal">1883</span> +<span class="normal">1884</span> +<span class="normal">1885</span> +<span class="normal">1886</span> +<span class="normal">1887</span> +<span class="normal">1888</span> +<span class="normal">1889</span> +<span class="normal">1890</span> +<span class="normal">1891</span> +<span class="normal">1892</span> +<span class="normal">1893</span> +<span class="normal">1894</span> +<span class="normal">1895</span> +<span class="normal">1896</span> +<span class="normal">1897</span> +<span class="normal">1898</span> +<span class="normal">1899</span> +<span class="normal">1900</span> +<span class="normal">1901</span> +<span class="normal">1902</span> +<span class="normal">1903</span> +<span class="normal">1904</span> +<span class="normal">1905</span> +<span class="normal">1906</span> +<span class="normal">1907</span> +<span class="normal">1908</span> +<span class="normal">1909</span> +<span class="normal">1910</span> +<span class="normal">1911</span> +<span class="normal">1912</span> +<span class="normal">1913</span> +<span class="normal">1914</span> +<span class="normal">1915</span> +<span class="normal">1916</span> +<span class="normal">1917</span> +<span class="normal">1918</span> +<span class="normal">1919</span> +<span class="normal">1920</span> +<span class="normal">1921</span> +<span class="normal">1922</span> +<span class="normal">1923</span> +<span class="normal">1924</span> +<span class="normal">1925</span> +<span class="normal">1926</span> +<span class="normal">1927</span> +<span class="normal">1928</span> +<span class="normal">1929</span> +<span class="normal">1930</span> +<span class="normal">1931</span> +<span class="normal">1932</span> +<span class="normal">1933</span> +<span class="normal">1934</span> +<span class="normal">1935</span> +<span class="normal">1936</span> +<span class="normal">1937</span> +<span class="normal">1938</span> +<span class="normal">1939</span> +<span class="normal">1940</span> +<span class="normal">1941</span> +<span class="normal">1942</span> +<span class="normal">1943</span> +<span class="normal">1944</span> +<span class="normal">1945</span> +<span class="normal">1946</span> +<span class="normal">1947</span> +<span class="normal">1948</span> +<span class="normal">1949</span> +<span class="normal">1950</span> +<span class="normal">1951</span> +<span class="normal">1952</span> +<span class="normal">1953</span> +<span class="normal">1954</span> +<span class="normal">1955</span> +<span class="normal">1956</span> +<span class="normal">1957</span> +<span class="normal">1958</span> +<span class="normal">1959</span> +<span class="normal">1960</span> +<span class="normal">1961</span> +<span class="normal">1962</span> +<span class="normal">1963</span> +<span class="normal">1964</span> +<span class="normal">1965</span> +<span class="normal">1966</span> +<span class="normal">1967</span> +<span class="normal">1968</span> +<span class="normal">1969</span> +<span class="normal">1970</span> +<span class="normal">1971</span> +<span class="normal">1972</span> +<span class="normal">1973</span> +<span class="normal">1974</span> +<span class="normal">1975</span> +<span class="normal">1976</span> +<span class="normal">1977</span> +<span class="normal">1978</span> +<span class="normal">1979</span> +<span class="normal">1980</span> +<span class="normal">1981</span> +<span class="normal">1982</span> +<span class="normal">1983</span> +<span class="normal">1984</span> +<span class="normal">1985</span> +<span class="normal">1986</span> +<span class="normal">1987</span> +<span class="normal">1988</span> +<span class="normal">1989</span> +<span class="normal">1990</span> +<span class="normal">1991</span> +<span class="normal">1992</span> +<span class="normal">1993</span> +<span class="normal">1994</span> +<span class="normal">1995</span> +<span class="normal">1996</span> +<span class="normal">1997</span> +<span class="normal">1998</span> +<span class="normal">1999</span> +<span class="normal">2000</span> +<span class="normal">2001</span> +<span class="normal">2002</span> +<span class="normal">2003</span> +<span class="normal">2004</span> +<span class="normal">2005</span> +<span class="normal">2006</span> +<span class="normal">2007</span> +<span class="normal">2008</span> +<span class="normal">2009</span> +<span class="normal">2010</span> +<span class="normal">2011</span> +<span class="normal">2012</span> +<span class="normal">2013</span> +<span class="normal">2014</span> +<span class="normal">2015</span> +<span class="normal">2016</span> +<span class="normal">2017</span> +<span class="normal">2018</span> +<span class="normal">2019</span> +<span class="normal">2020</span> +<span class="normal">2021</span> +<span class="normal">2022</span> +<span class="normal">2023</span> +<span class="normal">2024</span> +<span class="normal">2025</span> +<span class="normal">2026</span> +<span class="normal">2027</span> +<span class="normal">2028</span> +<span class="normal">2029</span> +<span class="normal">2030</span> +<span class="normal">2031</span> +<span class="normal">2032</span> +<span class="normal">2033</span> +<span class="normal">2034</span> +<span class="normal">2035</span> +<span class="normal">2036</span> +<span class="normal">2037</span> +<span class="normal">2038</span> +<span class="normal">2039</span> +<span class="normal">2040</span> +<span class="normal">2041</span> +<span class="normal">2042</span> +<span class="normal">2043</span> +<span class="normal">2044</span> +<span class="normal">2045</span> +<span class="normal">2046</span> +<span class="normal">2047</span> +<span class="normal">2048</span> +<span class="normal">2049</span> +<span class="normal">2050</span> +<span class="normal">2051</span> +<span class="normal">2052</span> +<span class="normal">2053</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) 2002 the Free Software Foundation</span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-4" name="line-4"></a><span class="cm"> *</span> +<a id="line-5" name="line-5"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-6" name="line-6"></a><span class="cm"> *</span> +<a id="line-7" name="line-7"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-8" name="line-8"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-9" name="line-9"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-10" name="line-10"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-11" name="line-11"></a><span class="cm"> *</span> +<a id="line-12" name="line-12"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-13" name="line-13"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-14" name="line-14"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-15" name="line-15"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-16" name="line-16"></a><span class="cm"> *</span> +<a id="line-17" name="line-17"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-18" name="line-18"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-19" name="line-19"></a><span class="cm"> *</span> +<a id="line-20" name="line-20"></a><span class="cm"> * Authors:</span> +<a id="line-21" name="line-21"></a><span class="cm"> * Dennis Cranston <[email protected]></span> +<a id="line-22" name="line-22"></a><span class="cm"> * George Lebl</span> +<a id="line-23" name="line-23"></a><span class="cm"> */</span> +<a id="line-24" name="line-24"></a> +<a id="line-25" name="line-25"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#endif</span> +<a id="line-28" name="line-28"></a> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><signal.h></span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><sys/wait.h></span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><sys/types.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><unistd.h></span> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-37" name="line-37"></a> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkkeysyms.h></span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool.h"</span> +<a id="line-42" name="line-42"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool-callbacks.h"</span> +<a id="line-43" name="line-43"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool-support.h"</span> +<a id="line-44" name="line-44"></a> +<a id="line-45" name="line-45"></a><span class="cp">#define SILENT_WINDOW_OPEN_LIMIT 5</span> +<a id="line-46" name="line-46"></a> +<a id="line-47" name="line-47"></a><span class="n">gboolean</span><span class="w"> </span><span class="n">row_selected_by_button_press_event</span><span class="p">;</span> +<a id="line-48" name="line-48"></a> +<a id="line-49" name="line-49"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-50" name="line-50"></a><span class="nf">store_window_state_and_geometry</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-51" name="line-51"></a><span class="p">{</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_width</span><span class="p">,</span><span class="w"> </span><span class="n">MINIMUM_WINDOW_WIDTH</span><span class="p">);</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_height</span><span class="p">,</span><span class="w"> </span><span class="n">MINIMUM_WINDOW_HEIGHT</span><span class="p">);</span> +<a id="line-54" name="line-54"></a> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">g_settings_set_int</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="s">"default-window-width"</span><span class="p">,</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_width</span><span class="p">);</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">g_settings_set_int</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="s">"default-window-height"</span><span class="p">,</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_height</span><span class="p">);</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="s">"default-window-maximized"</span><span class="p">,</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_maximized</span><span class="p">);</span> +<a id="line-64" name="line-64"></a><span class="p">}</span> +<a id="line-65" name="line-65"></a> +<a id="line-66" name="line-66"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-67" name="line-67"></a><span class="nf">quit_application</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-68" name="line-68"></a><span class="p">{</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">GSearchCommandDetails</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">command_details</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="p">;</span> +<a id="line-70" name="line-70"></a> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">RUNNING</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-72" name="line-72"></a><span class="cp">#ifdef HAVE_GETPGID</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="kt">pid_t</span><span class="w"> </span><span class="n">pgid</span><span class="p">;</span> +<a id="line-74" name="line-74"></a><span class="cp">#endif</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAKE_IT_QUIT</span><span class="p">;</span> +<a id="line-76" name="line-76"></a><span class="cp">#ifdef HAVE_GETPGID</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">pgid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">getpgid</span><span class="w"> </span><span class="p">(</span><span class="n">command_details</span><span class="o">-></span><span class="n">command_pid</span><span class="p">);</span> +<a id="line-78" name="line-78"></a> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">pgid</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">pgid</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">getpid</span><span class="w"> </span><span class="p">()))</span><span class="w"> </span><span class="p">{</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">kill</span><span class="w"> </span><span class="p">(</span><span class="o">-</span><span class="p">(</span><span class="n">getpgid</span><span class="w"> </span><span class="p">(</span><span class="n">command_details</span><span class="o">-></span><span class="n">command_pid</span><span class="p">)),</span><span class="w"> </span><span class="n">SIGKILL</span><span class="p">);</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="p">}</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">kill</span><span class="w"> </span><span class="p">(</span><span class="n">command_details</span><span class="o">-></span><span class="n">command_pid</span><span class="p">,</span><span class="w"> </span><span class="n">SIGKILL</span><span class="p">);</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="p">}</span> +<a id="line-85" name="line-85"></a><span class="cp">#else</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">kill</span><span class="w"> </span><span class="p">(</span><span class="n">command_details</span><span class="o">-></span><span class="n">command_pid</span><span class="p">,</span><span class="w"> </span><span class="n">SIGKILL</span><span class="p">);</span> +<a id="line-87" name="line-87"></a><span class="cp">#endif</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">wait</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="p">}</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">store_window_state_and_geometry</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="n">gtk_main_quit</span><span class="w"> </span><span class="p">();</span> +<a id="line-92" name="line-92"></a><span class="p">}</span> +<a id="line-93" name="line-93"></a> +<a id="line-94" name="line-94"></a><span class="kt">void</span> +<a id="line-95" name="line-95"></a><span class="nf">version_cb</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">option_name</span><span class="p">,</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">value</span><span class="p">,</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">,</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">error</span><span class="p">)</span> +<a id="line-99" name="line-99"></a><span class="p">{</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">g_print</span><span class="w"> </span><span class="p">(</span><span class="s">"%s %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">g_get_application_name</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">VERSION</span><span class="p">);</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">exit</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="p">);</span> +<a id="line-102" name="line-102"></a><span class="p">}</span> +<a id="line-103" name="line-103"></a> +<a id="line-104" name="line-104"></a><span class="kt">void</span> +<a id="line-105" name="line-105"></a><span class="nf">quit_session_cb</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">client</span><span class="p">,</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-107" name="line-107"></a><span class="p">{</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">quit_application</span><span class="w"> </span><span class="p">((</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-109" name="line-109"></a><span class="p">}</span> +<a id="line-110" name="line-110"></a> +<a id="line-111" name="line-111"></a><span class="kt">void</span> +<a id="line-112" name="line-112"></a><span class="nf">quit_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">GdkEvent</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">event</span><span class="p">,</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-115" name="line-115"></a><span class="p">{</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="n">quit_application</span><span class="w"> </span><span class="p">((</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-117" name="line-117"></a><span class="p">}</span> +<a id="line-118" name="line-118"></a> +<a id="line-119" name="line-119"></a><span class="kt">void</span> +<a id="line-120" name="line-120"></a><span class="nf">click_close_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-122" name="line-122"></a><span class="p">{</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">quit_application</span><span class="w"> </span><span class="p">((</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-124" name="line-124"></a><span class="p">}</span> +<a id="line-125" name="line-125"></a> +<a id="line-126" name="line-126"></a><span class="kt">void</span> +<a id="line-127" name="line-127"></a><span class="nf">click_find_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-129" name="line-129"></a><span class="p">{</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-131" name="line-131"></a><span class="hll"><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">command</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'command' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'command' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-132" name="line-132"></a> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_timeout_enabled</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="p">}</span> +<a id="line-136" name="line-136"></a> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">STOPPED</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">ABORTED</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">build_search_command</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="n">spawn_search_command</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">command</span><span class="p">);</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">);</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="p">}</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="p">}</span> +<a id="line-145" name="line-145"></a><span class="p">}</span> +<a id="line-146" name="line-146"></a> +<a id="line-147" name="line-147"></a><span class="kt">void</span> +<a id="line-148" name="line-148"></a><span class="nf">click_stop_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-150" name="line-150"></a><span class="p">{</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-152" name="line-152"></a> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">RUNNING</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-154" name="line-154"></a><span class="cp">#ifdef HAVE_GETPGID</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="kt">pid_t</span><span class="w"> </span><span class="n">pgid</span><span class="p">;</span> +<a id="line-156" name="line-156"></a><span class="cp">#endif</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAKE_IT_STOP</span><span class="p">;</span> +<a id="line-159" name="line-159"></a><span class="cp">#ifdef HAVE_GETPGID</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">pgid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">getpgid</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_pid</span><span class="p">);</span> +<a id="line-161" name="line-161"></a> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">pgid</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">pgid</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">getpid</span><span class="w"> </span><span class="p">()))</span><span class="w"> </span><span class="p">{</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">kill</span><span class="w"> </span><span class="p">(</span><span class="o">-</span><span class="p">(</span><span class="n">getpgid</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_pid</span><span class="p">)),</span><span class="w"> </span><span class="n">SIGKILL</span><span class="p">);</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="p">}</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">kill</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_pid</span><span class="p">,</span><span class="w"> </span><span class="n">SIGKILL</span><span class="p">);</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="p">}</span> +<a id="line-168" name="line-168"></a><span class="cp">#else</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">kill</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_pid</span><span class="p">,</span><span class="w"> </span><span class="n">SIGKILL</span><span class="p">);</span> +<a id="line-170" name="line-170"></a><span class="cp">#endif</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">wait</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="p">}</span> +<a id="line-173" name="line-173"></a><span class="p">}</span> +<a id="line-174" name="line-174"></a> +<a id="line-175" name="line-175"></a><span class="kt">void</span> +<a id="line-176" name="line-176"></a><span class="nf">click_help_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-178" name="line-178"></a><span class="p">{</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">gtk_show_uri_on_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="s">"help:mate-search-tool"</span><span class="p">,</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="n">gtk_get_current_event_time</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-184" name="line-184"></a> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-187" name="line-187"></a> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Could not open help document."</span><span class="p">));</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-195" name="line-195"></a> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-199" name="line-199"></a> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="p">}</span> +<a id="line-207" name="line-207"></a><span class="p">}</span> +<a id="line-208" name="line-208"></a> +<a id="line-209" name="line-209"></a><span class="kt">void</span> +<a id="line-210" name="line-210"></a><span class="nf">click_expander_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">object</span><span class="p">,</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">param_spec</span><span class="p">,</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-213" name="line-213"></a><span class="p">{</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-215" name="line-215"></a> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_expander_get_expanded</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EXPANDER</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">);</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">gtk_window_set_geometry_hints</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_geometry</span><span class="p">,</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">GDK_HINT_MIN_SIZE</span><span class="p">);</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="p">}</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">GdkGeometry</span><span class="w"> </span><span class="n">default_geometry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">MINIMUM_WINDOW_WIDTH</span><span class="p">,</span><span class="w"> </span><span class="n">MINIMUM_WINDOW_HEIGHT</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-225" name="line-225"></a> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">);</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">gtk_window_set_geometry_hints</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="o">&</span><span class="n">default_geometry</span><span class="p">,</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">GDK_HINT_MIN_SIZE</span><span class="p">);</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="p">}</span> +<a id="line-232" name="line-232"></a><span class="p">}</span> +<a id="line-233" name="line-233"></a> +<a id="line-234" name="line-234"></a><span class="kt">void</span> +<a id="line-235" name="line-235"></a><span class="nf">size_allocate_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">allocation</span><span class="p">,</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-238" name="line-238"></a><span class="p">{</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-240" name="line-240"></a> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">gtk_widget_set_size_request</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">allocation</span><span class="o">-></span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-242" name="line-242"></a><span class="p">}</span> +<a id="line-243" name="line-243"></a> +<a id="line-244" name="line-244"></a><span class="kt">void</span> +<a id="line-245" name="line-245"></a><span class="nf">add_constraint_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-247" name="line-247"></a><span class="p">{</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-250" name="line-250"></a> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_combo_box_get_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">));</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">idx</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-253" name="line-253"></a><span class="p">}</span> +<a id="line-254" name="line-254"></a> +<a id="line-255" name="line-255"></a><span class="kt">void</span> +<a id="line-256" name="line-256"></a><span class="nf">remove_constraint_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-258" name="line-258"></a><span class="p">{</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-260" name="line-260"></a> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_first</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">)</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">GSearchConstraint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">constraint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_last</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">)</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-263" name="line-263"></a> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_geometry</span><span class="p">.</span><span class="n">min_height</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">WINDOW_HEIGHT_STEP</span><span class="p">;</span> +<a id="line-265" name="line-265"></a> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">gtk_window_set_geometry_hints</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_geometry</span><span class="p">,</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">GDK_HINT_MIN_SIZE</span><span class="p">);</span> +<a id="line-270" name="line-270"></a> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">gtk_container_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">),</span><span class="w"> </span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-272" name="line-272"></a> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_selected_list</span><span class="w"> </span><span class="o">=</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="n">g_list_remove</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_selected_list</span><span class="p">,</span><span class="w"> </span><span class="n">constraint</span><span class="p">);</span> +<a id="line-275" name="line-275"></a> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">set_constraint_selected_state</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">set_constraint_gsettings_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchConstraint</span><span class="p">,</span><span class="w"> </span><span class="n">constraint</span><span class="p">);</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span> +<a id="line-280" name="line-280"></a><span class="p">}</span> +<a id="line-281" name="line-281"></a> +<a id="line-282" name="line-282"></a><span class="kt">void</span> +<a id="line-283" name="line-283"></a><span class="nf">constraint_activate_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-285" name="line-285"></a><span class="p">{</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-287" name="line-287"></a> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">gtk_widget_get_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">))</span><span class="w"> </span><span class="o">&&</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">click_find_cb</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="p">}</span> +<a id="line-292" name="line-292"></a><span class="p">}</span> +<a id="line-293" name="line-293"></a> +<a id="line-294" name="line-294"></a><span class="kt">void</span> +<a id="line-295" name="line-295"></a><span class="nf">constraint_update_info_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-297" name="line-297"></a><span class="p">{</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">;</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="n">GSearchConstraint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">opt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-300" name="line-300"></a> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_entry_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">update_constraint_info</span><span class="w"> </span><span class="p">(</span><span class="n">opt</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p">);</span> +<a id="line-303" name="line-303"></a><span class="p">}</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="kt">void</span> +<a id="line-306" name="line-306"></a><span class="nf">name_contains_activate_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-308" name="line-308"></a><span class="p">{</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-310" name="line-310"></a> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">gtk_widget_get_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">))</span><span class="w"> </span><span class="o">&&</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">click_find_cb</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="p">}</span> +<a id="line-315" name="line-315"></a><span class="p">}</span> +<a id="line-316" name="line-316"></a> +<a id="line-317" name="line-317"></a><span class="kt">void</span> +<a id="line-318" name="line-318"></a><span class="nf">look_in_folder_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-320" name="line-320"></a><span class="p">{</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">value</span><span class="p">;</span> +<a id="line-323" name="line-323"></a> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_get_filename</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">));</span> +<a id="line-325" name="line-325"></a> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">g_settings_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"look-in-folder"</span><span class="p">,</span><span class="w"> </span><span class="n">value</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="p">}</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-330" name="line-330"></a><span class="p">}</span> +<a id="line-331" name="line-331"></a> +<a id="line-332" name="line-332"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-333" name="line-333"></a><span class="nf">display_dialog_file_open_limit</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">count</span><span class="p">)</span> +<a id="line-335" name="line-335"></a><span class="p">{</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">button</span><span class="p">;</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">primary</span><span class="p">;</span> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">secondary</span><span class="p">;</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-341" name="line-341"></a> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">ngettext</span><span class="w"> </span><span class="p">(</span><span class="s">"Are you sure you want to open %d document?"</span><span class="p">,</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="s">"Are you sure you want to open %d documents?"</span><span class="p">,</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">count</span><span class="p">),</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">count</span><span class="p">);</span> +<a id="line-346" name="line-346"></a> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">secondary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">ngettext</span><span class="w"> </span><span class="p">(</span><span class="s">"This will open %d separate window."</span><span class="p">,</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="s">"This will open %d separate windows."</span><span class="p">,</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">count</span><span class="p">),</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">count</span><span class="p">);</span> +<a id="line-351" name="line-351"></a> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">GTK_MESSAGE_QUESTION</span><span class="p">,</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CANCEL</span><span class="p">,</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">secondary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-359" name="line-359"></a> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-363" name="line-363"></a> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-open"</span><span class="p">,</span> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-369" name="line-369"></a> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">);</span> +<a id="line-372" name="line-372"></a> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">gtk_dialog_add_action_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">gtk_dialog_set_default_response</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-375" name="line-375"></a> +<a id="line-376" name="line-376"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">secondary</span><span class="p">);</span> +<a id="line-380" name="line-380"></a> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-382" name="line-382"></a><span class="p">}</span> +<a id="line-383" name="line-383"></a> +<a id="line-384" name="line-384"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-385" name="line-385"></a><span class="nf">display_dialog_could_not_open_file</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">message</span><span class="p">)</span> +<a id="line-388" name="line-388"></a><span class="p">{</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">primary</span><span class="p">;</span> +<a id="line-391" name="line-391"></a> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not open document </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">."</span><span class="p">),</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-393" name="line-393"></a> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-401" name="line-401"></a> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-405" name="line-405"></a> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-409" name="line-409"></a> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-412" name="line-412"></a><span class="p">}</span> +<a id="line-413" name="line-413"></a> +<a id="line-414" name="line-414"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-415" name="line-415"></a><span class="nf">display_dialog_could_not_open_folder</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">folder</span><span class="p">)</span> +<a id="line-417" name="line-417"></a><span class="p">{</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">primary</span><span class="p">;</span> +<a id="line-420" name="line-420"></a> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not open folder </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">."</span><span class="p">),</span><span class="w"> </span><span class="n">folder</span><span class="p">);</span> +<a id="line-422" name="line-422"></a> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The caja file manager is not running."</span><span class="p">));</span> +<a id="line-430" name="line-430"></a> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-434" name="line-434"></a> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-438" name="line-438"></a> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-441" name="line-441"></a><span class="p">}</span> +<a id="line-442" name="line-442"></a> +<a id="line-443" name="line-443"></a><span class="kt">void</span> +<a id="line-444" name="line-444"></a><span class="nf">open_file_event_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">event</span><span class="p">,</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-447" name="line-447"></a><span class="p">{</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">open_file_cb</span><span class="w"> </span><span class="p">((</span><span class="n">GtkMenuItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-449" name="line-449"></a><span class="p">}</span> +<a id="line-450" name="line-450"></a> +<a id="line-451" name="line-451"></a><span class="kt">void</span> +<a id="line-452" name="line-452"></a><span class="nf">open_file_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkMenuItem</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">action</span><span class="p">,</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-454" name="line-454"></a><span class="p">{</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="p">}</span> +<a id="line-463" name="line-463"></a> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">);</span> +<a id="line-466" name="line-466"></a> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_list_length</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">SILENT_WINDOW_OPEN_LIMIT</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-469" name="line-469"></a> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">display_dialog_file_open_limit</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">g_list_length</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">));</span> +<a id="line-471" name="line-471"></a> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="p">}</span> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="p">}</span> +<a id="line-477" name="line-477"></a> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">g_list_length</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-479" name="line-479"></a> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">no_files_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-481" name="line-481"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_name</span><span class="p">;</span> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale_file</span><span class="p">;</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-484" name="line-484"></a> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="n">g_list_nth_data</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">idx</span><span class="p">));</span> +<a id="line-487" name="line-487"></a> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">utf8_name</span><span class="p">,</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">COLUMN_LOCALE_FILE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">locale_file</span><span class="p">,</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="n">COLUMN_NO_FILES_FOUND</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">no_files_found</span><span class="p">,</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-493" name="line-493"></a> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">no_files_found</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">app</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-496" name="line-496"></a> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_MENU_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="n">app</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_get_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">),</span><span class="w"> </span><span class="s">"app"</span><span class="p">);</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="p">}</span> +<a id="line-500" name="line-500"></a> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="n">gtk_tree_selection_unselect_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="n">display_dialog_could_not_open_file</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_name</span><span class="p">,</span> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The document does not exist."</span><span class="p">));</span> +<a id="line-506" name="line-506"></a> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="p">}</span> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_with_application</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">locale_file</span><span class="p">,</span><span class="w"> </span><span class="n">app</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-509" name="line-509"></a> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">launch_file</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-511" name="line-511"></a> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_DIR</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-513" name="line-513"></a> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_with_filemanager</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">locale_file</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="n">display_dialog_could_not_open_folder</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_name</span><span class="p">);</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="p">}</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="p">}</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="n">display_dialog_could_not_open_file</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_name</span><span class="p">,</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"There is no installed viewer capable "</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="s">"of displaying the document."</span><span class="p">));</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="p">}</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="p">}</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="p">}</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="p">}</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_name</span><span class="p">);</span> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file</span><span class="p">);</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="p">}</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-530" name="line-530"></a><span class="p">}</span> +<a id="line-531" name="line-531"></a> +<a id="line-532" name="line-532"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-533" name="line-533"></a><span class="nf">display_dialog_folder_open_limit</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">count</span><span class="p">)</span> +<a id="line-535" name="line-535"></a><span class="p">{</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-537" name="line-537"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">button</span><span class="p">;</span> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">primary</span><span class="p">;</span> +<a id="line-539" name="line-539"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">secondary</span><span class="p">;</span> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-541" name="line-541"></a> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">ngettext</span><span class="w"> </span><span class="p">(</span><span class="s">"Are you sure you want to open %d folder?"</span><span class="p">,</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="s">"Are you sure you want to open %d folders?"</span><span class="p">,</span> +<a id="line-544" name="line-544"></a><span class="w"> </span><span class="n">count</span><span class="p">),</span> +<a id="line-545" name="line-545"></a><span class="w"> </span><span class="n">count</span><span class="p">);</span> +<a id="line-546" name="line-546"></a> +<a id="line-547" name="line-547"></a><span class="w"> </span><span class="n">secondary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">ngettext</span><span class="w"> </span><span class="p">(</span><span class="s">"This will open %d separate window."</span><span class="p">,</span> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="s">"This will open %d separate windows."</span><span class="p">,</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="n">count</span><span class="p">),</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="n">count</span><span class="p">);</span> +<a id="line-551" name="line-551"></a> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="n">GTK_MESSAGE_QUESTION</span><span class="p">,</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CANCEL</span><span class="p">,</span> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="n">secondary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-559" name="line-559"></a> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-561" name="line-561"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-563" name="line-563"></a> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-open"</span><span class="p">,</span> +<a id="line-566" name="line-566"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-569" name="line-569"></a> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-571" name="line-571"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">);</span> +<a id="line-572" name="line-572"></a> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="n">gtk_dialog_add_action_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="n">gtk_dialog_set_default_response</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-575" name="line-575"></a> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-579" name="line-579"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">secondary</span><span class="p">);</span> +<a id="line-580" name="line-580"></a> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-582" name="line-582"></a><span class="p">}</span> +<a id="line-583" name="line-583"></a> +<a id="line-584" name="line-584"></a><span class="kt">void</span> +<a id="line-585" name="line-585"></a><span class="nf">open_folder_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkAction</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">action</span><span class="p">,</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-587" name="line-587"></a><span class="p">{</span> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-589" name="line-589"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-590" name="line-590"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-591" name="line-591"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_file_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_app_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-593" name="line-593"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-595" name="line-595"></a> +<a id="line-596" name="line-596"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="p">}</span> +<a id="line-599" name="line-599"></a> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">);</span> +<a id="line-602" name="line-602"></a> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_list_length</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">SILENT_WINDOW_OPEN_LIMIT</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-605" name="line-605"></a> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">display_dialog_folder_open_limit</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">g_list_length</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">));</span> +<a id="line-607" name="line-607"></a> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="p">}</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="p">}</span> +<a id="line-613" name="line-613"></a> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">g_list_length</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-615" name="line-615"></a> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale_folder</span><span class="p">;</span> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_folder</span><span class="p">;</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale_file</span><span class="p">;</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-620" name="line-620"></a> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="n">g_list_nth_data</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">idx</span><span class="p">));</span> +<a id="line-623" name="line-623"></a> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="n">COLUMN_RELATIVE_PATH</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">utf8_folder</span><span class="p">,</span> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="n">COLUMN_LOCALE_FILE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">locale_file</span><span class="p">,</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-628" name="line-628"></a> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="n">locale_folder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_path_get_dirname</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file</span><span class="p">);</span> +<a id="line-630" name="line-630"></a> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="n">g_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">locale_folder</span><span class="p">);</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="n">g_file_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_info</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_QUERY_INFO_NONE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="n">g_app_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_app_info_get_default_for_type</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_get_content_type</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="p">}</span> +<a id="line-636" name="line-636"></a> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_with_application</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">locale_folder</span><span class="p">,</span><span class="w"> </span><span class="n">g_app_info</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-638" name="line-638"></a> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_with_filemanager</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">locale_folder</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-640" name="line-640"></a> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="n">display_dialog_could_not_open_folder</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_folder</span><span class="p">);</span> +<a id="line-642" name="line-642"></a> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_folder</span><span class="p">);</span> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_folder</span><span class="p">);</span> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">);</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info</span><span class="p">);</span> +<a id="line-648" name="line-648"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info</span><span class="p">);</span> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="p">}</span> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="p">}</span> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_folder</span><span class="p">);</span> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file</span><span class="p">);</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_folder</span><span class="p">);</span> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="p">}</span> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">);</span> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info</span><span class="p">);</span> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info</span><span class="p">);</span> +<a id="line-660" name="line-660"></a><span class="p">}</span> +<a id="line-661" name="line-661"></a> +<a id="line-662" name="line-662"></a><span class="kt">void</span> +<a id="line-663" name="line-663"></a><span class="nf">copy_path_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkAction</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">action</span><span class="p">,</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-665" name="line-665"></a><span class="p">{</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-670" name="line-670"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale_path</span><span class="p">;</span> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">GtkClipboard</span><span class="o">*</span><span class="w"> </span><span class="n">clipboard</span><span class="p">;</span> +<a id="line-672" name="line-672"></a> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">);</span> +<a id="line-675" name="line-675"></a> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="n">g_list_nth_data</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">));</span> +<a id="line-678" name="line-678"></a> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="n">COLUMN_LOCALE_FILE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">locale_path</span><span class="p">,</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="n">clipboard</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_clipboard_get</span><span class="p">(</span><span class="n">GDK_SELECTION_CLIPBOARD</span><span class="p">);</span> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">gtk_clipboard_set_text</span><span class="p">(</span><span class="n">clipboard</span><span class="p">,</span><span class="w"> </span><span class="n">locale_path</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-684" name="line-684"></a> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_path</span><span class="p">);</span> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-687" name="line-687"></a><span class="p">}</span> +<a id="line-688" name="line-688"></a> +<a id="line-689" name="line-689"></a><span class="kt">void</span> +<a id="line-690" name="line-690"></a><span class="nf">file_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GFileMonitor</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">handle</span><span class="p">,</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">monitor_uri</span><span class="p">,</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">info_uri</span><span class="p">,</span> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="n">GFileMonitorEvent</span><span class="w"> </span><span class="n">event_type</span><span class="p">,</span> +<a id="line-694" name="line-694"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-695" name="line-695"></a><span class="p">{</span> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="n">GSearchMonitor</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">monitor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-697" name="line-697"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">monitor</span><span class="o">-></span><span class="n">gsearch</span><span class="p">;</span> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">;</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-701" name="line-701"></a> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">event_type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-703" name="line-703"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">G_FILE_MONITOR_EVENT_DELETED</span><span class="p">:</span> +<a id="line-704" name="line-704"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_row_reference_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">monitor</span><span class="o">-></span><span class="n">reference</span><span class="p">);</span> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_row_reference_get_model</span><span class="w"> </span><span class="p">(</span><span class="n">monitor</span><span class="o">-></span><span class="n">reference</span><span class="p">);</span> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="n">tree_model_iter_free_monitor</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-708" name="line-708"></a><span class="w"> </span><span class="n">gtk_list_store_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="n">update_search_counts</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-711" name="line-711"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="p">}</span> +<a id="line-714" name="line-714"></a><span class="p">}</span> +<a id="line-715" name="line-715"></a> +<a id="line-716" name="line-716"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-717" name="line-717"></a><span class="nf">display_dialog_could_not_move_to_trash</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">message</span><span class="p">)</span> +<a id="line-720" name="line-720"></a><span class="p">{</span> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">primary</span><span class="p">;</span> +<a id="line-723" name="line-723"></a> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not move </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> to trash."</span><span class="p">),</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-725" name="line-725"></a> +<a id="line-726" name="line-726"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-733" name="line-733"></a> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-735" name="line-735"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-737" name="line-737"></a> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-743" name="line-743"></a><span class="p">}</span> +<a id="line-744" name="line-744"></a> +<a id="line-745" name="line-745"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-746" name="line-746"></a><span class="nf">display_dialog_delete_permanently</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">)</span> +<a id="line-748" name="line-748"></a><span class="p">{</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">button</span><span class="p">;</span> +<a id="line-751" name="line-751"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">primary</span><span class="p">;</span> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">secondary</span><span class="p">;</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-754" name="line-754"></a> +<a id="line-755" name="line-755"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Do you want to delete </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> permanently?"</span><span class="p">),</span> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="n">g_path_get_basename</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">));</span> +<a id="line-757" name="line-757"></a> +<a id="line-758" name="line-758"></a><span class="w"> </span><span class="n">secondary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Trash is unavailable. Could not move </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> to the trash."</span><span class="p">),</span> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-760" name="line-760"></a> +<a id="line-761" name="line-761"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="n">GTK_MESSAGE_QUESTION</span><span class="p">,</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CANCEL</span><span class="p">,</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-766" name="line-766"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="n">secondary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-768" name="line-768"></a> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-770" name="line-770"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-772" name="line-772"></a> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-delete"</span><span class="p">,</span> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-778" name="line-778"></a> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">);</span> +<a id="line-781" name="line-781"></a> +<a id="line-782" name="line-782"></a><span class="w"> </span><span class="n">gtk_dialog_add_action_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-783" name="line-783"></a><span class="w"> </span><span class="n">gtk_dialog_set_default_response</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-784" name="line-784"></a> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-786" name="line-786"></a> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-788" name="line-788"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-789" name="line-789"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">secondary</span><span class="p">);</span> +<a id="line-790" name="line-790"></a> +<a id="line-791" name="line-791"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-792" name="line-792"></a><span class="p">}</span> +<a id="line-793" name="line-793"></a> +<a id="line-794" name="line-794"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-795" name="line-795"></a><span class="nf">display_dialog_could_not_delete</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-796" name="line-796"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-797" name="line-797"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">message</span><span class="p">)</span> +<a id="line-798" name="line-798"></a><span class="p">{</span> +<a id="line-799" name="line-799"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">primary</span><span class="p">;</span> +<a id="line-801" name="line-801"></a> +<a id="line-802" name="line-802"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not delete </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">."</span><span class="p">),</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-803" name="line-803"></a> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-805" name="line-805"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-808" name="line-808"></a><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-809" name="line-809"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-811" name="line-811"></a> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-815" name="line-815"></a> +<a id="line-816" name="line-816"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span> +<a id="line-818" name="line-818"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-819" name="line-819"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-820" name="line-820"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-821" name="line-821"></a><span class="p">}</span> +<a id="line-822" name="line-822"></a> +<a id="line-823" name="line-823"></a><span class="kt">void</span> +<a id="line-824" name="line-824"></a><span class="nf">move_to_trash_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkAction</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">action</span><span class="p">,</span> +<a id="line-825" name="line-825"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-826" name="line-826"></a><span class="p">{</span> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">last_selected_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-829" name="line-829"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">total</span><span class="p">;</span> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-831" name="line-831"></a> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="p">}</span> +<a id="line-835" name="line-835"></a> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="n">total</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">));</span> +<a id="line-837" name="line-837"></a> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">total</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-839" name="line-839"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">no_files_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_file</span><span class="p">;</span> +<a id="line-844" name="line-844"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_basename</span><span class="p">;</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_filename</span><span class="p">;</span> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale_filename</span><span class="p">;</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-849" name="line-849"></a> +<a id="line-850" name="line-850"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-851" name="line-851"></a><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">);</span> +<a id="line-852" name="line-852"></a> +<a id="line-853" name="line-853"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-854" name="line-854"></a><span class="w"> </span><span class="n">g_list_nth_data</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">));</span> +<a id="line-855" name="line-855"></a> +<a id="line-856" name="line-856"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-857" name="line-857"></a><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">utf8_basename</span><span class="p">,</span> +<a id="line-858" name="line-858"></a><span class="w"> </span><span class="n">COLUMN_LOCALE_FILE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">locale_filename</span><span class="p">,</span> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="n">COLUMN_NO_FILES_FOUND</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">no_files_found</span><span class="p">,</span> +<a id="line-860" name="line-860"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-861" name="line-861"></a> +<a id="line-862" name="line-862"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">no_files_found</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-863" name="line-863"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_basename</span><span class="p">);</span> +<a id="line-864" name="line-864"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_filename</span><span class="p">);</span> +<a id="line-865" name="line-865"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-866" name="line-866"></a><span class="w"> </span><span class="p">}</span> +<a id="line-867" name="line-867"></a> +<a id="line-868" name="line-868"></a><span class="w"> </span><span class="n">utf8_filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_display_name</span><span class="w"> </span><span class="p">(</span><span class="n">locale_filename</span><span class="p">);</span> +<a id="line-869" name="line-869"></a> +<a id="line-870" name="line-870"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">total</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-871" name="line-871"></a><span class="w"> </span><span class="n">last_selected_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-872" name="line-872"></a><span class="w"> </span><span class="p">}</span> +<a id="line-873" name="line-873"></a> +<a id="line-874" name="line-874"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="o">!</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">locale_filename</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">))</span><span class="w"> </span><span class="o">&&</span> +<a id="line-875" name="line-875"></a><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">locale_filename</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_SYMLINK</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-876" name="line-876"></a><span class="w"> </span><span class="n">gtk_tree_selection_unselect_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="n">display_dialog_could_not_move_to_trash</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_basename</span><span class="p">,</span> +<a id="line-878" name="line-878"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The document does not exist."</span><span class="p">));</span> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="p">}</span> +<a id="line-880" name="line-880"></a> +<a id="line-881" name="line-881"></a><span class="w"> </span><span class="n">g_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">locale_filename</span><span class="p">);</span> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_trash</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-883" name="line-883"></a> +<a id="line-884" name="line-884"></a><span class="w"> </span><span class="n">gtk_tree_selection_unselect_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">);</span> +<a id="line-886" name="line-886"></a> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">result</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="n">tree_model_iter_free_monitor</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span> +<a id="line-889" name="line-889"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-890" name="line-890"></a><span class="w"> </span><span class="n">gtk_list_store_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-891" name="line-891"></a><span class="w"> </span><span class="p">}</span> +<a id="line-892" name="line-892"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-893" name="line-893"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-894" name="line-894"></a> +<a id="line-895" name="line-895"></a><span class="w"> </span><span class="n">gtk_tree_selection_unselect_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-896" name="line-896"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">display_dialog_delete_permanently</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_filename</span><span class="p">);</span> +<a id="line-897" name="line-897"></a> +<a id="line-898" name="line-898"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-899" name="line-899"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_file_tmp</span><span class="p">;</span> +<a id="line-900" name="line-900"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error_tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-901" name="line-901"></a> +<a id="line-902" name="line-902"></a><span class="w"> </span><span class="n">g_file_tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">locale_filename</span><span class="p">);</span> +<a id="line-903" name="line-903"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_delete</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_tmp</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error_tmp</span><span class="p">);</span> +<a id="line-904" name="line-904"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_tmp</span><span class="p">);</span> +<a id="line-905" name="line-905"></a> +<a id="line-906" name="line-906"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">result</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="n">tree_model_iter_free_monitor</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span> +<a id="line-908" name="line-908"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="n">gtk_list_store_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-910" name="line-910"></a><span class="w"> </span><span class="p">}</span> +<a id="line-911" name="line-911"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-912" name="line-912"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">message</span><span class="p">;</span> +<a id="line-913" name="line-913"></a> +<a id="line-914" name="line-914"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Deleting </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> failed: %s."</span><span class="p">),</span> +<a id="line-915" name="line-915"></a><span class="w"> </span><span class="n">utf8_filename</span><span class="p">,</span><span class="w"> </span><span class="n">error_tmp</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-916" name="line-916"></a> +<a id="line-917" name="line-917"></a><span class="w"> </span><span class="n">display_dialog_could_not_delete</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_basename</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-918" name="line-918"></a> +<a id="line-919" name="line-919"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error_tmp</span><span class="p">);</span> +<a id="line-920" name="line-920"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">);</span> +<a id="line-921" name="line-921"></a><span class="w"> </span><span class="p">}</span> +<a id="line-922" name="line-922"></a><span class="w"> </span><span class="p">}</span> +<a id="line-923" name="line-923"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-924" name="line-924"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">message</span><span class="p">;</span> +<a id="line-925" name="line-925"></a> +<a id="line-926" name="line-926"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Moving </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> failed: %s."</span><span class="p">),</span> +<a id="line-927" name="line-927"></a><span class="w"> </span><span class="n">utf8_filename</span><span class="p">,</span> +<a id="line-928" name="line-928"></a><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-929" name="line-929"></a><span class="w"> </span><span class="n">display_dialog_could_not_move_to_trash</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_basename</span><span class="p">,</span> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-931" name="line-931"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-932" name="line-932"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">);</span> +<a id="line-933" name="line-933"></a><span class="w"> </span><span class="p">}</span> +<a id="line-934" name="line-934"></a><span class="w"> </span><span class="p">}</span> +<a id="line-935" name="line-935"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-936" name="line-936"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_filename</span><span class="p">);</span> +<a id="line-937" name="line-937"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_filename</span><span class="p">);</span> +<a id="line-938" name="line-938"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_basename</span><span class="p">);</span> +<a id="line-939" name="line-939"></a><span class="w"> </span><span class="p">}</span> +<a id="line-940" name="line-940"></a> +<a id="line-941" name="line-941"></a><span class="w"> </span><span class="cm">/* Bugzilla #397945: Select next row in the search results list */</span> +<a id="line-942" name="line-942"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">last_selected_path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-943" name="line-943"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-944" name="line-944"></a><span class="w"> </span><span class="n">gtk_tree_selection_select_path</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-945" name="line-945"></a><span class="w"> </span><span class="n">last_selected_path</span><span class="p">);</span> +<a id="line-946" name="line-946"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="n">gtk_tree_path_prev</span><span class="w"> </span><span class="p">(</span><span class="n">last_selected_path</span><span class="p">);</span> +<a id="line-948" name="line-948"></a><span class="w"> </span><span class="n">gtk_tree_selection_select_path</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-949" name="line-949"></a><span class="w"> </span><span class="n">last_selected_path</span><span class="p">);</span> +<a id="line-950" name="line-950"></a><span class="w"> </span><span class="p">}</span> +<a id="line-951" name="line-951"></a><span class="w"> </span><span class="p">}</span> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">last_selected_path</span><span class="p">);</span> +<a id="line-953" name="line-953"></a><span class="w"> </span><span class="p">}</span> +<a id="line-954" name="line-954"></a> +<a id="line-955" name="line-955"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">RUNNING</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-956" name="line-956"></a><span class="w"> </span><span class="n">update_search_counts</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-957" name="line-957"></a><span class="w"> </span><span class="p">}</span> +<a id="line-958" name="line-958"></a><span class="p">}</span> +<a id="line-959" name="line-959"></a> +<a id="line-960" name="line-960"></a><span class="n">gboolean</span> +<a id="line-961" name="line-961"></a><span class="nf">file_button_press_event_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-962" name="line-962"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">event</span><span class="p">,</span> +<a id="line-963" name="line-963"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-964" name="line-964"></a><span class="p">{</span> +<a id="line-965" name="line-965"></a><span class="w"> </span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">tree</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-966" name="line-966"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">;</span> +<a id="line-967" name="line-967"></a> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="n">row_selected_by_button_press_event</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-969" name="line-969"></a> +<a id="line-970" name="line-970"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">window</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">gtk_tree_view_get_bin_window</span><span class="w"> </span><span class="p">(</span><span class="n">tree</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-971" name="line-971"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-972" name="line-972"></a><span class="w"> </span><span class="p">}</span> +<a id="line-973" name="line-973"></a> +<a id="line-974" name="line-974"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_path_at_pos</span><span class="w"> </span><span class="p">(</span><span class="n">tree</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y</span><span class="p">,</span> +<a id="line-975" name="line-975"></a><span class="w"> </span><span class="o">&</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-976" name="line-976"></a> +<a id="line-977" name="line-977"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">3</span><span class="p">)</span> +<a id="line-978" name="line-978"></a><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_tree_selection_path_is_selected</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">tree</span><span class="p">),</span><span class="w"> </span><span class="n">path</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-979" name="line-979"></a><span class="w"> </span><span class="n">row_selected_by_button_press_event</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-980" name="line-980"></a><span class="w"> </span><span class="p">}</span> +<a id="line-981" name="line-981"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-982" name="line-982"></a><span class="w"> </span><span class="p">}</span> +<a id="line-983" name="line-983"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-984" name="line-984"></a><span class="w"> </span><span class="n">gtk_tree_selection_unselect_all</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">tree</span><span class="p">));</span> +<a id="line-985" name="line-985"></a><span class="w"> </span><span class="p">}</span> +<a id="line-986" name="line-986"></a> +<a id="line-987" name="line-987"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="o">!</span><span class="p">(</span><span class="n">row_selected_by_button_press_event</span><span class="p">);</span> +<a id="line-988" name="line-988"></a><span class="p">}</span> +<a id="line-989" name="line-989"></a> +<a id="line-990" name="line-990"></a><span class="n">gboolean</span> +<a id="line-991" name="line-991"></a><span class="nf">file_key_press_event_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-992" name="line-992"></a><span class="w"> </span><span class="n">GdkEventKey</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">event</span><span class="p">,</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-994" name="line-994"></a><span class="p">{</span> +<a id="line-995" name="line-995"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">keyval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_KEY_space</span><span class="w"> </span><span class="o">||</span> +<a id="line-996" name="line-996"></a><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">keyval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_KEY_Return</span><span class="w"> </span><span class="o">||</span> +<a id="line-997" name="line-997"></a><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">keyval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_KEY_KP_Enter</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-998" name="line-998"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-999" name="line-999"></a><span class="w"> </span><span class="n">open_file_cb</span><span class="w"> </span><span class="p">((</span><span class="n">GtkMenuItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-1000" name="line-1000"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1001" name="line-1001"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1002" name="line-1002"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1003" name="line-1003"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">keyval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_KEY_Delete</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1004" name="line-1004"></a><span class="w"> </span><span class="n">move_to_trash_cb</span><span class="w"> </span><span class="p">((</span><span class="n">GtkAction</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-1005" name="line-1005"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1006" name="line-1006"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1007" name="line-1007"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1008" name="line-1008"></a><span class="p">}</span> +<a id="line-1009" name="line-1009"></a> +<a id="line-1010" name="line-1010"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-1011" name="line-1011"></a><span class="nf">open_with_list_sort</span><span class="w"> </span><span class="p">(</span><span class="n">gconstpointer</span><span class="w"> </span><span class="n">a</span><span class="p">,</span> +<a id="line-1012" name="line-1012"></a><span class="w"> </span><span class="n">gconstpointer</span><span class="w"> </span><span class="n">b</span><span class="p">)</span> +<a id="line-1013" name="line-1013"></a><span class="p">{</span> +<a id="line-1014" name="line-1014"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">a_app_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_app_info_get_name</span><span class="w"> </span><span class="p">((</span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">a</span><span class="p">);</span> +<a id="line-1015" name="line-1015"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">b_app_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_app_info_get_name</span><span class="w"> </span><span class="p">((</span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">b</span><span class="p">);</span> +<a id="line-1016" name="line-1016"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">a_utf8</span><span class="p">;</span> +<a id="line-1017" name="line-1017"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">b_utf8</span><span class="p">;</span> +<a id="line-1018" name="line-1018"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-1019" name="line-1019"></a> +<a id="line-1020" name="line-1020"></a><span class="w"> </span><span class="n">a_utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">a_app_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1021" name="line-1021"></a><span class="w"> </span><span class="n">b_utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">b_app_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1022" name="line-1022"></a> +<a id="line-1023" name="line-1023"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_collate</span><span class="w"> </span><span class="p">(</span><span class="n">a_utf8</span><span class="p">,</span><span class="w"> </span><span class="n">b_utf8</span><span class="p">);</span> +<a id="line-1024" name="line-1024"></a> +<a id="line-1025" name="line-1025"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">a_utf8</span><span class="p">);</span> +<a id="line-1026" name="line-1026"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">b_utf8</span><span class="p">);</span> +<a id="line-1027" name="line-1027"></a> +<a id="line-1028" name="line-1028"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-1029" name="line-1029"></a><span class="p">}</span> +<a id="line-1030" name="line-1030"></a> +<a id="line-1031" name="line-1031"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-1032" name="line-1032"></a><span class="nf">mate_image_menu_item_new_from_icon</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">icon_name</span><span class="p">,</span> +<a id="line-1033" name="line-1033"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">label_name</span><span class="p">)</span> +<a id="line-1034" name="line-1034"></a><span class="p">{</span> +<a id="line-1035" name="line-1035"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">concat</span><span class="p">;</span> +<a id="line-1036" name="line-1036"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">icon</span><span class="p">;</span> +<a id="line-1037" name="line-1037"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">box</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1038" name="line-1038"></a> +<a id="line-1039" name="line-1039"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">icon_name</span><span class="p">)</span> +<a id="line-1040" name="line-1040"></a><span class="w"> </span><span class="n">icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="n">icon_name</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">);</span> +<a id="line-1041" name="line-1041"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1042" name="line-1042"></a><span class="w"> </span><span class="n">icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1043" name="line-1043"></a> +<a id="line-1044" name="line-1044"></a><span class="w"> </span><span class="n">concat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">label_name</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1045" name="line-1045"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label_menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">concat</span><span class="p">);</span> +<a id="line-1046" name="line-1046"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">menuitem</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1047" name="line-1047"></a> +<a id="line-1048" name="line-1048"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">),</span><span class="w"> </span><span class="n">icon</span><span class="p">);</span> +<a id="line-1049" name="line-1049"></a> +<a id="line-1050" name="line-1050"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">),</span><span class="w"> </span><span class="n">label_menu</span><span class="p">);</span> +<a id="line-1051" name="line-1051"></a> +<a id="line-1052" name="line-1052"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span><span class="w"> </span><span class="n">box</span><span class="p">);</span> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span> +<a id="line-1054" name="line-1054"></a> +<a id="line-1055" name="line-1055"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">concat</span><span class="p">);</span> +<a id="line-1056" name="line-1056"></a> +<a id="line-1057" name="line-1057"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">menuitem</span><span class="p">;</span> +<a id="line-1058" name="line-1058"></a><span class="p">}</span> +<a id="line-1059" name="line-1059"></a> +<a id="line-1060" name="line-1060"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-1061" name="line-1061"></a><span class="nf">mate_image_menu_item_new_from_gicon</span><span class="w"> </span><span class="p">(</span><span class="n">GIcon</span><span class="w"> </span><span class="o">*</span><span class="n">icon_img</span><span class="p">,</span> +<a id="line-1062" name="line-1062"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">label_name</span><span class="p">)</span> +<a id="line-1063" name="line-1063"></a><span class="p">{</span> +<a id="line-1064" name="line-1064"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">concat</span><span class="p">;</span> +<a id="line-1065" name="line-1065"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">icon</span><span class="p">;</span> +<a id="line-1066" name="line-1066"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">box</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1067" name="line-1067"></a> +<a id="line-1068" name="line-1068"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">icon_img</span><span class="p">)</span> +<a id="line-1069" name="line-1069"></a><span class="w"> </span><span class="n">icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new_from_gicon</span><span class="w"> </span><span class="p">(</span><span class="n">icon_img</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">);</span> +<a id="line-1070" name="line-1070"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1071" name="line-1071"></a><span class="w"> </span><span class="n">icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1072" name="line-1072"></a> +<a id="line-1073" name="line-1073"></a><span class="w"> </span><span class="n">concat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">label_name</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1074" name="line-1074"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label_menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">concat</span><span class="p">);</span> +<a id="line-1075" name="line-1075"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">menuitem</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1076" name="line-1076"></a> +<a id="line-1077" name="line-1077"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">),</span><span class="w"> </span><span class="n">icon</span><span class="p">);</span> +<a id="line-1078" name="line-1078"></a> +<a id="line-1079" name="line-1079"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">),</span><span class="w"> </span><span class="n">label_menu</span><span class="p">);</span> +<a id="line-1080" name="line-1080"></a> +<a id="line-1081" name="line-1081"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span><span class="w"> </span><span class="n">box</span><span class="p">);</span> +<a id="line-1082" name="line-1082"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span> +<a id="line-1083" name="line-1083"></a> +<a id="line-1084" name="line-1084"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">concat</span><span class="p">);</span> +<a id="line-1085" name="line-1085"></a> +<a id="line-1086" name="line-1086"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">menuitem</span><span class="p">;</span> +<a id="line-1087" name="line-1087"></a><span class="p">}</span> +<a id="line-1088" name="line-1088"></a> +<a id="line-1089" name="line-1089"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-1090" name="line-1090"></a><span class="nf">mate_image_menu_item_new_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">icon_pixbuf</span><span class="p">,</span> +<a id="line-1091" name="line-1091"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">label_name</span><span class="p">)</span> +<a id="line-1092" name="line-1092"></a><span class="p">{</span> +<a id="line-1093" name="line-1093"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">concat</span><span class="p">;</span> +<a id="line-1094" name="line-1094"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">icon</span><span class="p">;</span> +<a id="line-1095" name="line-1095"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">box</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1096" name="line-1096"></a> +<a id="line-1097" name="line-1097"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">icon_pixbuf</span><span class="p">)</span> +<a id="line-1098" name="line-1098"></a><span class="w"> </span><span class="n">icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">icon_pixbuf</span><span class="p">);</span> +<a id="line-1099" name="line-1099"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1100" name="line-1100"></a><span class="w"> </span><span class="n">icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1101" name="line-1101"></a> +<a id="line-1102" name="line-1102"></a><span class="w"> </span><span class="n">concat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">label_name</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1103" name="line-1103"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label_menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">concat</span><span class="p">);</span> +<a id="line-1104" name="line-1104"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">menuitem</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1105" name="line-1105"></a> +<a id="line-1106" name="line-1106"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">),</span><span class="w"> </span><span class="n">icon</span><span class="p">);</span> +<a id="line-1107" name="line-1107"></a> +<a id="line-1108" name="line-1108"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">),</span><span class="w"> </span><span class="n">label_menu</span><span class="p">);</span> +<a id="line-1109" name="line-1109"></a> +<a id="line-1110" name="line-1110"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">menuitem</span><span class="p">),</span><span class="w"> </span><span class="n">box</span><span class="p">);</span> +<a id="line-1111" name="line-1111"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">menuitem</span><span class="p">);</span> +<a id="line-1112" name="line-1112"></a> +<a id="line-1113" name="line-1113"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">concat</span><span class="p">);</span> +<a id="line-1114" name="line-1114"></a> +<a id="line-1115" name="line-1115"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">menuitem</span><span class="p">;</span> +<a id="line-1116" name="line-1116"></a><span class="p">}</span> +<a id="line-1117" name="line-1117"></a> +<a id="line-1118" name="line-1118"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1119" name="line-1119"></a><span class="nf">build_popup_menu_for_file</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">,</span> +<a id="line-1120" name="line-1120"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">)</span> +<a id="line-1121" name="line-1121"></a><span class="p">{</span> +<a id="line-1122" name="line-1122"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">new1</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">separatormenuitem1</span><span class="p">;</span> +<a id="line-1123" name="line-1123"></a><span class="hll"><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">new2</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'new2' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'new2' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1124" name="line-1124"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-1125" name="line-1125"></a> +<a id="line-1126" name="line-1126"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1127" name="line-1127"></a><span class="w"> </span><span class="n">g_object_ref_sink</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">);</span> +<a id="line-1128" name="line-1128"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">);</span> +<a id="line-1129" name="line-1129"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1130" name="line-1130"></a> +<a id="line-1131" name="line-1131"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_submenu</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1132" name="line-1132"></a><span class="w"> </span><span class="n">g_object_ref_sink</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_submenu</span><span class="p">);</span> +<a id="line-1133" name="line-1133"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_submenu</span><span class="p">);</span> +<a id="line-1134" name="line-1134"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1135" name="line-1135"></a> +<a id="line-1136" name="line-1136"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1137" name="line-1137"></a> +<a id="line-1138" name="line-1138"></a><span class="w"> </span><span class="n">gtk_menu_set_reserve_toggle_size</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1139" name="line-1139"></a> +<a id="line-1140" name="line-1140"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_DIR</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1141" name="line-1141"></a><span class="w"> </span><span class="cm">/* Popup menu item: Open */</span> +<a id="line-1142" name="line-1142"></a><span class="w"> </span><span class="n">new1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_icon</span><span class="w"> </span><span class="p">(</span><span class="s">"document-open"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Open"</span><span class="p">));</span> +<a id="line-1143" name="line-1143"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">new1</span><span class="p">);</span> +<a id="line-1144" name="line-1144"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">);</span> +<a id="line-1145" name="line-1145"></a> +<a id="line-1146" name="line-1146"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-1147" name="line-1147"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_cb</span><span class="p">),</span> +<a id="line-1148" name="line-1148"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1149" name="line-1149"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1150" name="line-1150"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1151" name="line-1151"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_file</span><span class="p">;</span> +<a id="line-1152" name="line-1152"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_info</span><span class="p">;</span> +<a id="line-1153" name="line-1153"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-1154" name="line-1154"></a><span class="hll"><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">str</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'str' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'str' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1155" name="line-1155"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">list_length</span><span class="p">;</span> +<a id="line-1156" name="line-1156"></a><span class="w"> </span><span class="n">GIcon</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1157" name="line-1157"></a> +<a id="line-1158" name="line-1158"></a><span class="w"> </span><span class="n">g_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-1159" name="line-1159"></a><span class="w"> </span><span class="n">file_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_info</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_QUERY_INFO_NONE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1160" name="line-1160"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_app_info_get_all_for_type</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_get_content_type</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">));</span> +<a id="line-1161" name="line-1161"></a> +<a id="line-1162" name="line-1162"></a><span class="w"> </span><span class="n">list_length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_length</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span> +<a id="line-1163" name="line-1163"></a> +<a id="line-1164" name="line-1164"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">list_length</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1165" name="line-1165"></a> +<a id="line-1166" name="line-1166"></a><span class="w"> </span><span class="cm">/* Popup menu item: Open */</span> +<a id="line-1167" name="line-1167"></a><span class="w"> </span><span class="n">new1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_icon</span><span class="w"> </span><span class="p">(</span><span class="s">"document-open"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Open"</span><span class="p">));</span> +<a id="line-1168" name="line-1168"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">new1</span><span class="p">);</span> +<a id="line-1169" name="line-1169"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">);</span> +<a id="line-1170" name="line-1170"></a> +<a id="line-1171" name="line-1171"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-1172" name="line-1172"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_cb</span><span class="p">),</span> +<a id="line-1173" name="line-1173"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1174" name="line-1174"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1175" name="line-1175"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1176" name="line-1176"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">list_length</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">3</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* Sort all except first application by name */</span> +<a id="line-1177" name="line-1177"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">tmp</span><span class="p">;</span> +<a id="line-1178" name="line-1178"></a> +<a id="line-1179" name="line-1179"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_first</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span> +<a id="line-1180" name="line-1180"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_remove_link</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">tmp</span><span class="p">);</span> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_sort</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">open_with_list_sort</span><span class="p">);</span> +<a id="line-1182" name="line-1182"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_prepend</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">tmp</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-1184" name="line-1184"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1185" name="line-1185"></a> +<a id="line-1186" name="line-1186"></a><span class="w"> </span><span class="cm">/* Popup menu item: Open with (default) */</span> +<a id="line-1187" name="line-1187"></a> +<a id="line-1188" name="line-1188"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info_get_icon</span><span class="w"> </span><span class="p">((</span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1189" name="line-1189"></a><span class="w"> </span><span class="n">file_icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info_get_icon</span><span class="w"> </span><span class="p">((</span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">));</span> +<a id="line-1190" name="line-1190"></a> +<a id="line-1191" name="line-1191"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file_icon</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1192" name="line-1192"></a><span class="w"> </span><span class="n">file_icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_themed_icon_new</span><span class="w"> </span><span class="p">(</span><span class="s">"gtk-open"</span><span class="p">);</span> +<a id="line-1193" name="line-1193"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1194" name="line-1194"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1195" name="line-1195"></a> +<a id="line-1196" name="line-1196"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Open with %s"</span><span class="p">),</span><span class="w"> </span><span class="n">g_app_info_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">));</span> +<a id="line-1197" name="line-1197"></a><span class="w"> </span><span class="n">new1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_gicon</span><span class="w"> </span><span class="p">(</span><span class="n">file_icon</span><span class="p">,</span><span class="w"> </span><span class="n">str</span><span class="p">);</span> +<a id="line-1198" name="line-1198"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-1199" name="line-1199"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">);</span> +<a id="line-1200" name="line-1200"></a> +<a id="line-1201" name="line-1201"></a><span class="w"> </span><span class="n">g_object_set_data_full</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">),</span><span class="w"> </span><span class="s">"app"</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">,</span> +<a id="line-1202" name="line-1202"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="p">);</span> +<a id="line-1203" name="line-1203"></a> +<a id="line-1204" name="line-1204"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">new1</span><span class="p">);</span> +<a id="line-1205" name="line-1205"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">((</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">new1</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_cb</span><span class="p">),</span> +<a id="line-1206" name="line-1206"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1207" name="line-1207"></a> +<a id="line-1208" name="line-1208"></a><span class="w"> </span><span class="n">separatormenuitem1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_separator_menu_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1209" name="line-1209"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">separatormenuitem1</span><span class="p">);</span> +<a id="line-1210" name="line-1210"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">separatormenuitem1</span><span class="p">);</span> +<a id="line-1211" name="line-1211"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">separatormenuitem1</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1212" name="line-1212"></a> +<a id="line-1213" name="line-1213"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_next</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">),</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_next</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">),</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1214" name="line-1214"></a> +<a id="line-1215" name="line-1215"></a><span class="w"> </span><span class="cm">/* Popup menu item: Open with (others) */</span> +<a id="line-1216" name="line-1216"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">list_length</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">4</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1217" name="line-1217"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Open with %s"</span><span class="p">),</span><span class="w"> </span><span class="n">g_app_info_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">));</span> +<a id="line-1218" name="line-1218"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1219" name="line-1219"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1220" name="line-1220"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">g_app_info_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">));</span> +<a id="line-1221" name="line-1221"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1222" name="line-1222"></a> +<a id="line-1223" name="line-1223"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">icon_done</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1224" name="line-1224"></a> +<a id="line-1225" name="line-1225"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">list_length</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">4</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1226" name="line-1226"></a> +<a id="line-1227" name="line-1227"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info_get_icon</span><span class="w"> </span><span class="p">((</span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1228" name="line-1228"></a><span class="w"> </span><span class="n">file_icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info_get_icon</span><span class="w"> </span><span class="p">((</span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">));</span> +<a id="line-1229" name="line-1229"></a> +<a id="line-1230" name="line-1230"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file_icon</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1231" name="line-1231"></a><span class="w"> </span><span class="n">file_icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_themed_icon_new</span><span class="w"> </span><span class="p">(</span><span class="s">"gtk-open"</span><span class="p">);</span> +<a id="line-1232" name="line-1232"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1233" name="line-1233"></a> +<a id="line-1234" name="line-1234"></a><span class="w"> </span><span class="n">icon_done</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1235" name="line-1235"></a><span class="w"> </span><span class="n">new1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_gicon</span><span class="w"> </span><span class="p">(</span><span class="n">file_icon</span><span class="p">,</span><span class="w"> </span><span class="n">str</span><span class="p">);</span> +<a id="line-1236" name="line-1236"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file_icon</span><span class="p">);</span> +<a id="line-1237" name="line-1237"></a> +<a id="line-1238" name="line-1238"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1239" name="line-1239"></a> +<a id="line-1240" name="line-1240"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1241" name="line-1241"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_submenu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1242" name="line-1242"></a> +<a id="line-1243" name="line-1243"></a><span class="w"> </span><span class="n">gtk_menu_set_reserve_toggle_size</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_submenu</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1244" name="line-1244"></a> +<a id="line-1245" name="line-1245"></a><span class="w"> </span><span class="cm">/* Popup menu item: Open With */</span> +<a id="line-1246" name="line-1246"></a><span class="w"> </span><span class="n">new2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_icon</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Open Wit_h"</span><span class="p">));</span> +<a id="line-1247" name="line-1247"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">new2</span><span class="p">);</span> +<a id="line-1248" name="line-1248"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">new2</span><span class="p">);</span> +<a id="line-1249" name="line-1249"></a> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="n">gtk_menu_item_set_submenu</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">new2</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_submenu</span><span class="p">);</span> +<a id="line-1251" name="line-1251"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1252" name="line-1252"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_submenu</span><span class="p">),</span><span class="w"> </span><span class="n">new1</span><span class="p">);</span> +<a id="line-1253" name="line-1253"></a> +<a id="line-1254" name="line-1254"></a><span class="w"> </span><span class="cm">/* For submenu items, the "activate" signal is only emitted if the user first clicks</span> +<a id="line-1255" name="line-1255"></a><span class="cm"> on the parent menu item. Since submenus in gtk+ are automatically displayed when</span> +<a id="line-1256" name="line-1256"></a><span class="cm"> the user hovers over them, most will never click on the parent menu item.</span> +<a id="line-1257" name="line-1257"></a><span class="cm"> The work-around is to connect to "button-press-event". */</span> +<a id="line-1258" name="line-1258"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">,</span><span class="w"> </span><span class="s">"button-press-event"</span><span class="p">,</span> +<a id="line-1259" name="line-1259"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_event_cb</span><span class="p">),</span> +<a id="line-1260" name="line-1260"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1261" name="line-1261"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1262" name="line-1262"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1263" name="line-1263"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info_get_icon</span><span class="w"> </span><span class="p">((</span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1264" name="line-1264"></a> +<a id="line-1265" name="line-1265"></a><span class="w"> </span><span class="n">file_icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info_get_icon</span><span class="w"> </span><span class="p">((</span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">));</span> +<a id="line-1266" name="line-1266"></a> +<a id="line-1267" name="line-1267"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file_icon</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1268" name="line-1268"></a><span class="w"> </span><span class="n">file_icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_themed_icon_new</span><span class="w"> </span><span class="p">(</span><span class="s">"gtk-open"</span><span class="p">);</span> +<a id="line-1269" name="line-1269"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1270" name="line-1270"></a> +<a id="line-1271" name="line-1271"></a><span class="w"> </span><span class="n">icon_done</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1272" name="line-1272"></a><span class="w"> </span><span class="n">new1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_gicon</span><span class="w"> </span><span class="p">(</span><span class="n">file_icon</span><span class="p">,</span><span class="w"> </span><span class="n">str</span><span class="p">);</span> +<a id="line-1273" name="line-1273"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file_icon</span><span class="p">);</span> +<a id="line-1274" name="line-1274"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1275" name="line-1275"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">new1</span><span class="p">);</span> +<a id="line-1276" name="line-1276"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">((</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">new1</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_cb</span><span class="p">),</span> +<a id="line-1277" name="line-1277"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1278" name="line-1278"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1279" name="line-1279"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">icon_done</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span> +<a id="line-1280" name="line-1280"></a><span class="w"> </span><span class="n">new1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_icon</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">str</span><span class="p">);</span> +<a id="line-1281" name="line-1281"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-1282" name="line-1282"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">);</span> +<a id="line-1283" name="line-1283"></a> +<a id="line-1284" name="line-1284"></a><span class="w"> </span><span class="n">g_object_set_data_full</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">),</span><span class="w"> </span><span class="s">"app"</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">,</span> +<a id="line-1285" name="line-1285"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="p">);</span> +<a id="line-1286" name="line-1286"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1287" name="line-1287"></a> +<a id="line-1288" name="line-1288"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">list_length</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1289" name="line-1289"></a><span class="w"> </span><span class="n">separatormenuitem1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_separator_menu_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1290" name="line-1290"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">separatormenuitem1</span><span class="p">);</span> +<a id="line-1291" name="line-1291"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">separatormenuitem1</span><span class="p">);</span> +<a id="line-1292" name="line-1292"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1293" name="line-1293"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1294" name="line-1294"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1295" name="line-1295"></a> +<a id="line-1296" name="line-1296"></a><span class="w"> </span><span class="cm">/* Popup menu item: Open Containing Folder */</span> +<a id="line-1297" name="line-1297"></a><span class="w"> </span><span class="n">new1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_icon</span><span class="w"> </span><span class="p">(</span><span class="s">"document-open"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Open Containing _Folder"</span><span class="p">));</span> +<a id="line-1298" name="line-1298"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">new1</span><span class="p">);</span> +<a id="line-1299" name="line-1299"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">);</span> +<a id="line-1300" name="line-1300"></a> +<a id="line-1301" name="line-1301"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-1302" name="line-1302"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">open_folder_cb</span><span class="p">),</span> +<a id="line-1303" name="line-1303"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1304" name="line-1304"></a> +<a id="line-1305" name="line-1305"></a><span class="w"> </span><span class="cm">/* Popup menu item: Copy Path */</span> +<a id="line-1306" name="line-1306"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1307" name="line-1307"></a><span class="w"> </span><span class="n">new1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_icon</span><span class="w"> </span><span class="p">(</span><span class="s">"edit-copy"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Copy _Path"</span><span class="p">));</span> +<a id="line-1308" name="line-1308"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">new1</span><span class="p">);</span> +<a id="line-1309" name="line-1309"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">);</span> +<a id="line-1310" name="line-1310"></a> +<a id="line-1311" name="line-1311"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-1312" name="line-1312"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">copy_path_cb</span><span class="p">),</span> +<a id="line-1313" name="line-1313"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1314" name="line-1314"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1315" name="line-1315"></a> +<a id="line-1316" name="line-1316"></a><span class="w"> </span><span class="cm">/* Popup menu item: Move to Trash */</span> +<a id="line-1317" name="line-1317"></a><span class="w"> </span><span class="n">separatormenuitem1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_separator_menu_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1318" name="line-1318"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">separatormenuitem1</span><span class="p">);</span> +<a id="line-1319" name="line-1319"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">separatormenuitem1</span><span class="p">);</span> +<a id="line-1320" name="line-1320"></a> +<a id="line-1321" name="line-1321"></a><span class="w"> </span><span class="n">GtkIconTheme</span><span class="w"> </span><span class="o">*</span><span class="n">icon_theme</span><span class="p">;</span> +<a id="line-1322" name="line-1322"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-1323" name="line-1323"></a><span class="w"> </span><span class="n">icon_theme</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_icon_theme_get_default</span><span class="w"> </span><span class="p">();</span> +<a id="line-1324" name="line-1324"></a><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_icon_theme_load_icon</span><span class="w"> </span><span class="p">(</span><span class="n">icon_theme</span><span class="p">,</span><span class="w"> </span><span class="s">"user-trash"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1325" name="line-1325"></a> +<a id="line-1326" name="line-1326"></a><span class="w"> </span><span class="n">new1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Mo_ve to Trash"</span><span class="p">));</span> +<a id="line-1327" name="line-1327"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">new1</span><span class="p">);</span> +<a id="line-1328" name="line-1328"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">);</span> +<a id="line-1329" name="line-1329"></a> +<a id="line-1330" name="line-1330"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">new1</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-1331" name="line-1331"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">move_to_trash_cb</span><span class="p">),</span> +<a id="line-1332" name="line-1332"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1333" name="line-1333"></a> +<a id="line-1334" name="line-1334"></a><span class="w"> </span><span class="cm">/* Popup menu item: Save Results As... */</span> +<a id="line-1335" name="line-1335"></a><span class="w"> </span><span class="n">separatormenuitem1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_separator_menu_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1336" name="line-1336"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">separatormenuitem1</span><span class="p">);</span> +<a id="line-1337" name="line-1337"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">separatormenuitem1</span><span class="p">);</span> +<a id="line-1338" name="line-1338"></a> +<a id="line-1339" name="line-1339"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_save_results_as_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mate_image_menu_item_new_from_icon</span><span class="w"> </span><span class="p">(</span><span class="s">"document-save"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Save Results As..."</span><span class="p">));</span> +<a id="line-1340" name="line-1340"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_save_results_as_item</span><span class="p">);</span> +<a id="line-1341" name="line-1341"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_save_results_as_item</span><span class="p">);</span> +<a id="line-1342" name="line-1342"></a> +<a id="line-1343" name="line-1343"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">RUNNING</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1344" name="line-1344"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_save_results_as_item</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1345" name="line-1345"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1346" name="line-1346"></a> +<a id="line-1347" name="line-1347"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_save_results_as_item</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-1348" name="line-1348"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">show_file_selector_cb</span><span class="p">),</span> +<a id="line-1349" name="line-1349"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1350" name="line-1350"></a><span class="p">}</span> +<a id="line-1351" name="line-1351"></a> +<a id="line-1352" name="line-1352"></a><span class="n">gboolean</span> +<a id="line-1353" name="line-1353"></a><span class="nf">file_button_release_event_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-1354" name="line-1354"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">event</span><span class="p">,</span> +<a id="line-1355" name="line-1355"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1356" name="line-1356"></a><span class="p">{</span> +<a id="line-1357" name="line-1357"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1358" name="line-1358"></a> +<a id="line-1359" name="line-1359"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">window</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">gtk_tree_view_get_bin_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1360" name="line-1360"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1361" name="line-1361"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1362" name="line-1362"></a> +<a id="line-1363" name="line-1363"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1364" name="line-1364"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">;</span> +<a id="line-1365" name="line-1365"></a> +<a id="line-1366" name="line-1366"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_path_at_pos</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y</span><span class="p">,</span> +<a id="line-1367" name="line-1367"></a><span class="w"> </span><span class="o">&</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1368" name="line-1368"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">event</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GDK_SHIFT_MASK</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1369" name="line-1369"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">row_selected_by_button_press_event</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1370" name="line-1370"></a><span class="w"> </span><span class="n">gtk_tree_selection_select_path</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">)),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-1371" name="line-1371"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1372" name="line-1372"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1373" name="line-1373"></a><span class="w"> </span><span class="n">gtk_tree_selection_unselect_path</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">)),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-1374" name="line-1374"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1375" name="line-1375"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1376" name="line-1376"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1377" name="line-1377"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_search_results_single_click_to_activate</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1378" name="line-1378"></a><span class="w"> </span><span class="n">gtk_tree_selection_unselect_all</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">)));</span> +<a id="line-1379" name="line-1379"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1380" name="line-1380"></a><span class="w"> </span><span class="n">gtk_tree_selection_select_path</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">)),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-1381" name="line-1381"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1382" name="line-1382"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1383" name="line-1383"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-1384" name="line-1384"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1385" name="line-1385"></a> +<a id="line-1386" name="line-1386"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1387" name="line-1387"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1388" name="line-1388"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1389" name="line-1389"></a> +<a id="line-1390" name="line-1390"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">3</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1391" name="line-1391"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">no_files_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1392" name="line-1392"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-1393" name="line-1393"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1394" name="line-1394"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-1395" name="line-1395"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_name_first</span><span class="p">;</span> +<a id="line-1396" name="line-1396"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale_file_first</span><span class="p">;</span> +<a id="line-1397" name="line-1397"></a> +<a id="line-1398" name="line-1398"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-1399" name="line-1399"></a><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">);</span> +<a id="line-1400" name="line-1400"></a> +<a id="line-1401" name="line-1401"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1402" name="line-1402"></a><span class="w"> </span><span class="n">g_list_first</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">)</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-1403" name="line-1403"></a> +<a id="line-1404" name="line-1404"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1405" name="line-1405"></a><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">utf8_name_first</span><span class="p">,</span> +<a id="line-1406" name="line-1406"></a><span class="w"> </span><span class="n">COLUMN_LOCALE_FILE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">locale_file_first</span><span class="p">,</span> +<a id="line-1407" name="line-1407"></a><span class="w"> </span><span class="n">COLUMN_NO_FILES_FOUND</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">no_files_found</span><span class="p">,</span> +<a id="line-1408" name="line-1408"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1409" name="line-1409"></a> +<a id="line-1410" name="line-1410"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">no_files_found</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1411" name="line-1411"></a> +<a id="line-1412" name="line-1412"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">show_app_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1413" name="line-1413"></a><span class="w"> </span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">first_app_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1414" name="line-1414"></a><span class="w"> </span><span class="n">GTimer</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">timer</span><span class="p">;</span> +<a id="line-1415" name="line-1415"></a><span class="hll"><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">tmp</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'tmp' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'tmp' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1416" name="line-1416"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale_file_tmp</span><span class="p">;</span> +<a id="line-1417" name="line-1417"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1418" name="line-1418"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-1419" name="line-1419"></a> +<a id="line-1420" name="line-1420"></a><span class="w"> </span><span class="n">timer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timer_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1421" name="line-1421"></a><span class="w"> </span><span class="n">g_timer_start</span><span class="w"> </span><span class="p">(</span><span class="n">timer</span><span class="p">);</span> +<a id="line-1422" name="line-1422"></a> +<a id="line-1423" name="line-1423"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_list_length</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">)</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1424" name="line-1424"></a> +<a id="line-1425" name="line-1425"></a><span class="w"> </span><span class="cm">/* Verify the selected files each have the same default handler. */</span> +<a id="line-1426" name="line-1426"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_first</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">),</span><span class="w"> </span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_next</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">),</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1427" name="line-1427"></a> +<a id="line-1428" name="line-1428"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_file</span><span class="p">;</span> +<a id="line-1429" name="line-1429"></a><span class="w"> </span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">app_info</span><span class="p">;</span> +<a id="line-1430" name="line-1430"></a> +<a id="line-1431" name="line-1431"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1432" name="line-1432"></a><span class="w"> </span><span class="n">tmp</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-1433" name="line-1433"></a> +<a id="line-1434" name="line-1434"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1435" name="line-1435"></a><span class="w"> </span><span class="n">COLUMN_LOCALE_FILE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">locale_file_tmp</span><span class="p">,</span> +<a id="line-1436" name="line-1436"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1437" name="line-1437"></a> +<a id="line-1438" name="line-1438"></a><span class="w"> </span><span class="n">g_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file_tmp</span><span class="p">);</span> +<a id="line-1439" name="line-1439"></a><span class="w"> </span><span class="n">app_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_default_handler</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1440" name="line-1440"></a> +<a id="line-1441" name="line-1441"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">G_IS_APP_INFO</span><span class="w"> </span><span class="p">(</span><span class="n">app_info</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1442" name="line-1442"></a><span class="w"> </span><span class="n">show_app_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1443" name="line-1443"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1444" name="line-1444"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1445" name="line-1445"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1446" name="line-1446"></a><span class="w"> </span><span class="n">first_app_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_app_info_dup</span><span class="w"> </span><span class="p">(</span><span class="n">app_info</span><span class="p">);</span> +<a id="line-1447" name="line-1447"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">app_info</span><span class="p">);</span> +<a id="line-1448" name="line-1448"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-1449" name="line-1449"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1450" name="line-1450"></a> +<a id="line-1451" name="line-1451"></a><span class="w"> </span><span class="n">show_app_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_app_info_equal</span><span class="w"> </span><span class="p">(</span><span class="n">app_info</span><span class="p">,</span><span class="w"> </span><span class="n">first_app_info</span><span class="p">);</span> +<a id="line-1452" name="line-1452"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">app_info</span><span class="p">);</span> +<a id="line-1453" name="line-1453"></a> +<a id="line-1454" name="line-1454"></a><span class="w"> </span><span class="cm">/* Break out, if more that 1.5 seconds have passed */</span> +<a id="line-1455" name="line-1455"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_timer_elapsed</span><span class="w"> </span><span class="p">(</span><span class="n">timer</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mf">1.50</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1456" name="line-1456"></a><span class="w"> </span><span class="n">show_app_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1457" name="line-1457"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1458" name="line-1458"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1459" name="line-1459"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">);</span> +<a id="line-1460" name="line-1460"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file_tmp</span><span class="p">);</span> +<a id="line-1461" name="line-1461"></a> +<a id="line-1462" name="line-1462"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">show_app_list</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1463" name="line-1463"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1464" name="line-1464"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1465" name="line-1465"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1466" name="line-1466"></a><span class="w"> </span><span class="n">g_timer_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">timer</span><span class="p">);</span> +<a id="line-1467" name="line-1467"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">first_app_info</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1468" name="line-1468"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">first_app_info</span><span class="p">);</span> +<a id="line-1469" name="line-1469"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1470" name="line-1470"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1471" name="line-1471"></a> +<a id="line-1472" name="line-1472"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(((</span><span class="n">show_app_list</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">locale_file_first</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-1473" name="line-1473"></a> +<a id="line-1474" name="line-1474"></a><span class="w"> </span><span class="n">build_popup_menu_for_file</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-1475" name="line-1475"></a><span class="w"> </span><span class="n">gtk_menu_popup_at_pointer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span> +<a id="line-1476" name="line-1476"></a><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">GdkEvent</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">event</span><span class="p">);</span> +<a id="line-1477" name="line-1477"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-1478" name="line-1478"></a> +<a id="line-1479" name="line-1479"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1480" name="line-1480"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file_first</span><span class="p">);</span> +<a id="line-1481" name="line-1481"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_name_first</span><span class="p">);</span> +<a id="line-1482" name="line-1482"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-1483" name="line-1483"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1484" name="line-1484"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1485" name="line-1485"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_search_results_single_click_to_activate</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1486" name="line-1486"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GDK_SHIFT_MASK</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1487" name="line-1487"></a><span class="w"> </span><span class="n">open_file_cb</span><span class="w"> </span><span class="p">((</span><span class="n">GtkMenuItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-1488" name="line-1488"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1489" name="line-1489"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1490" name="line-1490"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1491" name="line-1491"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1492" name="line-1492"></a><span class="p">}</span> +<a id="line-1493" name="line-1493"></a> +<a id="line-1494" name="line-1494"></a><span class="n">gboolean</span> +<a id="line-1495" name="line-1495"></a><span class="nf">file_event_after_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-1496" name="line-1496"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">event</span><span class="p">,</span> +<a id="line-1497" name="line-1497"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1498" name="line-1498"></a><span class="p">{</span> +<a id="line-1499" name="line-1499"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1500" name="line-1500"></a> +<a id="line-1501" name="line-1501"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">window</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">gtk_tree_view_get_bin_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1502" name="line-1502"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1503" name="line-1503"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1504" name="line-1504"></a> +<a id="line-1505" name="line-1505"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1506" name="line-1506"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1507" name="line-1507"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1508" name="line-1508"></a> +<a id="line-1509" name="line-1509"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GDK_SHIFT_MASK</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1510" name="line-1510"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_search_results_single_click_to_activate</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1511" name="line-1511"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_2BUTTON_PRESS</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1512" name="line-1512"></a><span class="w"> </span><span class="n">open_file_cb</span><span class="w"> </span><span class="p">((</span><span class="n">GtkMenuItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-1513" name="line-1513"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1514" name="line-1514"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1515" name="line-1515"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1516" name="line-1516"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1517" name="line-1517"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1518" name="line-1518"></a><span class="p">}</span> +<a id="line-1519" name="line-1519"></a> +<a id="line-1520" name="line-1520"></a><span class="n">gboolean</span> +<a id="line-1521" name="line-1521"></a><span class="nf">file_motion_notify_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1522" name="line-1522"></a><span class="w"> </span><span class="n">GdkEventMotion</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-1523" name="line-1523"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1524" name="line-1524"></a><span class="p">{</span> +<a id="line-1525" name="line-1525"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1526" name="line-1526"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-1527" name="line-1527"></a><span class="w"> </span><span class="n">GdkCursor</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">cursor</span><span class="p">;</span> +<a id="line-1528" name="line-1528"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">last_hover_path</span><span class="p">;</span> +<a id="line-1529" name="line-1529"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1530" name="line-1530"></a> +<a id="line-1531" name="line-1531"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">));</span> +<a id="line-1532" name="line-1532"></a> +<a id="line-1533" name="line-1533"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_search_results_single_click_to_activate</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1534" name="line-1534"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1535" name="line-1535"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1536" name="line-1536"></a> +<a id="line-1537" name="line-1537"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">window</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">gtk_tree_view_get_bin_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1538" name="line-1538"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1539" name="line-1539"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1540" name="line-1540"></a> +<a id="line-1541" name="line-1541"></a><span class="w"> </span><span class="n">last_hover_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="p">;</span> +<a id="line-1542" name="line-1542"></a> +<a id="line-1543" name="line-1543"></a><span class="w"> </span><span class="n">gtk_tree_view_get_path_at_pos</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span> +<a id="line-1544" name="line-1544"></a><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y</span><span class="p">,</span> +<a id="line-1545" name="line-1545"></a><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="p">,</span> +<a id="line-1546" name="line-1546"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1547" name="line-1547"></a> +<a id="line-1548" name="line-1548"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1549" name="line-1549"></a><span class="w"> </span><span class="n">cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_HAND2</span><span class="p">);</span> +<a id="line-1550" name="line-1550"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1551" name="line-1551"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1552" name="line-1552"></a><span class="w"> </span><span class="n">cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1553" name="line-1553"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1554" name="line-1554"></a> +<a id="line-1555" name="line-1555"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">cursor</span><span class="p">);</span> +<a id="line-1556" name="line-1556"></a> +<a id="line-1557" name="line-1557"></a><span class="w"> </span><span class="cm">/* Redraw if the hover row has changed */</span> +<a id="line-1558" name="line-1558"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="n">last_hover_path</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-1559" name="line-1559"></a><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="n">last_hover_path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-1560" name="line-1560"></a><span class="w"> </span><span class="n">gtk_tree_path_compare</span><span class="w"> </span><span class="p">(</span><span class="n">last_hover_path</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1561" name="line-1561"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">last_hover_path</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1562" name="line-1562"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span> +<a id="line-1563" name="line-1563"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">last_hover_path</span><span class="p">);</span> +<a id="line-1564" name="line-1564"></a><span class="w"> </span><span class="n">gtk_tree_model_row_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span> +<a id="line-1565" name="line-1565"></a><span class="w"> </span><span class="n">last_hover_path</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1566" name="line-1566"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1567" name="line-1567"></a> +<a id="line-1568" name="line-1568"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1569" name="line-1569"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span> +<a id="line-1570" name="line-1570"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="p">);</span> +<a id="line-1571" name="line-1571"></a><span class="w"> </span><span class="n">gtk_tree_model_row_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span> +<a id="line-1572" name="line-1572"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1573" name="line-1573"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1574" name="line-1574"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1575" name="line-1575"></a> +<a id="line-1576" name="line-1576"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">last_hover_path</span><span class="p">);</span> +<a id="line-1577" name="line-1577"></a> +<a id="line-1578" name="line-1578"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1579" name="line-1579"></a><span class="p">}</span> +<a id="line-1580" name="line-1580"></a> +<a id="line-1581" name="line-1581"></a><span class="n">gboolean</span> +<a id="line-1582" name="line-1582"></a><span class="nf">file_leave_notify_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1583" name="line-1583"></a><span class="w"> </span><span class="n">GdkEventCrossing</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-1584" name="line-1584"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1585" name="line-1585"></a><span class="p">{</span> +<a id="line-1586" name="line-1586"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1587" name="line-1587"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1588" name="line-1588"></a> +<a id="line-1589" name="line-1589"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_search_results_single_click_to_activate</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1590" name="line-1590"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span> +<a id="line-1591" name="line-1591"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1592" name="line-1592"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="p">);</span> +<a id="line-1593" name="line-1593"></a><span class="w"> </span><span class="n">gtk_tree_model_row_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span> +<a id="line-1594" name="line-1594"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="p">,</span> +<a id="line-1595" name="line-1595"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1596" name="line-1596"></a> +<a id="line-1597" name="line-1597"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="p">);</span> +<a id="line-1598" name="line-1598"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1599" name="line-1599"></a> +<a id="line-1600" name="line-1600"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1601" name="line-1601"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1602" name="line-1602"></a> +<a id="line-1603" name="line-1603"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1604" name="line-1604"></a><span class="p">}</span> +<a id="line-1605" name="line-1605"></a> +<a id="line-1606" name="line-1606"></a><span class="kt">void</span> +<a id="line-1607" name="line-1607"></a><span class="nf">drag_begin_file_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-1608" name="line-1608"></a><span class="w"> </span><span class="n">GdkDragContext</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">context</span><span class="p">,</span> +<a id="line-1609" name="line-1609"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1610" name="line-1610"></a><span class="p">{</span> +<a id="line-1611" name="line-1611"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1612" name="line-1612"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">number_of_selected_rows</span><span class="p">;</span> +<a id="line-1613" name="line-1613"></a> +<a id="line-1614" name="line-1614"></a><span class="w"> </span><span class="n">number_of_selected_rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">));</span> +<a id="line-1615" name="line-1615"></a> +<a id="line-1616" name="line-1616"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">number_of_selected_rows</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1617" name="line-1617"></a><span class="w"> </span><span class="n">gtk_drag_set_icon_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-dnd-multiple"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1618" name="line-1618"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1619" name="line-1619"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">number_of_selected_rows</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1620" name="line-1620"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-1621" name="line-1621"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-1622" name="line-1622"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1623" name="line-1623"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-1624" name="line-1624"></a> +<a id="line-1625" name="line-1625"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-1626" name="line-1626"></a><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">);</span> +<a id="line-1627" name="line-1627"></a> +<a id="line-1628" name="line-1628"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1629" name="line-1629"></a><span class="w"> </span><span class="n">g_list_first</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">)</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-1630" name="line-1630"></a> +<a id="line-1631" name="line-1631"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1632" name="line-1632"></a><span class="w"> </span><span class="n">COLUMN_ICON</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">pixbuf</span><span class="p">,</span> +<a id="line-1633" name="line-1633"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1634" name="line-1634"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-1635" name="line-1635"></a> +<a id="line-1636" name="line-1636"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1637" name="line-1637"></a><span class="w"> </span><span class="n">gtk_drag_set_icon_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1638" name="line-1638"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1639" name="line-1639"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1640" name="line-1640"></a><span class="w"> </span><span class="n">gtk_drag_set_icon_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-dnd"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1641" name="line-1641"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1642" name="line-1642"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1643" name="line-1643"></a><span class="p">}</span> +<a id="line-1644" name="line-1644"></a> +<a id="line-1645" name="line-1645"></a><span class="kt">void</span> +<a id="line-1646" name="line-1646"></a><span class="nf">drag_file_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-1647" name="line-1647"></a><span class="w"> </span><span class="n">GdkDragContext</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">context</span><span class="p">,</span> +<a id="line-1648" name="line-1648"></a><span class="w"> </span><span class="n">GtkSelectionData</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">selection_data</span><span class="p">,</span> +<a id="line-1649" name="line-1649"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">info</span><span class="p">,</span> +<a id="line-1650" name="line-1650"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">drag_time</span><span class="p">,</span> +<a id="line-1651" name="line-1651"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1652" name="line-1652"></a><span class="p">{</span> +<a id="line-1653" name="line-1653"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1654" name="line-1654"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">uri_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1655" name="line-1655"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-1656" name="line-1656"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-1657" name="line-1657"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1658" name="line-1658"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-1659" name="line-1659"></a> +<a id="line-1660" name="line-1660"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1661" name="line-1661"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1662" name="line-1662"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1663" name="line-1663"></a> +<a id="line-1664" name="line-1664"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-1665" name="line-1665"></a><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">);</span> +<a id="line-1666" name="line-1666"></a> +<a id="line-1667" name="line-1667"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">g_list_length</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1668" name="line-1668"></a> +<a id="line-1669" name="line-1669"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">no_files_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1670" name="line-1670"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_name</span><span class="p">;</span> +<a id="line-1671" name="line-1671"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale_file</span><span class="p">;</span> +<a id="line-1672" name="line-1672"></a> +<a id="line-1673" name="line-1673"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1674" name="line-1674"></a><span class="w"> </span><span class="n">g_list_nth_data</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">idx</span><span class="p">));</span> +<a id="line-1675" name="line-1675"></a> +<a id="line-1676" name="line-1676"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1677" name="line-1677"></a><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">utf8_name</span><span class="p">,</span> +<a id="line-1678" name="line-1678"></a><span class="w"> </span><span class="n">COLUMN_LOCALE_FILE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">locale_file</span><span class="p">,</span> +<a id="line-1679" name="line-1679"></a><span class="w"> </span><span class="n">COLUMN_NO_FILES_FOUND</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">no_files_found</span><span class="p">,</span> +<a id="line-1680" name="line-1680"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1681" name="line-1681"></a> +<a id="line-1682" name="line-1682"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">no_files_found</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1683" name="line-1683"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">tmp_uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_to_uri</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1684" name="line-1684"></a> +<a id="line-1685" name="line-1685"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">uri_list</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1686" name="line-1686"></a><span class="w"> </span><span class="n">uri_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">tmp_uri</span><span class="p">);</span> +<a id="line-1687" name="line-1687"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1688" name="line-1688"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1689" name="line-1689"></a><span class="w"> </span><span class="n">uri_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">uri_list</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">tmp_uri</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1690" name="line-1690"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1691" name="line-1691"></a><span class="w"> </span><span class="n">gtk_selection_data_set</span><span class="w"> </span><span class="p">(</span><span class="n">selection_data</span><span class="p">,</span> +<a id="line-1692" name="line-1692"></a><span class="w"> </span><span class="n">gtk_selection_data_get_target</span><span class="w"> </span><span class="p">(</span><span class="n">selection_data</span><span class="p">),</span> +<a id="line-1693" name="line-1693"></a><span class="w"> </span><span class="mi">8</span><span class="p">,</span> +<a id="line-1694" name="line-1694"></a><span class="w"> </span><span class="p">(</span><span class="n">guchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">uri_list</span><span class="p">,</span> +<a id="line-1695" name="line-1695"></a><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">uri_list</span><span class="p">));</span> +<a id="line-1696" name="line-1696"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp_uri</span><span class="p">);</span> +<a id="line-1697" name="line-1697"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1698" name="line-1698"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1699" name="line-1699"></a><span class="w"> </span><span class="n">gtk_selection_data_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">selection_data</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1700" name="line-1700"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1701" name="line-1701"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_name</span><span class="p">);</span> +<a id="line-1702" name="line-1702"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file</span><span class="p">);</span> +<a id="line-1703" name="line-1703"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1704" name="line-1704"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-1705" name="line-1705"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">uri_list</span><span class="p">);</span> +<a id="line-1706" name="line-1706"></a><span class="p">}</span> +<a id="line-1707" name="line-1707"></a> +<a id="line-1708" name="line-1708"></a><span class="kt">void</span> +<a id="line-1709" name="line-1709"></a><span class="nf">show_file_selector_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkAction</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">action</span><span class="p">,</span> +<a id="line-1710" name="line-1710"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1711" name="line-1711"></a><span class="p">{</span> +<a id="line-1712" name="line-1712"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1713" name="line-1713"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_chooser</span><span class="p">;</span> +<a id="line-1714" name="line-1714"></a> +<a id="line-1715" name="line-1715"></a><span class="w"> </span><span class="n">file_chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Save Search Results As..."</span><span class="p">),</span> +<a id="line-1716" name="line-1716"></a><span class="w"> </span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-1717" name="line-1717"></a><span class="w"> </span><span class="n">GTK_FILE_CHOOSER_ACTION_SAVE</span><span class="p">,</span> +<a id="line-1718" name="line-1718"></a><span class="w"> </span><span class="s">"gtk-cancel"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">,</span> +<a id="line-1719" name="line-1719"></a><span class="w"> </span><span class="s">"gtk-save"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">,</span> +<a id="line-1720" name="line-1720"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1721" name="line-1721"></a> +<a id="line-1722" name="line-1722"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_do_overwrite_confirmation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1723" name="line-1723"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">save_results_as_default_filename</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1724" name="line-1724"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_filename</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">),</span> +<a id="line-1725" name="line-1725"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">save_results_as_default_filename</span><span class="p">);</span> +<a id="line-1726" name="line-1726"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1727" name="line-1727"></a> +<a id="line-1728" name="line-1728"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-1729" name="line-1729"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">save_results_cb</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1730" name="line-1730"></a> +<a id="line-1731" name="line-1731"></a><span class="w"> </span><span class="n">gtk_window_set_modal</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1732" name="line-1732"></a><span class="w"> </span><span class="n">gtk_window_set_position</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIN_POS_CENTER_ON_PARENT</span><span class="p">);</span> +<a id="line-1733" name="line-1733"></a> +<a id="line-1734" name="line-1734"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">));</span> +<a id="line-1735" name="line-1735"></a><span class="p">}</span> +<a id="line-1736" name="line-1736"></a> +<a id="line-1737" name="line-1737"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1738" name="line-1738"></a><span class="nf">display_dialog_could_not_save_no_name</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">)</span> +<a id="line-1739" name="line-1739"></a><span class="p">{</span> +<a id="line-1740" name="line-1740"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-1741" name="line-1741"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">primary</span><span class="p">;</span> +<a id="line-1742" name="line-1742"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">secondary</span><span class="p">;</span> +<a id="line-1743" name="line-1743"></a> +<a id="line-1744" name="line-1744"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not save document."</span><span class="p">));</span> +<a id="line-1745" name="line-1745"></a><span class="w"> </span><span class="n">secondary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"You did not select a document name."</span><span class="p">));</span> +<a id="line-1746" name="line-1746"></a> +<a id="line-1747" name="line-1747"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-1748" name="line-1748"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-1749" name="line-1749"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-1750" name="line-1750"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-1751" name="line-1751"></a><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1752" name="line-1752"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-1753" name="line-1753"></a><span class="w"> </span><span class="n">secondary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1754" name="line-1754"></a> +<a id="line-1755" name="line-1755"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-1756" name="line-1756"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-1757" name="line-1757"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-1758" name="line-1758"></a> +<a id="line-1759" name="line-1759"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-1760" name="line-1760"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span> +<a id="line-1761" name="line-1761"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1762" name="line-1762"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-1763" name="line-1763"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-1764" name="line-1764"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">secondary</span><span class="p">);</span> +<a id="line-1765" name="line-1765"></a><span class="p">}</span> +<a id="line-1766" name="line-1766"></a> +<a id="line-1767" name="line-1767"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1768" name="line-1768"></a><span class="nf">display_dialog_could_not_save_to</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-1769" name="line-1769"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-1770" name="line-1770"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">message</span><span class="p">)</span> +<a id="line-1771" name="line-1771"></a><span class="p">{</span> +<a id="line-1772" name="line-1772"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-1773" name="line-1773"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">primary</span><span class="p">;</span> +<a id="line-1774" name="line-1774"></a> +<a id="line-1775" name="line-1775"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not save </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> document to </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">."</span><span class="p">),</span> +<a id="line-1776" name="line-1776"></a><span class="w"> </span><span class="n">g_path_get_basename</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">),</span> +<a id="line-1777" name="line-1777"></a><span class="w"> </span><span class="n">g_path_get_dirname</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">));</span> +<a id="line-1778" name="line-1778"></a> +<a id="line-1779" name="line-1779"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-1780" name="line-1780"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-1781" name="line-1781"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-1782" name="line-1782"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-1783" name="line-1783"></a><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1784" name="line-1784"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-1785" name="line-1785"></a><span class="w"> </span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1786" name="line-1786"></a> +<a id="line-1787" name="line-1787"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-1788" name="line-1788"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-1789" name="line-1789"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-1790" name="line-1790"></a> +<a id="line-1791" name="line-1791"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-1792" name="line-1792"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span> +<a id="line-1793" name="line-1793"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1794" name="line-1794"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-1795" name="line-1795"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-1796" name="line-1796"></a><span class="p">}</span> +<a id="line-1797" name="line-1797"></a> +<a id="line-1798" name="line-1798"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-1799" name="line-1799"></a><span class="nf">display_dialog_could_not_save_exists</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-1800" name="line-1800"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">)</span> +<a id="line-1801" name="line-1801"></a><span class="p">{</span> +<a id="line-1802" name="line-1802"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-1803" name="line-1803"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">button</span><span class="p">;</span> +<a id="line-1804" name="line-1804"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">primary</span><span class="p">;</span> +<a id="line-1805" name="line-1805"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">secondary</span><span class="p">;</span> +<a id="line-1806" name="line-1806"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-1807" name="line-1807"></a> +<a id="line-1808" name="line-1808"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"The document </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> already exists. "</span> +<a id="line-1809" name="line-1809"></a><span class="w"> </span><span class="s">"Would you like to replace it?"</span><span class="p">),</span> +<a id="line-1810" name="line-1810"></a><span class="w"> </span><span class="n">g_path_get_basename</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">));</span> +<a id="line-1811" name="line-1811"></a> +<a id="line-1812" name="line-1812"></a><span class="w"> </span><span class="n">secondary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"If you replace an existing file, "</span> +<a id="line-1813" name="line-1813"></a><span class="w"> </span><span class="s">"its contents will be overwritten."</span><span class="p">));</span> +<a id="line-1814" name="line-1814"></a> +<a id="line-1815" name="line-1815"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-1816" name="line-1816"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-1817" name="line-1817"></a><span class="w"> </span><span class="n">GTK_MESSAGE_QUESTION</span><span class="p">,</span> +<a id="line-1818" name="line-1818"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CANCEL</span><span class="p">,</span> +<a id="line-1819" name="line-1819"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">primary</span><span class="p">);</span> +<a id="line-1820" name="line-1820"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-1821" name="line-1821"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">secondary</span><span class="p">);</span> +<a id="line-1822" name="line-1822"></a> +<a id="line-1823" name="line-1823"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-1824" name="line-1824"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-1825" name="line-1825"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-1826" name="line-1826"></a> +<a id="line-1827" name="line-1827"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearchtool_button_new_with_icon</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Replace"</span><span class="p">),</span><span class="w"> </span><span class="s">"gtk-ok"</span><span class="p">);</span> +<a id="line-1828" name="line-1828"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1829" name="line-1829"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">);</span> +<a id="line-1830" name="line-1830"></a> +<a id="line-1831" name="line-1831"></a><span class="w"> </span><span class="n">gtk_dialog_add_action_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-1832" name="line-1832"></a><span class="w"> </span><span class="n">gtk_dialog_set_default_response</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-1833" name="line-1833"></a> +<a id="line-1834" name="line-1834"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-1835" name="line-1835"></a> +<a id="line-1836" name="line-1836"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-1837" name="line-1837"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-1838" name="line-1838"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">secondary</span><span class="p">);</span> +<a id="line-1839" name="line-1839"></a> +<a id="line-1840" name="line-1840"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-1841" name="line-1841"></a><span class="p">}</span> +<a id="line-1842" name="line-1842"></a> +<a id="line-1843" name="line-1843"></a><span class="kt">void</span> +<a id="line-1844" name="line-1844"></a><span class="nf">save_results_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">chooser</span><span class="p">,</span> +<a id="line-1845" name="line-1845"></a><span class="hll"><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">,</span><span class="error2"><--- Shadowed declaration</span> +</span><a id="line-1846" name="line-1846"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1847" name="line-1847"></a><span class="p">{</span> +<a id="line-1848" name="line-1848"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1849" name="line-1849"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">store</span><span class="p">;</span> +<a id="line-1850" name="line-1850"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1851" name="line-1851"></a><span class="w"> </span><span class="kt">FILE</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">fp</span><span class="p">;</span> +<a id="line-1852" name="line-1852"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1853" name="line-1853"></a> +<a id="line-1854" name="line-1854"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1855" name="line-1855"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">));</span> +<a id="line-1856" name="line-1856"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1857" name="line-1857"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1858" name="line-1858"></a> +<a id="line-1859" name="line-1859"></a><span class="w"> </span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">;</span> +<a id="line-1860" name="line-1860"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">save_results_as_default_filename</span><span class="p">);</span> +<a id="line-1861" name="line-1861"></a> +<a id="line-1862" name="line-1862"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">save_results_as_default_filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_get_filename</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">));</span> +<a id="line-1863" name="line-1863"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">);</span> +<a id="line-1864" name="line-1864"></a> +<a id="line-1865" name="line-1865"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">save_results_as_default_filename</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1866" name="line-1866"></a><span class="w"> </span><span class="n">utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_to_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">save_results_as_default_filename</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1867" name="line-1867"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1868" name="line-1868"></a> +<a id="line-1869" name="line-1869"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">utf8</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1870" name="line-1870"></a><span class="w"> </span><span class="n">display_dialog_could_not_save_no_name</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">);</span> +<a id="line-1871" name="line-1871"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1872" name="line-1872"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1873" name="line-1873"></a> +<a id="line-1874" name="line-1874"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">save_results_as_default_filename</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_DIR</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1875" name="line-1875"></a><span class="w"> </span><span class="n">display_dialog_could_not_save_to</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8</span><span class="p">,</span> +<a id="line-1876" name="line-1876"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The document name you selected is a folder."</span><span class="p">));</span> +<a id="line-1877" name="line-1877"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8</span><span class="p">);</span> +<a id="line-1878" name="line-1878"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1879" name="line-1879"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1880" name="line-1880"></a> +<a id="line-1881" name="line-1881"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">save_results_as_default_filename</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1882" name="line-1882"></a> +<a id="line-1883" name="line-1883"></a><span class="hll"><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span><span class="error2"><--- Shadow variable</span> +</span><a id="line-1884" name="line-1884"></a> +<a id="line-1885" name="line-1885"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">display_dialog_could_not_save_exists</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8</span><span class="p">);</span> +<a id="line-1886" name="line-1886"></a> +<a id="line-1887" name="line-1887"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1888" name="line-1888"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8</span><span class="p">);</span> +<a id="line-1889" name="line-1889"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1890" name="line-1890"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1891" name="line-1891"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1892" name="line-1892"></a> +<a id="line-1893" name="line-1893"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">fp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">fopen</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">save_results_as_default_filename</span><span class="p">,</span><span class="w"> </span><span class="s">"w"</span><span class="p">))</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1894" name="line-1894"></a> +<a id="line-1895" name="line-1895"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-1896" name="line-1896"></a> +<a id="line-1897" name="line-1897"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">gtk_tree_model_iter_n_children</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span> +<a id="line-1898" name="line-1898"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1899" name="line-1899"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_model_iter_nth_child</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">idx</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1900" name="line-1900"></a> +<a id="line-1901" name="line-1901"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale_file</span><span class="p">;</span> +<a id="line-1902" name="line-1902"></a> +<a id="line-1903" name="line-1903"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_LOCALE_FILE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">locale_file</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1904" name="line-1904"></a><span class="w"> </span><span class="n">fprintf</span><span class="w"> </span><span class="p">(</span><span class="n">fp</span><span class="p">,</span><span class="w"> </span><span class="s">"%s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">locale_file</span><span class="p">);</span> +<a id="line-1905" name="line-1905"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_file</span><span class="p">);</span> +<a id="line-1906" name="line-1906"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1907" name="line-1907"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1908" name="line-1908"></a><span class="w"> </span><span class="n">fclose</span><span class="w"> </span><span class="p">(</span><span class="n">fp</span><span class="p">);</span> +<a id="line-1909" name="line-1909"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1910" name="line-1910"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1911" name="line-1911"></a><span class="w"> </span><span class="n">display_dialog_could_not_save_to</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">utf8</span><span class="p">,</span> +<a id="line-1912" name="line-1912"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"You may not have write permissions to the document."</span><span class="p">));</span> +<a id="line-1913" name="line-1913"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1914" name="line-1914"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8</span><span class="p">);</span> +<a id="line-1915" name="line-1915"></a><span class="p">}</span> +<a id="line-1916" name="line-1916"></a> +<a id="line-1917" name="line-1917"></a><span class="kt">void</span> +<a id="line-1918" name="line-1918"></a><span class="nf">save_session_cb</span><span class="w"> </span><span class="p">(</span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">client</span><span class="p">,</span> +<a id="line-1919" name="line-1919"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">state_file</span><span class="p">,</span> +<a id="line-1920" name="line-1920"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">)</span> +<a id="line-1921" name="line-1921"></a><span class="p">{</span> +<a id="line-1922" name="line-1922"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">client_data</span><span class="p">;</span> +<a id="line-1923" name="line-1923"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">argv</span><span class="p">;</span> +<a id="line-1924" name="line-1924"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">;</span> +<a id="line-1925" name="line-1925"></a> +<a id="line-1926" name="line-1926"></a><span class="w"> </span><span class="n">set_clone_command</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="s">"mate-search-tool"</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1927" name="line-1927"></a><span class="w"> </span><span class="n">egg_sm_client_set_restart_command</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">argv</span><span class="p">);</span> +<a id="line-1928" name="line-1928"></a><span class="p">}</span> +<a id="line-1929" name="line-1929"></a> +<a id="line-1930" name="line-1930"></a><span class="n">gboolean</span> +<a id="line-1931" name="line-1931"></a><span class="nf">key_press_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-1932" name="line-1932"></a><span class="w"> </span><span class="n">GdkEventKey</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">event</span><span class="p">,</span> +<a id="line-1933" name="line-1933"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1934" name="line-1934"></a><span class="p">{</span> +<a id="line-1935" name="line-1935"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1936" name="line-1936"></a> +<a id="line-1937" name="line-1937"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1938" name="line-1938"></a> +<a id="line-1939" name="line-1939"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">keyval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_KEY_Escape</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1940" name="line-1940"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">RUNNING</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1941" name="line-1941"></a><span class="w"> </span><span class="n">click_stop_cb</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-1942" name="line-1942"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1943" name="line-1943"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_timeout_enabled</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1944" name="line-1944"></a><span class="w"> </span><span class="n">quit_cb</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GdkEvent</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-1945" name="line-1945"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1946" name="line-1946"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1947" name="line-1947"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">keyval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_KEY_F10</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1948" name="line-1948"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GDK_SHIFT_MASK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1949" name="line-1949"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">no_files_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1950" name="line-1950"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-1951" name="line-1951"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1952" name="line-1952"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-1953" name="line-1953"></a> +<a id="line-1954" name="line-1954"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_selection_count_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1955" name="line-1955"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1956" name="line-1956"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1957" name="line-1957"></a> +<a id="line-1958" name="line-1958"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected_rows</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-1959" name="line-1959"></a><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">);</span> +<a id="line-1960" name="line-1960"></a> +<a id="line-1961" name="line-1961"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1962" name="line-1962"></a><span class="w"> </span><span class="n">g_list_first</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">)</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-1963" name="line-1963"></a> +<a id="line-1964" name="line-1964"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1965" name="line-1965"></a><span class="w"> </span><span class="n">COLUMN_NO_FILES_FOUND</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">no_files_found</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1966" name="line-1966"></a> +<a id="line-1967" name="line-1967"></a><span class="w"> </span><span class="n">g_list_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="p">);</span> +<a id="line-1968" name="line-1968"></a> +<a id="line-1969" name="line-1969"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">no_files_found</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1970" name="line-1970"></a><span class="w"> </span><span class="n">gtk_menu_popup_at_pointer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_popup_menu</span><span class="p">),</span> +<a id="line-1971" name="line-1971"></a><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">GdkEvent</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">event</span><span class="p">);</span> +<a id="line-1972" name="line-1972"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1973" name="line-1973"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1974" name="line-1974"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1975" name="line-1975"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1976" name="line-1976"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1977" name="line-1977"></a><span class="p">}</span> +<a id="line-1978" name="line-1978"></a> +<a id="line-1979" name="line-1979"></a><span class="n">gboolean</span> +<a id="line-1980" name="line-1980"></a><span class="nf">not_running_timeout_cb</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1981" name="line-1981"></a><span class="p">{</span> +<a id="line-1982" name="line-1982"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1983" name="line-1983"></a> +<a id="line-1984" name="line-1984"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_timeout_enabled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1985" name="line-1985"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1986" name="line-1986"></a><span class="p">}</span> +<a id="line-1987" name="line-1987"></a> +<a id="line-1988" name="line-1988"></a><span class="kt">void</span> +<a id="line-1989" name="line-1989"></a><span class="nf">disable_quick_search_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">,</span> +<a id="line-1990" name="line-1990"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">,</span> +<a id="line-1991" name="line-1991"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1992" name="line-1992"></a><span class="p">{</span> +<a id="line-1993" name="line-1993"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1994" name="line-1994"></a> +<a id="line-1995" name="line-1995"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-1996" name="line-1996"></a> +<a id="line-1997" name="line-1997"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1998" name="line-1998"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"disable-quick-search"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1999" name="line-1999"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2000" name="line-2000"></a><span class="p">}</span> +<a id="line-2001" name="line-2001"></a> +<a id="line-2002" name="line-2002"></a><span class="kt">void</span> +<a id="line-2003" name="line-2003"></a><span class="nf">single_click_to_activate_key_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">settings</span><span class="p">,</span> +<a id="line-2004" name="line-2004"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">key</span><span class="p">,</span> +<a id="line-2005" name="line-2005"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-2006" name="line-2006"></a><span class="p">{</span> +<a id="line-2007" name="line-2007"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-2008" name="line-2008"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">value</span><span class="p">;</span> +<a id="line-2009" name="line-2009"></a> +<a id="line-2010" name="line-2010"></a><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">);</span> +<a id="line-2011" name="line-2011"></a> +<a id="line-2012" name="line-2012"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_search_results_single_click_to_activate</span><span class="w"> </span><span class="o">=</span> +<a id="line-2013" name="line-2013"></a><span class="w"> </span><span class="p">(</span><span class="n">strncmp</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="s">"single"</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">TRUE</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2014" name="line-2014"></a> +<a id="line-2015" name="line-2015"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-2016" name="line-2016"></a><span class="p">}</span> +<a id="line-2017" name="line-2017"></a> +<a id="line-2018" name="line-2018"></a><span class="kt">void</span> +<a id="line-2019" name="line-2019"></a><span class="nf">columns_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">treeview</span><span class="p">,</span> +<a id="line-2020" name="line-2020"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-2021" name="line-2021"></a><span class="p">{</span> +<a id="line-2022" name="line-2022"></a><span class="w"> </span><span class="n">GVariantBuilder</span><span class="w"> </span><span class="n">array_builder</span><span class="p">;</span> +<a id="line-2023" name="line-2023"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-2024" name="line-2024"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">order</span><span class="p">;</span> +<a id="line-2025" name="line-2025"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-2026" name="line-2026"></a> +<a id="line-2027" name="line-2027"></a><span class="w"> </span><span class="n">order</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearchtool_get_columns_order</span><span class="w"> </span><span class="p">(</span><span class="n">treeview</span><span class="p">);</span> +<a id="line-2028" name="line-2028"></a> +<a id="line-2029" name="line-2029"></a><span class="w"> </span><span class="n">g_variant_builder_init</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">array_builder</span><span class="p">,</span><span class="w"> </span><span class="n">G_VARIANT_TYPE</span><span class="w"> </span><span class="p">(</span><span class="s">"ai"</span><span class="p">));</span> +<a id="line-2030" name="line-2030"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">order</span><span class="p">;</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iter</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-2031" name="line-2031"></a><span class="w"> </span><span class="n">g_variant_builder_add</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">array_builder</span><span class="p">,</span><span class="w"> </span><span class="s">"i"</span><span class="p">,</span><span class="w"> </span><span class="n">GPOINTER_TO_INT</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="o">-></span><span class="n">data</span><span class="p">));</span> +<a id="line-2032" name="line-2032"></a> +<a id="line-2033" name="line-2033"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_slist_length</span><span class="w"> </span><span class="p">(</span><span class="n">order</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">NUM_VISIBLE_COLUMNS</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2034" name="line-2034"></a><span class="w"> </span><span class="n">g_settings_set_value</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"columns-order"</span><span class="p">,</span><span class="w"> </span><span class="n">g_variant_new</span><span class="w"> </span><span class="p">(</span><span class="s">"ai"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">array_builder</span><span class="p">));</span> +<a id="line-2035" name="line-2035"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2036" name="line-2036"></a><span class="w"> </span><span class="n">g_slist_free</span><span class="w"> </span><span class="p">(</span><span class="n">order</span><span class="p">);</span> +<a id="line-2037" name="line-2037"></a><span class="p">}</span> +<a id="line-2038" name="line-2038"></a> +<a id="line-2039" name="line-2039"></a><span class="n">gboolean</span> +<a id="line-2040" name="line-2040"></a><span class="nf">window_state_event_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-2041" name="line-2041"></a><span class="w"> </span><span class="n">GdkEventWindowState</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">event</span><span class="p">,</span> +<a id="line-2042" name="line-2042"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-2043" name="line-2043"></a><span class="p">{</span> +<a id="line-2044" name="line-2044"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-2045" name="line-2045"></a> +<a id="line-2046" name="line-2046"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">new_window_state</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GDK_WINDOW_STATE_MAXIMIZED</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2047" name="line-2047"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_maximized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-2048" name="line-2048"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2049" name="line-2049"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-2050" name="line-2050"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_maximized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2051" name="line-2051"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2052" name="line-2052"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2053" name="line-2053"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/15.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/15.html new file mode 100644 index 00000000..faca307b --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/15.html @@ -0,0 +1,3133 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: gsearchtool/src/gsearchtool-support.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gsearchtool-support.c</p> +<a href="15.html#line-790"> variableScope 790</a><a href="15.html#line-791"> variableScope 791</a><a href="15.html#line-1168"> variableScope 1168</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span> +<span class="normal">1328</span> +<span class="normal">1329</span> +<span class="normal">1330</span> +<span class="normal">1331</span> +<span class="normal">1332</span> +<span class="normal">1333</span> +<span class="normal">1334</span> +<span class="normal">1335</span> +<span class="normal">1336</span> +<span class="normal">1337</span> +<span class="normal">1338</span> +<span class="normal">1339</span> +<span class="normal">1340</span> +<span class="normal">1341</span> +<span class="normal">1342</span> +<span class="normal">1343</span> +<span class="normal">1344</span> +<span class="normal">1345</span> +<span class="normal">1346</span> +<span class="normal">1347</span> +<span class="normal">1348</span> +<span class="normal">1349</span> +<span class="normal">1350</span> +<span class="normal">1351</span> +<span class="normal">1352</span> +<span class="normal">1353</span> +<span class="normal">1354</span> +<span class="normal">1355</span> +<span class="normal">1356</span> +<span class="normal">1357</span> +<span class="normal">1358</span> +<span class="normal">1359</span> +<span class="normal">1360</span> +<span class="normal">1361</span> +<span class="normal">1362</span> +<span class="normal">1363</span> +<span class="normal">1364</span> +<span class="normal">1365</span> +<span class="normal">1366</span> +<span class="normal">1367</span> +<span class="normal">1368</span> +<span class="normal">1369</span> +<span class="normal">1370</span> +<span class="normal">1371</span> +<span class="normal">1372</span> +<span class="normal">1373</span> +<span class="normal">1374</span> +<span class="normal">1375</span> +<span class="normal">1376</span> +<span class="normal">1377</span> +<span class="normal">1378</span> +<span class="normal">1379</span> +<span class="normal">1380</span> +<span class="normal">1381</span> +<span class="normal">1382</span> +<span class="normal">1383</span> +<span class="normal">1384</span> +<span class="normal">1385</span> +<span class="normal">1386</span> +<span class="normal">1387</span> +<span class="normal">1388</span> +<span class="normal">1389</span> +<span class="normal">1390</span> +<span class="normal">1391</span> +<span class="normal">1392</span> +<span class="normal">1393</span> +<span class="normal">1394</span> +<span class="normal">1395</span> +<span class="normal">1396</span> +<span class="normal">1397</span> +<span class="normal">1398</span> +<span class="normal">1399</span> +<span class="normal">1400</span> +<span class="normal">1401</span> +<span class="normal">1402</span> +<span class="normal">1403</span> +<span class="normal">1404</span> +<span class="normal">1405</span> +<span class="normal">1406</span> +<span class="normal">1407</span> +<span class="normal">1408</span> +<span class="normal">1409</span> +<span class="normal">1410</span> +<span class="normal">1411</span> +<span class="normal">1412</span> +<span class="normal">1413</span> +<span class="normal">1414</span> +<span class="normal">1415</span> +<span class="normal">1416</span> +<span class="normal">1417</span> +<span class="normal">1418</span> +<span class="normal">1419</span> +<span class="normal">1420</span> +<span class="normal">1421</span> +<span class="normal">1422</span> +<span class="normal">1423</span> +<span class="normal">1424</span> +<span class="normal">1425</span> +<span class="normal">1426</span> +<span class="normal">1427</span> +<span class="normal">1428</span> +<span class="normal">1429</span> +<span class="normal">1430</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) 2002 the Free Software Foundation</span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-4" name="line-4"></a><span class="cm"> *</span> +<a id="line-5" name="line-5"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-6" name="line-6"></a><span class="cm"> *</span> +<a id="line-7" name="line-7"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-8" name="line-8"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-9" name="line-9"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-10" name="line-10"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-11" name="line-11"></a><span class="cm"> *</span> +<a id="line-12" name="line-12"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-13" name="line-13"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-14" name="line-14"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-15" name="line-15"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-16" name="line-16"></a><span class="cm"> *</span> +<a id="line-17" name="line-17"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-18" name="line-18"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-19" name="line-19"></a><span class="cm"> *</span> +<a id="line-20" name="line-20"></a><span class="cm"> * Authors:</span> +<a id="line-21" name="line-21"></a><span class="cm"> * Dennis Cranston <[email protected]></span> +<a id="line-22" name="line-22"></a><span class="cm"> * George Lebl</span> +<a id="line-23" name="line-23"></a><span class="cm"> */</span> +<a id="line-24" name="line-24"></a> +<a id="line-25" name="line-25"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#endif</span> +<a id="line-28" name="line-28"></a> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><regex.h></span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkx.h></span> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gdesktopappinfo.h></span> +<a id="line-37" name="line-37"></a> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool.h"</span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool-callbacks.h"</span> +<a id="line-40" name="line-40"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool-support.h"</span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="cp">#define C_STANDARD_STRFTIME_CHARACTERS "aAbBcdHIjmMpSUwWxXyYZ"</span> +<a id="line-43" name="line-43"></a><span class="cp">#define C_STANDARD_NUMERIC_STRFTIME_CHARACTERS "dHIjmMSUwWyY"</span> +<a id="line-44" name="line-44"></a><span class="cp">#define SUS_EXTENDED_STRFTIME_MODIFIERS "EO"</span> +<a id="line-45" name="line-45"></a><span class="cp">#define BINARY_EXEC_MIME_TYPE "application/x-executable"</span> +<a id="line-46" name="line-46"></a> +<a id="line-47" name="line-47"></a><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span> +<a id="line-48" name="line-48"></a><span class="nf">gsearchtool_gtk_tree_view_get_column_with_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">treeview</span><span class="p">,</span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">id</span><span class="p">);</span> +<a id="line-50" name="line-50"></a> +<a id="line-51" name="line-51"></a><span class="cm">/* START OF GENERIC MATE-SEARCH-TOOL FUNCTIONS */</span> +<a id="line-52" name="line-52"></a> +<a id="line-53" name="line-53"></a><span class="n">gboolean</span> +<a id="line-54" name="line-54"></a><span class="nf">is_path_hidden</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">)</span> +<a id="line-55" name="line-55"></a><span class="p">{</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">sub_str</span><span class="p">;</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">hidden_path_substr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">,</span><span class="w"> </span><span class="s">"."</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-59" name="line-59"></a> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">sub_str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strstr_len</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">),</span><span class="w"> </span><span class="n">hidden_path_substr</span><span class="p">);</span> +<a id="line-61" name="line-61"></a> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sub_str</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">mate_desktop_str</span><span class="p">;</span> +<a id="line-64" name="line-64"></a> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">mate_desktop_str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">,</span><span class="w"> </span><span class="s">".mate-desktop"</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="cm">/* exclude the .mate-desktop folder */</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strncmp</span><span class="w"> </span><span class="p">(</span><span class="n">sub_str</span><span class="p">,</span><span class="w"> </span><span class="n">mate_desktop_str</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">mate_desktop_str</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">sub_str</span><span class="o">++</span><span class="p">;</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">g_strstr_len</span><span class="w"> </span><span class="p">(</span><span class="n">sub_str</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">sub_str</span><span class="p">),</span><span class="w"> </span><span class="n">hidden_path_substr</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="p">}</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="p">}</span> +<a id="line-75" name="line-75"></a> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">mate_desktop_str</span><span class="p">);</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="p">}</span> +<a id="line-78" name="line-78"></a> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">hidden_path_substr</span><span class="p">);</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">results</span><span class="p">;</span> +<a id="line-81" name="line-81"></a><span class="p">}</span> +<a id="line-82" name="line-82"></a> +<a id="line-83" name="line-83"></a><span class="n">gboolean</span> +<a id="line-84" name="line-84"></a><span class="nf">is_quick_search_excluded_path</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">)</span> +<a id="line-85" name="line-85"></a><span class="p">{</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">settings</span><span class="p">;</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">exclude_path_list</span><span class="p">;</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dir</span><span class="p">;</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-91" name="line-91"></a> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="n">dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-93" name="line-93"></a> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="cm">/* Remove trailing G_DIR_SEPARATOR. */</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">g_str_has_suffix</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">dir</span><span class="p">[</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="p">}</span> +<a id="line-98" name="line-98"></a> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="cm">/* Always exclude a path that is symbolic link. */</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_SYMLINK</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">);</span> +<a id="line-102" name="line-102"></a> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="p">}</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">);</span> +<a id="line-106" name="line-106"></a> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="s">"org.mate.search-tool"</span><span class="p">);</span> +<a id="line-108" name="line-108"></a> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="cm">/* Check path against the Quick-Search-Excluded-Paths list. */</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">exclude_path_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_strv</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="s">"quick-search-excluded-paths"</span><span class="p">);</span> +<a id="line-111" name="line-111"></a> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">exclude_path_list</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">exclude_path_list</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-114" name="line-114"></a> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="cm">/* Skip empty or null values. */</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">exclude_path_list</span><span class="p">[</span><span class="n">i</span><span class="p">])</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="p">}</span> +<a id="line-119" name="line-119"></a> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">exclude_path_list</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-121" name="line-121"></a> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="cm">/* Wild-card comparisons. */</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_strstr_len</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">),</span><span class="w"> </span><span class="s">"*"</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-124" name="line-124"></a> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_pattern_match_simple</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-126" name="line-126"></a> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">);</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="p">}</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="p">}</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="cm">/* Non-wild-card comparisons. */</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="cm">/* Add a trailing G_DIR_SEPARATOR. */</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_str_has_suffix</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-136" name="line-136"></a> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">tmp</span><span class="p">;</span> +<a id="line-138" name="line-138"></a> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dir</span><span class="p">;</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="p">}</span> +<a id="line-143" name="line-143"></a> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="n">dir</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-145" name="line-145"></a> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">);</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="p">}</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="p">}</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">);</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="p">}</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">exclude_path_list</span><span class="p">);</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="p">}</span> +<a id="line-155" name="line-155"></a> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">);</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">results</span><span class="p">;</span> +<a id="line-158" name="line-158"></a><span class="p">}</span> +<a id="line-159" name="line-159"></a> +<a id="line-160" name="line-160"></a><span class="n">gboolean</span> +<a id="line-161" name="line-161"></a><span class="nf">is_second_scan_excluded_path</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">)</span> +<a id="line-162" name="line-162"></a><span class="p">{</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">settings</span><span class="p">;</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">exclude_path_list</span><span class="p">;</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dir</span><span class="p">;</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-168" name="line-168"></a> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-170" name="line-170"></a> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="cm">/* Remove trailing G_DIR_SEPARATOR. */</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">g_str_has_suffix</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">dir</span><span class="p">[</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="p">}</span> +<a id="line-175" name="line-175"></a> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="cm">/* Always exclude a path that is symbolic link. */</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_SYMLINK</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">);</span> +<a id="line-179" name="line-179"></a> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="p">}</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">);</span> +<a id="line-183" name="line-183"></a> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="s">"org.mate.search-tool"</span><span class="p">);</span> +<a id="line-185" name="line-185"></a> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="cm">/* Check path against the Quick-Search-Excluded-Paths list. */</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">exclude_path_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_strv</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="s">"quick-search-second-scan-excluded-paths"</span><span class="p">);</span> +<a id="line-188" name="line-188"></a> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">exclude_path_list</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">exclude_path_list</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="cm">/* Skip empty or null values. */</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">exclude_path_list</span><span class="p">[</span><span class="n">i</span><span class="p">])</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="p">}</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">exclude_path_list</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="cm">/* Wild-card comparisons. */</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_strstr_len</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">),</span><span class="w"> </span><span class="s">"*"</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_pattern_match_simple</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">);</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="p">}</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="p">}</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="cm">/* Non-wild-card comparisons. */</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="cm">/* Add a trailing G_DIR_SEPARATOR. */</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_str_has_suffix</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-213" name="line-213"></a> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">tmp</span><span class="p">;</span> +<a id="line-215" name="line-215"></a> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dir</span><span class="p">;</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="p">}</span> +<a id="line-220" name="line-220"></a> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="n">dir</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-222" name="line-222"></a> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">);</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="p">}</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="p">}</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir</span><span class="p">);</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="p">}</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">exclude_path_list</span><span class="p">);</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="p">}</span> +<a id="line-232" name="line-232"></a> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">);</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">results</span><span class="p">;</span> +<a id="line-235" name="line-235"></a><span class="p">}</span> +<a id="line-236" name="line-236"></a> +<a id="line-237" name="line-237"></a><span class="n">gboolean</span> +<a id="line-238" name="line-238"></a><span class="nf">compare_regex</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">regex</span><span class="p">,</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">)</span> +<a id="line-240" name="line-240"></a><span class="p">{</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">regex_t</span><span class="w"> </span><span class="n">regexec_pattern</span><span class="p">;</span> +<a id="line-242" name="line-242"></a> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">regex</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="p">}</span> +<a id="line-246" name="line-246"></a> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">regcomp</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">regexec_pattern</span><span class="p">,</span><span class="w"> </span><span class="n">regex</span><span class="p">,</span><span class="w"> </span><span class="n">REG_EXTENDED</span><span class="o">|</span><span class="n">REG_NOSUB</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">regexec</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">regexec_pattern</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">REG_NOMATCH</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">regfree</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">regexec_pattern</span><span class="p">);</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="p">}</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">regfree</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">regexec_pattern</span><span class="p">);</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="p">}</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-255" name="line-255"></a><span class="p">}</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="n">gboolean</span> +<a id="line-258" name="line-258"></a><span class="nf">limit_string_to_x_lines</span><span class="w"> </span><span class="p">(</span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">,</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">x</span><span class="p">)</span> +<a id="line-260" name="line-260"></a><span class="p">{</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\n'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">count</span><span class="o">++</span><span class="p">;</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">x</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">g_string_truncate</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="p">}</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="p">}</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="p">}</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-273" name="line-273"></a><span class="p">}</span> +<a id="line-274" name="line-274"></a> +<a id="line-275" name="line-275"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-276" name="line-276"></a><span class="nf">count_of_char_in_string</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">,</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="n">c</span><span class="p">)</span> +<a id="line-278" name="line-278"></a><span class="p">{</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">cnt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="k">for</span><span class="p">(;</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">;</span><span class="w"> </span><span class="n">string</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">c</span><span class="p">)</span><span class="w"> </span><span class="n">cnt</span><span class="o">++</span><span class="p">;</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="p">}</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">cnt</span><span class="p">;</span> +<a id="line-284" name="line-284"></a><span class="p">}</span> +<a id="line-285" name="line-285"></a> +<a id="line-286" name="line-286"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-287" name="line-287"></a><span class="nf">escape_single_quotes</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">)</span> +<a id="line-288" name="line-288"></a><span class="p">{</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gs</span><span class="p">;</span> +<a id="line-290" name="line-290"></a> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="p">}</span> +<a id="line-294" name="line-294"></a> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count_of_char_in_string</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="sc">'\''</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_strdup</span><span class="p">(</span><span class="n">string</span><span class="p">);</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="p">}</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">gs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="k">for</span><span class="p">(;</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">;</span><span class="w"> </span><span class="n">string</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\''</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">g_string_append</span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="s">"'</span><span class="se">\\</span><span class="s">''"</span><span class="p">);</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="p">}</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">);</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="p">}</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="p">}</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-308" name="line-308"></a><span class="p">}</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-311" name="line-311"></a><span class="nf">escape_double_quotes</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">)</span> +<a id="line-312" name="line-312"></a><span class="p">{</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gs</span><span class="p">;</span> +<a id="line-314" name="line-314"></a> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="p">}</span> +<a id="line-318" name="line-318"></a> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count_of_char_in_string</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_strdup</span><span class="p">(</span><span class="n">string</span><span class="p">);</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="p">}</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">gs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="k">for</span><span class="p">(;</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">;</span><span class="w"> </span><span class="n">string</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">g_string_append</span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\\"</span><span class="s">"</span><span class="p">);</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="p">}</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">);</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="p">}</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="p">}</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-332" name="line-332"></a><span class="p">}</span> +<a id="line-333" name="line-333"></a> +<a id="line-334" name="line-334"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-335" name="line-335"></a><span class="nf">backslash_backslash_characters</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">)</span> +<a id="line-336" name="line-336"></a><span class="p">{</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gs</span><span class="p">;</span> +<a id="line-338" name="line-338"></a> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="p">}</span> +<a id="line-342" name="line-342"></a> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count_of_char_in_string</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="sc">'\\'</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">){</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_strdup</span><span class="p">(</span><span class="n">string</span><span class="p">);</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="p">}</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">gs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="k">for</span><span class="p">(;</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">;</span><span class="w"> </span><span class="n">string</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\\'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">g_string_append</span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\\\</span><span class="s">"</span><span class="p">);</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="p">}</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">);</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="p">}</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="p">}</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-356" name="line-356"></a><span class="p">}</span> +<a id="line-357" name="line-357"></a> +<a id="line-358" name="line-358"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-359" name="line-359"></a><span class="nf">backslash_special_characters</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">)</span> +<a id="line-360" name="line-360"></a><span class="p">{</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gs</span><span class="p">;</span> +<a id="line-362" name="line-362"></a> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="p">}</span> +<a id="line-366" name="line-366"></a> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">count_of_char_in_string</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="sc">'\\'</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="p">(</span><span class="n">count_of_char_in_string</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="sc">'-'</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_strdup</span><span class="p">(</span><span class="n">string</span><span class="p">);</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="p">}</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">gs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="k">for</span><span class="p">(;</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">;</span><span class="w"> </span><span class="n">string</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\\'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">g_string_append</span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\\\</span><span class="s">"</span><span class="p">);</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="p">}</span> +<a id="line-376" name="line-376"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'-'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">g_string_append</span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\</span><span class="s">-"</span><span class="p">);</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="p">}</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">);</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="p">}</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="p">}</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-384" name="line-384"></a><span class="p">}</span> +<a id="line-385" name="line-385"></a> +<a id="line-386" name="line-386"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-387" name="line-387"></a><span class="nf">remove_mnemonic_character</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">)</span> +<a id="line-388" name="line-388"></a><span class="p">{</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gs</span><span class="p">;</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">first_mnemonic</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-391" name="line-391"></a> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="p">}</span> +<a id="line-395" name="line-395"></a> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">gs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="k">for</span><span class="p">(;</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">;</span><span class="w"> </span><span class="n">string</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">first_mnemonic</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'_'</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">first_mnemonic</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="p">}</span> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">);</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="p">}</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">gs</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-405" name="line-405"></a><span class="p">}</span> +<a id="line-406" name="line-406"></a> +<a id="line-407" name="line-407"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-408" name="line-408"></a><span class="nf">get_readable_date</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">CajaDateFormat</span><span class="w"> </span><span class="n">date_format_enum</span><span class="p">,</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">GDateTime</span><span class="w"> </span><span class="o">*</span><span class="n">file_date_time</span><span class="p">)</span> +<a id="line-410" name="line-410"></a><span class="p">{</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">format</span><span class="p">;</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">GDateTime</span><span class="w"> </span><span class="o">*</span><span class="n">now</span><span class="p">;</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">GTimeSpan</span><span class="w"> </span><span class="n">file_date_age</span><span class="p">;</span> +<a id="line-414" name="line-414"></a> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="cm">/* Base format of date column on caja date-format key */</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">date_format_enum</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">CAJA_DATE_FORMAT_LOCALE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_date_time_format</span><span class="w"> </span><span class="p">(</span><span class="n">file_date_time</span><span class="p">,</span><span class="w"> </span><span class="s">"%c"</span><span class="p">);</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">date_format_enum</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">CAJA_DATE_FORMAT_ISO</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_date_time_format</span><span class="w"> </span><span class="p">(</span><span class="n">file_date_time</span><span class="p">,</span><span class="w"> </span><span class="s">"%Y-%m-%d %H:%M:%S"</span><span class="p">);</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="p">}</span> +<a id="line-421" name="line-421"></a> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="n">now</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_date_time_new_now_local</span><span class="w"> </span><span class="p">();</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="n">file_date_age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_date_time_difference</span><span class="w"> </span><span class="p">(</span><span class="n">now</span><span class="p">,</span><span class="w"> </span><span class="n">file_date_time</span><span class="p">);</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">g_date_time_unref</span><span class="w"> </span><span class="p">(</span><span class="n">now</span><span class="p">);</span> +<a id="line-425" name="line-425"></a> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file_date_age</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">G_TIME_SPAN_DAY</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"today at %-I:%M %p"</span><span class="p">);</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file_date_age</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">G_TIME_SPAN_DAY</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"yesterday at %-I:%M %p"</span><span class="p">);</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"%A, %B %-d %Y at %-I:%M:%S %p"</span><span class="p">);</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="p">}</span> +<a id="line-433" name="line-433"></a> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_date_time_format</span><span class="w"> </span><span class="p">(</span><span class="n">file_date_time</span><span class="p">,</span><span class="w"> </span><span class="n">format</span><span class="p">);</span> +<a id="line-435" name="line-435"></a><span class="p">}</span> +<a id="line-436" name="line-436"></a> +<a id="line-437" name="line-437"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-438" name="line-438"></a><span class="nf">get_file_type_description</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_info</span><span class="p">)</span> +<a id="line-440" name="line-440"></a><span class="p">{</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">content_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">desc</span><span class="p">;</span> +<a id="line-443" name="line-443"></a> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">content_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_content_type</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">);</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="p">}</span> +<a id="line-447" name="line-447"></a> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">content_type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">g_content_type_is_unknown</span><span class="w"> </span><span class="p">(</span><span class="n">content_type</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_content_type_get_description</span><span class="w"> </span><span class="p">(</span><span class="s">"application/octet-stream"</span><span class="p">);</span> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="p">}</span> +<a id="line-451" name="line-451"></a> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_content_type_get_description</span><span class="w"> </span><span class="p">(</span><span class="n">content_type</span><span class="p">);</span> +<a id="line-453" name="line-453"></a> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_get_is_symlink</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-455" name="line-455"></a> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">symlink_target</span><span class="p">;</span> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">absolute_symlink</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">symlink_target</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_symlink_target</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">);</span> +<a id="line-461" name="line-461"></a> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_path_is_absolute</span><span class="w"> </span><span class="p">(</span><span class="n">symlink_target</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">dirname</span><span class="p">;</span> +<a id="line-464" name="line-464"></a> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="n">dirname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_path_get_dirname</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-466" name="line-466"></a><span class="w"> </span><span class="n">absolute_symlink</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">dirname</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">,</span><span class="w"> </span><span class="n">symlink_target</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dirname</span><span class="p">);</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="p">}</span> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">absolute_symlink</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">symlink_target</span><span class="p">);</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="p">}</span> +<a id="line-472" name="line-472"></a> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">absolute_symlink</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">g_ascii_strcasecmp</span><span class="w"> </span><span class="p">(</span><span class="n">content_type</span><span class="p">,</span><span class="w"> </span><span class="s">"x-special/socket"</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="p">(</span><span class="n">g_ascii_strcasecmp</span><span class="w"> </span><span class="p">(</span><span class="n">content_type</span><span class="p">,</span><span class="w"> </span><span class="s">"x-special/fifo"</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">absolute_symlink</span><span class="p">);</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"link (broken)"</span><span class="p">));</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="p">}</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="p">}</span> +<a id="line-481" name="line-481"></a> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"link to %s"</span><span class="p">),</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">content_type</span><span class="p">);</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">absolute_symlink</span><span class="p">);</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">str</span><span class="p">;</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="p">}</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">desc</span><span class="p">;</span> +<a id="line-488" name="line-488"></a><span class="p">}</span> +<a id="line-489" name="line-489"></a> +<a id="line-490" name="line-490"></a><span class="k">static</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-491" name="line-491"></a><span class="nf">gsearchtool_pixmap_file</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">partial_path</span><span class="p">)</span> +<a id="line-492" name="line-492"></a><span class="p">{</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">;</span> +<a id="line-494" name="line-494"></a> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_build_filename</span><span class="p">(</span><span class="n">DATADIR</span><span class="w"> </span><span class="s">"/pixmaps/mate-search-tool"</span><span class="p">,</span><span class="w"> </span><span class="n">partial_path</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="p">(</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">)){</span> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">path</span><span class="p">;</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="p">}</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-501" name="line-501"></a><span class="p">}</span> +<a id="line-502" name="line-502"></a> +<a id="line-503" name="line-503"></a><span class="k">static</span><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span> +<a id="line-504" name="line-504"></a><span class="nf">gsearchtool_load_thumbnail_frame</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-505" name="line-505"></a><span class="p">{</span> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">image_path</span><span class="p">;</span> +<a id="line-508" name="line-508"></a> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="n">image_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearchtool_pixmap_file</span><span class="p">(</span><span class="s">"thumbnail_frame.png"</span><span class="p">);</span> +<a id="line-510" name="line-510"></a> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">image_path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">){</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_new_from_file</span><span class="p">(</span><span class="n">image_path</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="p">}</span> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">g_free</span><span class="p">(</span><span class="n">image_path</span><span class="p">);</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-516" name="line-516"></a><span class="p">}</span> +<a id="line-517" name="line-517"></a> +<a id="line-518" name="line-518"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-519" name="line-519"></a><span class="nf">gsearchtool_draw_frame_row</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">frame_image</span><span class="p">,</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">target_width</span><span class="p">,</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">source_width</span><span class="p">,</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">source_v_position</span><span class="p">,</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">dest_v_position</span><span class="p">,</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">left_offset</span><span class="p">,</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">height</span><span class="p">)</span> +<a id="line-527" name="line-527"></a><span class="p">{</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">remaining_width</span><span class="p">;</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">h_offset</span><span class="p">;</span> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">slab_width</span><span class="p">;</span> +<a id="line-531" name="line-531"></a> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="n">remaining_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">target_width</span><span class="p">;</span> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="n">h_offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">remaining_width</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-535" name="line-535"></a><span class="w"> </span><span class="n">slab_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">remaining_width</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">source_width</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">source_width</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">remaining_width</span><span class="p">;</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="n">gdk_pixbuf_copy_area</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="n">left_offset</span><span class="p">,</span><span class="w"> </span><span class="n">source_v_position</span><span class="p">,</span><span class="w"> </span><span class="n">slab_width</span><span class="p">,</span> +<a id="line-537" name="line-537"></a><span class="w"> </span><span class="n">height</span><span class="p">,</span><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">left_offset</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">h_offset</span><span class="p">,</span><span class="w"> </span><span class="n">dest_v_position</span><span class="p">);</span> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="n">remaining_width</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">slab_width</span><span class="p">;</span> +<a id="line-539" name="line-539"></a><span class="w"> </span><span class="n">h_offset</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">slab_width</span><span class="p">;</span> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="p">}</span> +<a id="line-541" name="line-541"></a><span class="p">}</span> +<a id="line-542" name="line-542"></a> +<a id="line-543" name="line-543"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-544" name="line-544"></a><span class="nf">gsearchtool_draw_frame_column</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">frame_image</span><span class="p">,</span> +<a id="line-545" name="line-545"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">target_height</span><span class="p">,</span> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">source_height</span><span class="p">,</span> +<a id="line-547" name="line-547"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">source_h_position</span><span class="p">,</span> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">dest_h_position</span><span class="p">,</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">top_offset</span><span class="p">,</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">width</span><span class="p">)</span> +<a id="line-552" name="line-552"></a><span class="p">{</span> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">remaining_height</span><span class="p">;</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">v_offset</span><span class="p">;</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">slab_height</span><span class="p">;</span> +<a id="line-556" name="line-556"></a> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="n">remaining_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">target_height</span><span class="p">;</span> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="n">v_offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">remaining_height</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="n">slab_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">remaining_height</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">source_height</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">source_height</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">remaining_height</span><span class="p">;</span> +<a id="line-561" name="line-561"></a><span class="w"> </span><span class="n">gdk_pixbuf_copy_area</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="n">source_h_position</span><span class="p">,</span><span class="w"> </span><span class="n">top_offset</span><span class="p">,</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">slab_height</span><span class="p">,</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">dest_h_position</span><span class="p">,</span><span class="w"> </span><span class="n">top_offset</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">v_offset</span><span class="p">);</span> +<a id="line-563" name="line-563"></a><span class="w"> </span><span class="n">remaining_height</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">slab_height</span><span class="p">;</span> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="n">v_offset</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">slab_height</span><span class="p">;</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="p">}</span> +<a id="line-566" name="line-566"></a><span class="p">}</span> +<a id="line-567" name="line-567"></a> +<a id="line-568" name="line-568"></a><span class="k">static</span><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span> +<a id="line-569" name="line-569"></a><span class="nf">gsearchtool_stretch_frame_image</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">frame_image</span><span class="p">,</span> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">left_offset</span><span class="p">,</span> +<a id="line-571" name="line-571"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">top_offset</span><span class="p">,</span> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">,</span> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">dest_width</span><span class="p">,</span> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">dest_height</span><span class="p">,</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">fill_flag</span><span class="p">)</span> +<a id="line-577" name="line-577"></a><span class="p">{</span> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">;</span> +<a id="line-579" name="line-579"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">frame_width</span><span class="p">,</span><span class="w"> </span><span class="n">frame_height</span><span class="p">;</span> +<a id="line-580" name="line-580"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">target_width</span><span class="p">,</span><span class="w"> </span><span class="n">target_frame_width</span><span class="p">;</span> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">target_height</span><span class="p">,</span><span class="w"> </span><span class="n">target_frame_height</span><span class="p">;</span> +<a id="line-582" name="line-582"></a> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="n">frame_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_width</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">);</span> +<a id="line-584" name="line-584"></a><span class="w"> </span><span class="n">frame_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_height</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">);</span> +<a id="line-585" name="line-585"></a> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">fill_flag</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-587" name="line-587"></a><span class="w"> </span><span class="n">result_pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_scale_simple</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="n">dest_width</span><span class="p">,</span><span class="w"> </span><span class="n">dest_height</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_INTERP_NEAREST</span><span class="p">);</span> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-589" name="line-589"></a><span class="w"> </span><span class="n">result_pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_COLORSPACE_RGB</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="n">dest_width</span><span class="p">,</span><span class="w"> </span><span class="n">dest_height</span><span class="p">);</span> +<a id="line-590" name="line-590"></a><span class="w"> </span><span class="p">}</span> +<a id="line-591" name="line-591"></a> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="cm">/* clear the new pixbuf */</span> +<a id="line-593" name="line-593"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">fill_flag</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="n">gdk_pixbuf_fill</span><span class="w"> </span><span class="p">(</span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="mh">0xffffffff</span><span class="p">);</span> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="p">}</span> +<a id="line-596" name="line-596"></a> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="n">target_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dest_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">left_offset</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">right_offset</span><span class="p">;</span> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="n">target_frame_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">frame_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">left_offset</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">right_offset</span><span class="p">;</span> +<a id="line-599" name="line-599"></a> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="n">target_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dest_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">top_offset</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">;</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="n">target_frame_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">frame_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">top_offset</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">;</span> +<a id="line-602" name="line-602"></a> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="cm">/* Draw the left top corner and top row */</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">gdk_pixbuf_copy_area</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">left_offset</span><span class="p">,</span><span class="w"> </span><span class="n">top_offset</span><span class="p">,</span><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="n">gsearchtool_draw_frame_row</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="n">target_width</span><span class="p">,</span><span class="w"> </span><span class="n">target_frame_width</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">left_offset</span><span class="p">,</span><span class="w"> </span><span class="n">top_offset</span><span class="p">);</span> +<a id="line-607" name="line-607"></a> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="cm">/* Draw the right top corner and left column */</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">gdk_pixbuf_copy_area</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="n">frame_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span><span class="w"> </span><span class="n">top_offset</span><span class="p">,</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">dest_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="n">gsearchtool_draw_frame_column</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="n">target_height</span><span class="p">,</span><span class="w"> </span><span class="n">target_frame_height</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">top_offset</span><span class="p">,</span><span class="w"> </span><span class="n">left_offset</span><span class="p">);</span> +<a id="line-613" name="line-613"></a> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="cm">/* Draw the bottom right corner and bottom row */</span> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="n">gdk_pixbuf_copy_area</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="n">frame_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span><span class="w"> </span><span class="n">frame_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">,</span> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">,</span><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">dest_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="n">dest_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">);</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="n">gsearchtool_draw_frame_row</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="n">target_width</span><span class="p">,</span><span class="w"> </span><span class="n">target_frame_width</span><span class="p">,</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="n">frame_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">,</span><span class="w"> </span><span class="n">dest_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">,</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">left_offset</span><span class="p">,</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">);</span> +<a id="line-621" name="line-621"></a> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="cm">/* Draw the bottom left corner and the right column */</span> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="n">gdk_pixbuf_copy_area</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">frame_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">,</span><span class="w"> </span><span class="n">left_offset</span><span class="p">,</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">,</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">dest_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">);</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="n">gsearchtool_draw_frame_column</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="n">target_height</span><span class="p">,</span><span class="w"> </span><span class="n">target_frame_height</span><span class="p">,</span> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="n">frame_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span><span class="w"> </span><span class="n">dest_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">top_offset</span><span class="p">,</span><span class="w"> </span><span class="n">right_offset</span><span class="p">);</span> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">;</span> +<a id="line-629" name="line-629"></a><span class="p">}</span> +<a id="line-630" name="line-630"></a> +<a id="line-631" name="line-631"></a><span class="k">static</span><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span> +<a id="line-632" name="line-632"></a><span class="nf">gsearchtool_embed_image_in_frame</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">source_image</span><span class="p">,</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">frame_image</span><span class="p">,</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">left_offset</span><span class="p">,</span> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">top_offset</span><span class="p">,</span> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">)</span> +<a id="line-638" name="line-638"></a><span class="p">{</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">;</span> +<a id="line-640" name="line-640"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">source_width</span><span class="p">,</span><span class="w"> </span><span class="n">source_height</span><span class="p">;</span> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">dest_width</span><span class="p">,</span><span class="w"> </span><span class="n">dest_height</span><span class="p">;</span> +<a id="line-642" name="line-642"></a> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="n">source_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_width</span><span class="w"> </span><span class="p">(</span><span class="n">source_image</span><span class="p">);</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="n">source_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_height</span><span class="w"> </span><span class="p">(</span><span class="n">source_image</span><span class="p">);</span> +<a id="line-645" name="line-645"></a> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="n">dest_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source_width</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">left_offset</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">right_offset</span><span class="p">;</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="n">dest_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source_height</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">top_offset</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">;</span> +<a id="line-648" name="line-648"></a> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="n">result_pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearchtool_stretch_frame_image</span><span class="w"> </span><span class="p">(</span><span class="n">frame_image</span><span class="p">,</span><span class="w"> </span><span class="n">left_offset</span><span class="p">,</span><span class="w"> </span><span class="n">top_offset</span><span class="p">,</span><span class="w"> </span><span class="n">right_offset</span><span class="p">,</span><span class="w"> </span><span class="n">bottom_offset</span><span class="p">,</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="n">dest_width</span><span class="p">,</span><span class="w"> </span><span class="n">dest_height</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-651" name="line-651"></a> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="n">gdk_pixbuf_copy_area</span><span class="w"> </span><span class="p">(</span><span class="n">source_image</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">source_width</span><span class="p">,</span><span class="w"> </span><span class="n">source_height</span><span class="p">,</span><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">left_offset</span><span class="p">,</span><span class="w"> </span><span class="n">top_offset</span><span class="p">);</span> +<a id="line-653" name="line-653"></a> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result_pixbuf</span><span class="p">;</span> +<a id="line-655" name="line-655"></a><span class="p">}</span> +<a id="line-656" name="line-656"></a> +<a id="line-657" name="line-657"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-658" name="line-658"></a><span class="nf">gsearchtool_thumbnail_frame_image</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">)</span> +<a id="line-659" name="line-659"></a><span class="p">{</span> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">pixbuf_with_frame</span><span class="p">;</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">frame</span><span class="p">;</span> +<a id="line-662" name="line-662"></a> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="n">frame</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearchtool_load_thumbnail_frame</span><span class="w"> </span><span class="p">();</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">frame</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="p">}</span> +<a id="line-667" name="line-667"></a> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="n">pixbuf_with_frame</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearchtool_embed_image_in_frame</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">frame</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">pixbuf</span><span class="p">);</span> +<a id="line-670" name="line-670"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">frame</span><span class="p">);</span> +<a id="line-671" name="line-671"></a> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="o">*</span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pixbuf_with_frame</span><span class="p">;</span> +<a id="line-673" name="line-673"></a><span class="p">}</span> +<a id="line-674" name="line-674"></a> +<a id="line-675" name="line-675"></a><span class="k">static</span><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span> +<a id="line-676" name="line-676"></a><span class="nf">gsearchtool_get_thumbnail_image</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">thumbnail</span><span class="p">)</span> +<a id="line-677" name="line-677"></a><span class="p">{</span> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-679" name="line-679"></a> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">thumbnail</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">thumbnail</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-682" name="line-682"></a> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">thumbnail_pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-684" name="line-684"></a><span class="w"> </span><span class="n">gfloat</span><span class="w"> </span><span class="n">scale_factor_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">1.0</span><span class="p">;</span> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="n">gfloat</span><span class="w"> </span><span class="n">scale_factor_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">1.0</span><span class="p">;</span> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">scale_x</span><span class="p">;</span> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">scale_y</span><span class="p">;</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">width</span><span class="p">;</span> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-690" name="line-690"></a> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="n">thumbnail_pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_new_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">thumbnail</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="n">gsearchtool_thumbnail_frame_image</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">thumbnail_pixbuf</span><span class="p">);</span> +<a id="line-693" name="line-693"></a> +<a id="line-694" name="line-694"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_width</span><span class="w"> </span><span class="p">(</span><span class="n">thumbnail_pixbuf</span><span class="p">);</span> +<a id="line-695" name="line-695"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">width</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">ICON_SIZE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="n">scale_factor_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gfloat</span><span class="p">)</span><span class="w"> </span><span class="n">ICON_SIZE</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="n">gfloat</span><span class="p">)</span><span class="w"> </span><span class="n">width</span><span class="p">;</span> +<a id="line-697" name="line-697"></a><span class="w"> </span><span class="p">}</span> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_height</span><span class="w"> </span><span class="p">(</span><span class="n">thumbnail_pixbuf</span><span class="p">);</span> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">height</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">ICON_SIZE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="n">scale_factor_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gfloat</span><span class="p">)</span><span class="w"> </span><span class="n">ICON_SIZE</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="n">gfloat</span><span class="p">)</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-701" name="line-701"></a><span class="w"> </span><span class="p">}</span> +<a id="line-702" name="line-702"></a> +<a id="line-703" name="line-703"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">width</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">height</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-704" name="line-704"></a><span class="w"> </span><span class="n">scale_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ICON_SIZE</span><span class="p">;</span> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="n">scale_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">height</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">scale_factor_x</span><span class="p">);</span> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="p">}</span> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-708" name="line-708"></a><span class="w"> </span><span class="n">scale_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">width</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">scale_factor_y</span><span class="p">);</span> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="n">scale_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ICON_SIZE</span><span class="p">;</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="p">}</span> +<a id="line-711" name="line-711"></a> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_scale_simple</span><span class="w"> </span><span class="p">(</span><span class="n">thumbnail_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">scale_x</span><span class="p">,</span><span class="w"> </span><span class="n">scale_y</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_INTERP_BILINEAR</span><span class="p">);</span> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">thumbnail_pixbuf</span><span class="p">);</span> +<a id="line-714" name="line-714"></a><span class="w"> </span><span class="p">}</span> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="p">}</span> +<a id="line-716" name="line-716"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-717" name="line-717"></a><span class="p">}</span> +<a id="line-718" name="line-718"></a> +<a id="line-719" name="line-719"></a><span class="k">static</span><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span> +<a id="line-720" name="line-720"></a><span class="nf">get_themed_icon_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">GThemedIcon</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">icon</span><span class="p">,</span> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">size</span><span class="p">,</span> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="n">GtkIconTheme</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">icon_theme</span><span class="p">)</span> +<a id="line-723" name="line-723"></a><span class="p">{</span> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">icon_names</span><span class="p">;</span> +<a id="line-725" name="line-725"></a><span class="w"> </span><span class="n">GtkIconInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">icon_info</span><span class="p">;</span> +<a id="line-726" name="line-726"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-728" name="line-728"></a> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">icon</span><span class="p">,</span><span class="w"> </span><span class="s">"names"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">icon_names</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-730" name="line-730"></a> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="n">icon_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_icon_theme_choose_icon</span><span class="w"> </span><span class="p">(</span><span class="n">icon_theme</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="n">icon_names</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">icon_info</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="n">icon_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_icon_theme_lookup_icon</span><span class="w"> </span><span class="p">(</span><span class="n">icon_theme</span><span class="p">,</span><span class="w"> </span><span class="s">"text-x-generic"</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_LOOKUP_USE_BUILTIN</span><span class="p">);</span> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="p">}</span> +<a id="line-735" name="line-735"></a><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_icon_info_load_icon</span><span class="w"> </span><span class="p">(</span><span class="n">icon_info</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Could not load icon pixbuf: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="p">}</span> +<a id="line-740" name="line-740"></a> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">icon_info</span><span class="p">);</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">icon_names</span><span class="p">);</span> +<a id="line-743" name="line-743"></a> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-745" name="line-745"></a><span class="p">}</span> +<a id="line-746" name="line-746"></a> +<a id="line-747" name="line-747"></a><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span> +<a id="line-748" name="line-748"></a><span class="nf">get_file_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">,</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_info</span><span class="p">)</span> +<a id="line-750" name="line-750"></a><span class="p">{</span> +<a id="line-751" name="line-751"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="n">GIcon</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">thumbnail_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-754" name="line-754"></a> +<a id="line-755" name="line-755"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="p">}</span> +<a id="line-758" name="line-758"></a> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="n">icon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_icon</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">);</span> +<a id="line-760" name="line-760"></a> +<a id="line-761" name="line-761"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_thumbnails</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="n">thumbnail_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_attribute_byte_string</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_THUMBNAIL_PATH</span><span class="p">);</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="p">}</span> +<a id="line-764" name="line-764"></a> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">thumbnail_path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-766" name="line-766"></a><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearchtool_get_thumbnail_image</span><span class="w"> </span><span class="p">(</span><span class="n">thumbnail_path</span><span class="p">);</span> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="p">}</span> +<a id="line-768" name="line-768"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">icon_string</span><span class="p">;</span> +<a id="line-770" name="line-770"></a> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="n">icon_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_icon_to_string</span><span class="w"> </span><span class="p">(</span><span class="n">icon</span><span class="p">);</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">g_hash_table_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_filename_hash_table</span><span class="p">,</span><span class="w"> </span><span class="n">icon_string</span><span class="p">);</span> +<a id="line-773" name="line-773"></a> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_themed_icon_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">G_THEMED_ICON</span><span class="w"> </span><span class="p">(</span><span class="n">icon</span><span class="p">),</span><span class="w"> </span><span class="n">ICON_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_icon_theme_get_default</span><span class="w"> </span><span class="p">());</span> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="n">g_hash_table_insert</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_filename_hash_table</span><span class="p">,</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">icon_string</span><span class="p">),</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">);</span> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="p">}</span> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">icon_string</span><span class="p">);</span> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="p">}</span> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-781" name="line-781"></a><span class="p">}</span> +<a id="line-782" name="line-782"></a> +<a id="line-783" name="line-783"></a><span class="n">gboolean</span> +<a id="line-784" name="line-784"></a><span class="nf">open_file_with_filemanager</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">)</span> +<a id="line-786" name="line-786"></a><span class="p">{</span> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="n">GDesktopAppInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">d_app_info</span><span class="p">;</span> +<a id="line-788" name="line-788"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">key_file</span><span class="p">;</span> +<a id="line-789" name="line-789"></a><span class="w"> </span><span class="n">GdkAppLaunchContext</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">ctx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-790" name="line-790"></a><span class="hll"><span class="w"> </span><span class="n">GdkScreen</span><span class="w"> </span><span class="o">*</span><span class="n">screen</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'screen' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'screen' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-791" name="line-791"></a><span class="hll"><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'display' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'display' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-792" name="line-792"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-793" name="line-793"></a><span class="w"> </span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_app_info</span><span class="p">;</span> +<a id="line-794" name="line-794"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_file</span><span class="p">;</span> +<a id="line-795" name="line-795"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">command</span><span class="p">;</span> +<a id="line-796" name="line-796"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">contents</span><span class="p">;</span> +<a id="line-797" name="line-797"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">uri</span><span class="p">;</span> +<a id="line-798" name="line-798"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-799" name="line-799"></a> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_to_uri</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_prepend</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span> +<a id="line-802" name="line-802"></a> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="n">g_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="n">g_app_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_default_handler</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-805" name="line-805"></a> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info_get_executable</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info</span><span class="p">),</span><span class="w"> </span><span class="s">"caja"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="s">"caja "</span><span class="p">,</span> +<a id="line-808" name="line-808"></a><span class="w"> </span><span class="s">"--sm-disable "</span><span class="p">,</span> +<a id="line-809" name="line-809"></a><span class="w"> </span><span class="s">"--no-desktop "</span><span class="p">,</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="s">"--no-default-window "</span><span class="p">,</span> +<a id="line-811" name="line-811"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="p">}</span> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info_get_executable</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info</span><span class="p">),</span> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-816" name="line-816"></a><span class="w"> </span><span class="p">}</span> +<a id="line-817" name="line-817"></a> +<a id="line-818" name="line-818"></a><span class="w"> </span><span class="n">contents</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"[Desktop Entry]</span><span class="se">\n</span><span class="s">"</span> +<a id="line-819" name="line-819"></a><span class="w"> </span><span class="s">"Name=Caja</span><span class="se">\n</span><span class="s">"</span> +<a id="line-820" name="line-820"></a><span class="w"> </span><span class="s">"Icon=file-manager</span><span class="se">\n</span><span class="s">"</span> +<a id="line-821" name="line-821"></a><span class="w"> </span><span class="s">"Exec=%s</span><span class="se">\n</span><span class="s">"</span> +<a id="line-822" name="line-822"></a><span class="w"> </span><span class="s">"Terminal=false</span><span class="se">\n</span><span class="s">"</span> +<a id="line-823" name="line-823"></a><span class="w"> </span><span class="s">"StartupNotify=true</span><span class="se">\n</span><span class="s">"</span> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="s">"Type=Application</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-825" name="line-825"></a><span class="w"> </span><span class="n">command</span><span class="p">);</span> +<a id="line-826" name="line-826"></a><span class="w"> </span><span class="n">key_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="n">g_key_file_load_from_data</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">,</span><span class="w"> </span><span class="n">contents</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="p">(</span><span class="n">contents</span><span class="p">),</span><span class="w"> </span><span class="n">G_KEY_FILE_NONE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="n">d_app_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_desktop_app_info_new_from_keyfile</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">);</span> +<a id="line-829" name="line-829"></a> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">d_app_info</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-831" name="line-831"></a><span class="w"> </span><span class="n">screen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_screen</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_screen_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">);</span> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="n">ctx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_app_launch_context</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="n">gdk_app_launch_context_set_screen</span><span class="w"> </span><span class="p">(</span><span class="n">ctx</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_widget_get_screen</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-835" name="line-835"></a> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_app_info_launch_uris</span><span class="w"> </span><span class="p">(</span><span class="n">G_APP_INFO</span><span class="w"> </span><span class="p">(</span><span class="n">d_app_info</span><span class="p">),</span><span class="w"> </span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">G_APP_LAUNCH_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">ctx</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="p">}</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-839" name="line-839"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="p">}</span> +<a id="line-841" name="line-841"></a> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_app_info</span><span class="p">);</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">d_app_info</span><span class="p">);</span> +<a id="line-844" name="line-844"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">);</span> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">ctx</span><span class="p">);</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">key_file</span><span class="p">);</span> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">contents</span><span class="p">);</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">);</span> +<a id="line-850" name="line-850"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">uri</span><span class="p">);</span> +<a id="line-851" name="line-851"></a> +<a id="line-852" name="line-852"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-853" name="line-853"></a><span class="p">}</span> +<a id="line-854" name="line-854"></a> +<a id="line-855" name="line-855"></a><span class="n">gboolean</span> +<a id="line-856" name="line-856"></a><span class="nf">open_file_with_application</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-857" name="line-857"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-858" name="line-858"></a><span class="w"> </span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">app</span><span class="p">)</span> +<a id="line-859" name="line-859"></a><span class="p">{</span> +<a id="line-860" name="line-860"></a><span class="w"> </span><span class="n">GdkAppLaunchContext</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">context</span><span class="p">;</span> +<a id="line-861" name="line-861"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-862" name="line-862"></a><span class="w"> </span><span class="n">GdkScreen</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">screen</span><span class="p">;</span> +<a id="line-863" name="line-863"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-864" name="line-864"></a> +<a id="line-865" name="line-865"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_DIR</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-866" name="line-866"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-867" name="line-867"></a><span class="w"> </span><span class="p">}</span> +<a id="line-868" name="line-868"></a> +<a id="line-869" name="line-869"></a><span class="w"> </span><span class="n">screen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_screen</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-870" name="line-870"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_screen_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">);</span> +<a id="line-871" name="line-871"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_app_launch_context</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-872" name="line-872"></a><span class="w"> </span><span class="n">gdk_app_launch_context_set_screen</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">screen</span><span class="p">);</span> +<a id="line-873" name="line-873"></a> +<a id="line-874" name="line-874"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-875" name="line-875"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">uri</span><span class="p">;</span> +<a id="line-876" name="line-876"></a> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_to_uri</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-878" name="line-878"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_app_info_launch_default_for_uri</span><span class="w"> </span><span class="p">(</span><span class="n">uri</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GAppLaunchContext</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">uri</span><span class="p">);</span> +<a id="line-880" name="line-880"></a><span class="w"> </span><span class="p">}</span> +<a id="line-881" name="line-881"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_file_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-884" name="line-884"></a> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="n">g_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-886" name="line-886"></a> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-889" name="line-889"></a><span class="w"> </span><span class="p">}</span> +<a id="line-890" name="line-890"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-891" name="line-891"></a><span class="w"> </span><span class="n">g_file_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_prepend</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_list</span><span class="p">,</span><span class="w"> </span><span class="n">g_file</span><span class="p">);</span> +<a id="line-892" name="line-892"></a> +<a id="line-893" name="line-893"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_app_info_launch</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="p">,</span><span class="w"> </span><span class="n">g_file_list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GAppLaunchContext</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-894" name="line-894"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_list</span><span class="p">);</span> +<a id="line-895" name="line-895"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">);</span> +<a id="line-896" name="line-896"></a><span class="w"> </span><span class="p">}</span> +<a id="line-897" name="line-897"></a><span class="w"> </span><span class="p">}</span> +<a id="line-898" name="line-898"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-899" name="line-899"></a><span class="p">}</span> +<a id="line-900" name="line-900"></a> +<a id="line-901" name="line-901"></a><span class="n">gboolean</span> +<a id="line-902" name="line-902"></a><span class="nf">launch_file</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">)</span> +<a id="line-903" name="line-903"></a><span class="p">{</span> +<a id="line-904" name="line-904"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">content_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_content_type_guess</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-905" name="line-905"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-906" name="line-906"></a> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_EXECUTABLE</span><span class="p">))</span><span class="w"> </span><span class="o">&&</span> +<a id="line-908" name="line-908"></a><span class="w"> </span><span class="p">(</span><span class="n">g_ascii_strcasecmp</span><span class="w"> </span><span class="p">(</span><span class="n">content_type</span><span class="p">,</span><span class="w"> </span><span class="n">BINARY_EXEC_MIME_TYPE</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_spawn_command_line_async</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-910" name="line-910"></a><span class="w"> </span><span class="p">}</span> +<a id="line-911" name="line-911"></a> +<a id="line-912" name="line-912"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-913" name="line-913"></a><span class="p">}</span> +<a id="line-914" name="line-914"></a> +<a id="line-915" name="line-915"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-916" name="line-916"></a><span class="nf">gsearchtool_get_unique_filename</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">,</span> +<a id="line-917" name="line-917"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">suffix</span><span class="p">)</span> +<a id="line-918" name="line-918"></a><span class="p">{</span> +<a id="line-919" name="line-919"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">num_of_words</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">12</span><span class="p">;</span> +<a id="line-920" name="line-920"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">words</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-921" name="line-921"></a><span class="w"> </span><span class="s">"foo"</span><span class="p">,</span> +<a id="line-922" name="line-922"></a><span class="w"> </span><span class="s">"bar"</span><span class="p">,</span> +<a id="line-923" name="line-923"></a><span class="w"> </span><span class="s">"blah"</span><span class="p">,</span> +<a id="line-924" name="line-924"></a><span class="w"> </span><span class="s">"cranston"</span><span class="p">,</span> +<a id="line-925" name="line-925"></a><span class="w"> </span><span class="s">"frobate"</span><span class="p">,</span> +<a id="line-926" name="line-926"></a><span class="w"> </span><span class="s">"hadjaha"</span><span class="p">,</span> +<a id="line-927" name="line-927"></a><span class="w"> </span><span class="s">"greasy"</span><span class="p">,</span> +<a id="line-928" name="line-928"></a><span class="w"> </span><span class="s">"hammer"</span><span class="p">,</span> +<a id="line-929" name="line-929"></a><span class="w"> </span><span class="s">"eek"</span><span class="p">,</span> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="s">"larry"</span><span class="p">,</span> +<a id="line-931" name="line-931"></a><span class="w"> </span><span class="s">"curly"</span><span class="p">,</span> +<a id="line-932" name="line-932"></a><span class="w"> </span><span class="s">"moe"</span><span class="p">,</span> +<a id="line-933" name="line-933"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">};</span> +<a id="line-934" name="line-934"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-935" name="line-935"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">exists</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-936" name="line-936"></a> +<a id="line-937" name="line-937"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">exists</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-938" name="line-938"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">;</span> +<a id="line-939" name="line-939"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">rnd</span><span class="p">;</span> +<a id="line-940" name="line-940"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">word</span><span class="p">;</span> +<a id="line-941" name="line-941"></a> +<a id="line-942" name="line-942"></a><span class="w"> </span><span class="n">rnd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rand</span><span class="w"> </span><span class="p">();</span> +<a id="line-943" name="line-943"></a><span class="w"> </span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rand</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="n">num_of_words</span><span class="p">;</span> +<a id="line-944" name="line-944"></a> +<a id="line-945" name="line-945"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s-%010x%s"</span><span class="p">,</span> +<a id="line-946" name="line-946"></a><span class="w"> </span><span class="n">words</span><span class="w"> </span><span class="p">[</span><span class="n">word</span><span class="p">],</span> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="p">(</span><span class="n">guint</span><span class="p">)</span><span class="w"> </span><span class="n">rnd</span><span class="p">,</span> +<a id="line-948" name="line-948"></a><span class="w"> </span><span class="n">suffix</span><span class="p">);</span> +<a id="line-949" name="line-949"></a> +<a id="line-950" name="line-950"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">retval</span><span class="p">);</span> +<a id="line-951" name="line-951"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="n">exists</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">retval</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">);</span> +<a id="line-953" name="line-953"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-954" name="line-954"></a><span class="w"> </span><span class="p">}</span> +<a id="line-955" name="line-955"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-956" name="line-956"></a><span class="p">}</span> +<a id="line-957" name="line-957"></a> +<a id="line-958" name="line-958"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-959" name="line-959"></a><span class="nf">gsearchtool_button_new_with_icon</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">,</span> +<a id="line-960" name="line-960"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">icon_name</span><span class="p">)</span> +<a id="line-961" name="line-961"></a><span class="p">{</span> +<a id="line-962" name="line-962"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">button</span><span class="p">;</span> +<a id="line-963" name="line-963"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">hbox</span><span class="p">;</span> +<a id="line-964" name="line-964"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">image</span><span class="p">;</span> +<a id="line-965" name="line-965"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">label</span><span class="p">;</span> +<a id="line-966" name="line-966"></a> +<a id="line-967" name="line-967"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">);</span> +<a id="line-969" name="line-969"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">));</span> +<a id="line-970" name="line-970"></a><span class="w"> </span><span class="n">image</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="n">icon_name</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_BUTTON</span><span class="p">);</span> +<a id="line-971" name="line-971"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-972" name="line-972"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">image</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-973" name="line-973"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-974" name="line-974"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">),</span><span class="w"> </span><span class="n">hbox</span><span class="p">);</span> +<a id="line-975" name="line-975"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">);</span> +<a id="line-976" name="line-976"></a> +<a id="line-977" name="line-977"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">button</span><span class="p">;</span> +<a id="line-978" name="line-978"></a><span class="p">}</span> +<a id="line-979" name="line-979"></a> +<a id="line-980" name="line-980"></a><span class="n">GSList</span><span class="w"> </span><span class="o">*</span> +<a id="line-981" name="line-981"></a><span class="nf">gsearchtool_get_columns_order</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">treeview</span><span class="p">)</span> +<a id="line-982" name="line-982"></a><span class="p">{</span> +<a id="line-983" name="line-983"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">order</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-984" name="line-984"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">columns</span><span class="p">;</span> +<a id="line-985" name="line-985"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">col</span><span class="p">;</span> +<a id="line-986" name="line-986"></a> +<a id="line-987" name="line-987"></a><span class="w"> </span><span class="n">columns</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_columns</span><span class="w"> </span><span class="p">(</span><span class="n">treeview</span><span class="p">);</span> +<a id="line-988" name="line-988"></a> +<a id="line-989" name="line-989"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">columns</span><span class="p">;</span><span class="w"> </span><span class="n">col</span><span class="p">;</span><span class="w"> </span><span class="n">col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">col</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-990" name="line-990"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">id</span><span class="p">;</span> +<a id="line-991" name="line-991"></a> +<a id="line-992" name="line-992"></a><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_get_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">col</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="n">order</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_prepend</span><span class="w"> </span><span class="p">(</span><span class="n">order</span><span class="p">,</span><span class="w"> </span><span class="n">GINT_TO_POINTER</span><span class="w"> </span><span class="p">(</span><span class="n">id</span><span class="p">));</span> +<a id="line-994" name="line-994"></a><span class="w"> </span><span class="p">}</span> +<a id="line-995" name="line-995"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">columns</span><span class="p">);</span> +<a id="line-996" name="line-996"></a> +<a id="line-997" name="line-997"></a><span class="w"> </span><span class="n">order</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_reverse</span><span class="w"> </span><span class="p">(</span><span class="n">order</span><span class="p">);</span> +<a id="line-998" name="line-998"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">order</span><span class="p">;</span> +<a id="line-999" name="line-999"></a><span class="p">}</span> +<a id="line-1000" name="line-1000"></a> +<a id="line-1001" name="line-1001"></a><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span> +<a id="line-1002" name="line-1002"></a><span class="nf">gsearchtool_gtk_tree_view_get_column_with_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">treeview</span><span class="p">,</span> +<a id="line-1003" name="line-1003"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">id</span><span class="p">)</span> +<a id="line-1004" name="line-1004"></a><span class="p">{</span> +<a id="line-1005" name="line-1005"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1006" name="line-1006"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">columns</span><span class="p">;</span> +<a id="line-1007" name="line-1007"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">it</span><span class="p">;</span> +<a id="line-1008" name="line-1008"></a> +<a id="line-1009" name="line-1009"></a><span class="w"> </span><span class="n">columns</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_columns</span><span class="w"> </span><span class="p">(</span><span class="n">treeview</span><span class="p">);</span> +<a id="line-1010" name="line-1010"></a> +<a id="line-1011" name="line-1011"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">columns</span><span class="p">;</span><span class="w"> </span><span class="n">it</span><span class="p">;</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">it</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1012" name="line-1012"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_column_get_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">it</span><span class="o">-></span><span class="n">data</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">id</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1013" name="line-1013"></a><span class="w"> </span><span class="n">col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">it</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1014" name="line-1014"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1015" name="line-1015"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1016" name="line-1016"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1017" name="line-1017"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">columns</span><span class="p">);</span> +<a id="line-1018" name="line-1018"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">col</span><span class="p">;</span> +<a id="line-1019" name="line-1019"></a><span class="p">}</span> +<a id="line-1020" name="line-1020"></a> +<a id="line-1021" name="line-1021"></a><span class="kt">void</span> +<a id="line-1022" name="line-1022"></a><span class="nf">gsearchtool_set_columns_order</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">treeview</span><span class="p">)</span> +<a id="line-1023" name="line-1023"></a><span class="p">{</span> +<a id="line-1024" name="line-1024"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">last</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1025" name="line-1025"></a><span class="w"> </span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">settings</span><span class="p">;</span> +<a id="line-1026" name="line-1026"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">value</span><span class="p">;</span> +<a id="line-1027" name="line-1027"></a> +<a id="line-1028" name="line-1028"></a><span class="w"> </span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="s">"org.mate.search-tool"</span><span class="p">);</span> +<a id="line-1029" name="line-1029"></a> +<a id="line-1030" name="line-1030"></a><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_value</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="s">"columns-order"</span><span class="p">);</span> +<a id="line-1031" name="line-1031"></a> +<a id="line-1032" name="line-1032"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1033" name="line-1033"></a><span class="w"> </span><span class="n">GVariantIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-1034" name="line-1034"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-1035" name="line-1035"></a> +<a id="line-1036" name="line-1036"></a><span class="w"> </span><span class="n">g_variant_get</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="s">"ai"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1037" name="line-1037"></a> +<a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_variant_iter_next_value</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1039" name="line-1039"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">cur</span><span class="p">;</span> +<a id="line-1040" name="line-1040"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">id</span><span class="p">;</span> +<a id="line-1041" name="line-1041"></a> +<a id="line-1042" name="line-1042"></a><span class="w"> </span><span class="n">g_variant_get</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="s">"i"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">id</span><span class="p">);</span> +<a id="line-1043" name="line-1043"></a> +<a id="line-1044" name="line-1044"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">id</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">NUM_COLUMNS</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1045" name="line-1045"></a> +<a id="line-1046" name="line-1046"></a><span class="w"> </span><span class="n">cur</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearchtool_gtk_tree_view_get_column_with_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">treeview</span><span class="p">,</span><span class="w"> </span><span class="n">id</span><span class="p">);</span> +<a id="line-1047" name="line-1047"></a> +<a id="line-1048" name="line-1048"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">cur</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">cur</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">last</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1049" name="line-1049"></a><span class="w"> </span><span class="n">gtk_tree_view_move_column_after</span><span class="w"> </span><span class="p">(</span><span class="n">treeview</span><span class="p">,</span><span class="w"> </span><span class="n">cur</span><span class="p">,</span><span class="w"> </span><span class="n">last</span><span class="p">);</span> +<a id="line-1050" name="line-1050"></a><span class="w"> </span><span class="n">last</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cur</span><span class="p">;</span> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1052" name="line-1052"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">);</span> +<a id="line-1054" name="line-1054"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1055" name="line-1055"></a><span class="w"> </span><span class="n">g_variant_iter_free</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1056" name="line-1056"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-1057" name="line-1057"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1058" name="line-1058"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">);</span> +<a id="line-1059" name="line-1059"></a><span class="p">}</span> +<a id="line-1060" name="line-1060"></a> +<a id="line-1061" name="line-1061"></a><span class="kt">void</span> +<a id="line-1062" name="line-1062"></a><span class="nf">gsearchtool_get_stored_window_geometry</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">width</span><span class="p">,</span> +<a id="line-1063" name="line-1063"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">height</span><span class="p">)</span> +<a id="line-1064" name="line-1064"></a><span class="p">{</span> +<a id="line-1065" name="line-1065"></a><span class="w"> </span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">settings</span><span class="p">;</span> +<a id="line-1066" name="line-1066"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">saved_width</span><span class="p">;</span> +<a id="line-1067" name="line-1067"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">saved_height</span><span class="p">;</span> +<a id="line-1068" name="line-1068"></a> +<a id="line-1069" name="line-1069"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">width</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1070" name="line-1070"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1071" name="line-1071"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1072" name="line-1072"></a> +<a id="line-1073" name="line-1073"></a><span class="w"> </span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="s">"org.mate.search-tool"</span><span class="p">);</span> +<a id="line-1074" name="line-1074"></a> +<a id="line-1075" name="line-1075"></a><span class="w"> </span><span class="n">saved_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_int</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="s">"default-window-width"</span><span class="p">);</span> +<a id="line-1076" name="line-1076"></a><span class="w"> </span><span class="n">saved_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_int</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="s">"default-window-height"</span><span class="p">);</span> +<a id="line-1077" name="line-1077"></a> +<a id="line-1078" name="line-1078"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">saved_width</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1079" name="line-1079"></a><span class="w"> </span><span class="n">saved_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DEFAULT_WINDOW_WIDTH</span><span class="p">;</span> +<a id="line-1080" name="line-1080"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1081" name="line-1081"></a> +<a id="line-1082" name="line-1082"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">saved_height</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1083" name="line-1083"></a><span class="w"> </span><span class="n">saved_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DEFAULT_WINDOW_HEIGHT</span><span class="p">;</span> +<a id="line-1084" name="line-1084"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1085" name="line-1085"></a> +<a id="line-1086" name="line-1086"></a><span class="w"> </span><span class="o">*</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">saved_width</span><span class="p">,</span><span class="w"> </span><span class="n">MINIMUM_WINDOW_WIDTH</span><span class="p">);</span> +<a id="line-1087" name="line-1087"></a><span class="w"> </span><span class="o">*</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">saved_height</span><span class="p">,</span><span class="w"> </span><span class="n">MINIMUM_WINDOW_HEIGHT</span><span class="p">);</span> +<a id="line-1088" name="line-1088"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">);</span> +<a id="line-1089" name="line-1089"></a><span class="p">}</span> +<a id="line-1090" name="line-1090"></a> +<a id="line-1091" name="line-1091"></a><span class="cm">/* START OF CAJA/EEL FUNCTIONS: USED FOR HANDLING OF DUPLICATE FILENAMES */</span> +<a id="line-1092" name="line-1092"></a> +<a id="line-1093" name="line-1093"></a><span class="cm">/* Localizers:</span> +<a id="line-1094" name="line-1094"></a><span class="cm"> * Feel free to leave out the st, nd, rd and th suffix or</span> +<a id="line-1095" name="line-1095"></a><span class="cm"> * make some or all of them match.</span> +<a id="line-1096" name="line-1096"></a><span class="cm"> */</span> +<a id="line-1097" name="line-1097"></a> +<a id="line-1098" name="line-1098"></a><span class="cm">/* localizers: tag used to detect the first copy of a file */</span> +<a id="line-1099" name="line-1099"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_copy_duplicate_tag</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">" (copy)"</span><span class="p">);</span> +<a id="line-1100" name="line-1100"></a><span class="cm">/* localizers: tag used to detect the second copy of a file */</span> +<a id="line-1101" name="line-1101"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_another_copy_duplicate_tag</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">" (another copy)"</span><span class="p">);</span> +<a id="line-1102" name="line-1102"></a> +<a id="line-1103" name="line-1103"></a><span class="cm">/* localizers: tag used to detect the x11th copy of a file */</span> +<a id="line-1104" name="line-1104"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_x11th_copy_duplicate_tag</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"th copy)"</span><span class="p">);</span> +<a id="line-1105" name="line-1105"></a><span class="cm">/* localizers: tag used to detect the x12th copy of a file */</span> +<a id="line-1106" name="line-1106"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_x12th_copy_duplicate_tag</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"th copy)"</span><span class="p">);</span> +<a id="line-1107" name="line-1107"></a><span class="cm">/* localizers: tag used to detect the x13th copy of a file */</span> +<a id="line-1108" name="line-1108"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_x13th_copy_duplicate_tag</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"th copy)"</span><span class="p">);</span> +<a id="line-1109" name="line-1109"></a> +<a id="line-1110" name="line-1110"></a><span class="cm">/* localizers: tag used to detect the x1st copy of a file */</span> +<a id="line-1111" name="line-1111"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_st_copy_duplicate_tag</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"st copy)"</span><span class="p">);</span> +<a id="line-1112" name="line-1112"></a><span class="cm">/* localizers: tag used to detect the x2nd copy of a file */</span> +<a id="line-1113" name="line-1113"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_nd_copy_duplicate_tag</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"nd copy)"</span><span class="p">);</span> +<a id="line-1114" name="line-1114"></a><span class="cm">/* localizers: tag used to detect the x3rd copy of a file */</span> +<a id="line-1115" name="line-1115"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_rd_copy_duplicate_tag</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"rd copy)"</span><span class="p">);</span> +<a id="line-1116" name="line-1116"></a> +<a id="line-1117" name="line-1117"></a><span class="cm">/* localizers: tag used to detect the xxth copy of a file */</span> +<a id="line-1118" name="line-1118"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_th_copy_duplicate_tag</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"th copy)"</span><span class="p">);</span> +<a id="line-1119" name="line-1119"></a> +<a id="line-1120" name="line-1120"></a><span class="cp">#define COPY_DUPLICATE_TAG _(untranslated_copy_duplicate_tag)</span> +<a id="line-1121" name="line-1121"></a><span class="cp">#define ANOTHER_COPY_DUPLICATE_TAG _(untranslated_another_copy_duplicate_tag)</span> +<a id="line-1122" name="line-1122"></a><span class="cp">#define X11TH_COPY_DUPLICATE_TAG _(untranslated_x11th_copy_duplicate_tag)</span> +<a id="line-1123" name="line-1123"></a><span class="cp">#define X12TH_COPY_DUPLICATE_TAG _(untranslated_x12th_copy_duplicate_tag)</span> +<a id="line-1124" name="line-1124"></a><span class="cp">#define X13TH_COPY_DUPLICATE_TAG _(untranslated_x13th_copy_duplicate_tag)</span> +<a id="line-1125" name="line-1125"></a> +<a id="line-1126" name="line-1126"></a><span class="cp">#define ST_COPY_DUPLICATE_TAG _(untranslated_st_copy_duplicate_tag)</span> +<a id="line-1127" name="line-1127"></a><span class="cp">#define ND_COPY_DUPLICATE_TAG _(untranslated_nd_copy_duplicate_tag)</span> +<a id="line-1128" name="line-1128"></a><span class="cp">#define RD_COPY_DUPLICATE_TAG _(untranslated_rd_copy_duplicate_tag)</span> +<a id="line-1129" name="line-1129"></a><span class="cp">#define TH_COPY_DUPLICATE_TAG _(untranslated_th_copy_duplicate_tag)</span> +<a id="line-1130" name="line-1130"></a> +<a id="line-1131" name="line-1131"></a><span class="cm">/* localizers: appended to first file copy */</span> +<a id="line-1132" name="line-1132"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_first_copy_duplicate_format</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"%s (copy)%s"</span><span class="p">);</span> +<a id="line-1133" name="line-1133"></a><span class="cm">/* localizers: appended to second file copy */</span> +<a id="line-1134" name="line-1134"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_second_copy_duplicate_format</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"%s (another copy)%s"</span><span class="p">);</span> +<a id="line-1135" name="line-1135"></a> +<a id="line-1136" name="line-1136"></a><span class="cm">/* localizers: appended to x11th file copy */</span> +<a id="line-1137" name="line-1137"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_x11th_copy_duplicate_format</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"%s (%dth copy)%s"</span><span class="p">);</span> +<a id="line-1138" name="line-1138"></a><span class="cm">/* localizers: appended to x12th file copy */</span> +<a id="line-1139" name="line-1139"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_x12th_copy_duplicate_format</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"%s (%dth copy)%s"</span><span class="p">);</span> +<a id="line-1140" name="line-1140"></a><span class="cm">/* localizers: appended to x13th file copy */</span> +<a id="line-1141" name="line-1141"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_x13th_copy_duplicate_format</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"%s (%dth copy)%s"</span><span class="p">);</span> +<a id="line-1142" name="line-1142"></a> +<a id="line-1143" name="line-1143"></a><span class="cm">/* localizers: appended to x1st file copy */</span> +<a id="line-1144" name="line-1144"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_st_copy_duplicate_format</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"%s (%dst copy)%s"</span><span class="p">);</span> +<a id="line-1145" name="line-1145"></a><span class="cm">/* localizers: appended to x2nd file copy */</span> +<a id="line-1146" name="line-1146"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_nd_copy_duplicate_format</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"%s (%dnd copy)%s"</span><span class="p">);</span> +<a id="line-1147" name="line-1147"></a><span class="cm">/* localizers: appended to x3rd file copy */</span> +<a id="line-1148" name="line-1148"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_rd_copy_duplicate_format</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"%s (%drd copy)%s"</span><span class="p">);</span> +<a id="line-1149" name="line-1149"></a><span class="cm">/* localizers: appended to xxth file copy */</span> +<a id="line-1150" name="line-1150"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">untranslated_th_copy_duplicate_format</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"%s (%dth copy)%s"</span><span class="p">);</span> +<a id="line-1151" name="line-1151"></a> +<a id="line-1152" name="line-1152"></a><span class="cp">#define FIRST_COPY_DUPLICATE_FORMAT _(untranslated_first_copy_duplicate_format)</span> +<a id="line-1153" name="line-1153"></a><span class="cp">#define SECOND_COPY_DUPLICATE_FORMAT _(untranslated_second_copy_duplicate_format)</span> +<a id="line-1154" name="line-1154"></a><span class="cp">#define X11TH_COPY_DUPLICATE_FORMAT _(untranslated_x11th_copy_duplicate_format)</span> +<a id="line-1155" name="line-1155"></a><span class="cp">#define X12TH_COPY_DUPLICATE_FORMAT _(untranslated_x12th_copy_duplicate_format)</span> +<a id="line-1156" name="line-1156"></a><span class="cp">#define X13TH_COPY_DUPLICATE_FORMAT _(untranslated_x13th_copy_duplicate_format)</span> +<a id="line-1157" name="line-1157"></a> +<a id="line-1158" name="line-1158"></a><span class="cp">#define ST_COPY_DUPLICATE_FORMAT _(untranslated_st_copy_duplicate_format)</span> +<a id="line-1159" name="line-1159"></a><span class="cp">#define ND_COPY_DUPLICATE_FORMAT _(untranslated_nd_copy_duplicate_format)</span> +<a id="line-1160" name="line-1160"></a><span class="cp">#define RD_COPY_DUPLICATE_FORMAT _(untranslated_rd_copy_duplicate_format)</span> +<a id="line-1161" name="line-1161"></a><span class="cp">#define TH_COPY_DUPLICATE_FORMAT _(untranslated_th_copy_duplicate_format)</span> +<a id="line-1162" name="line-1162"></a> +<a id="line-1163" name="line-1163"></a><span class="k">static</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-1164" name="line-1164"></a><span class="nf">make_valid_utf8</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">name</span><span class="p">)</span> +<a id="line-1165" name="line-1165"></a><span class="p">{</span> +<a id="line-1166" name="line-1166"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">;</span> +<a id="line-1167" name="line-1167"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">remainder</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">invalid</span><span class="p">;</span> +<a id="line-1168" name="line-1168"></a><span class="hll"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">remaining_bytes</span><span class="p">,</span><span class="w"> </span><span class="n">valid_bytes</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'valid_bytes' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'valid_bytes' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1169" name="line-1169"></a> +<a id="line-1170" name="line-1170"></a><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1171" name="line-1171"></a><span class="w"> </span><span class="n">remainder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">name</span><span class="p">;</span> +<a id="line-1172" name="line-1172"></a><span class="w"> </span><span class="n">remaining_bytes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-1173" name="line-1173"></a> +<a id="line-1174" name="line-1174"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">remaining_bytes</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1175" name="line-1175"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_utf8_validate</span><span class="w"> </span><span class="p">(</span><span class="n">remainder</span><span class="p">,</span><span class="w"> </span><span class="n">remaining_bytes</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">invalid</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1176" name="line-1176"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1177" name="line-1177"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1178" name="line-1178"></a><span class="w"> </span><span class="n">valid_bytes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">invalid</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">remainder</span><span class="p">;</span> +<a id="line-1179" name="line-1179"></a> +<a id="line-1180" name="line-1180"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_sized_new</span><span class="w"> </span><span class="p">(</span><span class="n">remaining_bytes</span><span class="p">);</span> +<a id="line-1182" name="line-1182"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="n">g_string_append_len</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">remainder</span><span class="p">,</span><span class="w"> </span><span class="n">valid_bytes</span><span class="p">);</span> +<a id="line-1184" name="line-1184"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="sc">'?'</span><span class="p">);</span> +<a id="line-1185" name="line-1185"></a> +<a id="line-1186" name="line-1186"></a><span class="w"> </span><span class="n">remaining_bytes</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">valid_bytes</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1187" name="line-1187"></a><span class="w"> </span><span class="n">remainder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">invalid</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1188" name="line-1188"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1189" name="line-1189"></a> +<a id="line-1190" name="line-1190"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1191" name="line-1191"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-1192" name="line-1192"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1193" name="line-1193"></a> +<a id="line-1194" name="line-1194"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">remainder</span><span class="p">);</span> +<a id="line-1195" name="line-1195"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">" (invalid Unicode)"</span><span class="p">));</span> +<a id="line-1196" name="line-1196"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">g_utf8_validate</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-1197" name="line-1197"></a> +<a id="line-1198" name="line-1198"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1199" name="line-1199"></a><span class="p">}</span> +<a id="line-1200" name="line-1200"></a> +<a id="line-1201" name="line-1201"></a><span class="k">static</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-1202" name="line-1202"></a><span class="nf">extract_string_until</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">original</span><span class="p">,</span> +<a id="line-1203" name="line-1203"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">until_substring</span><span class="p">)</span> +<a id="line-1204" name="line-1204"></a><span class="p">{</span> +<a id="line-1205" name="line-1205"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-1206" name="line-1206"></a> +<a id="line-1207" name="line-1207"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">((</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">original</span><span class="p">)</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">until_substring</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">original</span><span class="p">);</span> +<a id="line-1208" name="line-1208"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">until_substring</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">original</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1209" name="line-1209"></a> +<a id="line-1210" name="line-1210"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_malloc</span><span class="w"> </span><span class="p">(</span><span class="n">until_substring</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">original</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1211" name="line-1211"></a><span class="w"> </span><span class="n">strncpy</span><span class="w"> </span><span class="p">(</span><span class="n">result</span><span class="p">,</span><span class="w"> </span><span class="n">original</span><span class="p">,</span><span class="w"> </span><span class="n">until_substring</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">original</span><span class="p">);</span> +<a id="line-1212" name="line-1212"></a><span class="w"> </span><span class="n">result</span><span class="p">[</span><span class="n">until_substring</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">original</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1213" name="line-1213"></a> +<a id="line-1214" name="line-1214"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-1215" name="line-1215"></a><span class="p">}</span> +<a id="line-1216" name="line-1216"></a> +<a id="line-1217" name="line-1217"></a><span class="cm">/* Dismantle a file name, separating the base name, the file suffix and removing any</span> +<a id="line-1218" name="line-1218"></a><span class="cm"> * (xxxcopy), etc. string. Figure out the count that corresponds to the given</span> +<a id="line-1219" name="line-1219"></a><span class="cm"> * (xxxcopy) substring.</span> +<a id="line-1220" name="line-1220"></a><span class="cm"> */</span> +<a id="line-1221" name="line-1221"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1222" name="line-1222"></a><span class="nf">parse_previous_duplicate_name</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">name</span><span class="p">,</span> +<a id="line-1223" name="line-1223"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">name_base</span><span class="p">,</span> +<a id="line-1224" name="line-1224"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">suffix</span><span class="p">,</span> +<a id="line-1225" name="line-1225"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">count</span><span class="p">)</span> +<a id="line-1226" name="line-1226"></a><span class="p">{</span> +<a id="line-1227" name="line-1227"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">tag</span><span class="p">;</span> +<a id="line-1228" name="line-1228"></a> +<a id="line-1229" name="line-1229"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">);</span> +<a id="line-1230" name="line-1230"></a> +<a id="line-1231" name="line-1231"></a><span class="w"> </span><span class="o">*</span><span class="n">suffix</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strchr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="sc">'.'</span><span class="p">);</span> +<a id="line-1232" name="line-1232"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">suffix</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">suffix</span><span class="p">)[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1233" name="line-1233"></a><span class="w"> </span><span class="cm">/* no suffix */</span> +<a id="line-1234" name="line-1234"></a><span class="w"> </span><span class="o">*</span><span class="n">suffix</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> +<a id="line-1235" name="line-1235"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1236" name="line-1236"></a> +<a id="line-1237" name="line-1237"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">COPY_DUPLICATE_TAG</span><span class="p">);</span> +<a id="line-1238" name="line-1238"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1239" name="line-1239"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="o">*</span><span class="n">suffix</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1240" name="line-1240"></a><span class="w"> </span><span class="cm">/* handle case "foo. (copy)" */</span> +<a id="line-1241" name="line-1241"></a><span class="w"> </span><span class="o">*</span><span class="n">suffix</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> +<a id="line-1242" name="line-1242"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1243" name="line-1243"></a><span class="w"> </span><span class="o">*</span><span class="n">name_base</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">extract_string_until</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-1244" name="line-1244"></a><span class="w"> </span><span class="o">*</span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1245" name="line-1245"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1246" name="line-1246"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1247" name="line-1247"></a> +<a id="line-1248" name="line-1248"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">ANOTHER_COPY_DUPLICATE_TAG</span><span class="p">);</span> +<a id="line-1249" name="line-1249"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="o">*</span><span class="n">suffix</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1251" name="line-1251"></a><span class="w"> </span><span class="cm">/* handle case "foo. (another copy)" */</span> +<a id="line-1252" name="line-1252"></a><span class="w"> </span><span class="o">*</span><span class="n">suffix</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> +<a id="line-1253" name="line-1253"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1254" name="line-1254"></a><span class="w"> </span><span class="o">*</span><span class="n">name_base</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">extract_string_until</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-1255" name="line-1255"></a><span class="w"> </span><span class="o">*</span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-1256" name="line-1256"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1257" name="line-1257"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1258" name="line-1258"></a> +<a id="line-1259" name="line-1259"></a><span class="w"> </span><span class="cm">/* Check to see if we got one of st, nd, rd, th. */</span> +<a id="line-1260" name="line-1260"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">X11TH_COPY_DUPLICATE_TAG</span><span class="p">);</span> +<a id="line-1261" name="line-1261"></a> +<a id="line-1262" name="line-1262"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1263" name="line-1263"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">X12TH_COPY_DUPLICATE_TAG</span><span class="p">);</span> +<a id="line-1264" name="line-1264"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1265" name="line-1265"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1266" name="line-1266"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">X13TH_COPY_DUPLICATE_TAG</span><span class="p">);</span> +<a id="line-1267" name="line-1267"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1268" name="line-1268"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1269" name="line-1269"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">ST_COPY_DUPLICATE_TAG</span><span class="p">);</span> +<a id="line-1270" name="line-1270"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1271" name="line-1271"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1272" name="line-1272"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">ND_COPY_DUPLICATE_TAG</span><span class="p">);</span> +<a id="line-1273" name="line-1273"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1274" name="line-1274"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1275" name="line-1275"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">RD_COPY_DUPLICATE_TAG</span><span class="p">);</span> +<a id="line-1276" name="line-1276"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1277" name="line-1277"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1278" name="line-1278"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">TH_COPY_DUPLICATE_TAG</span><span class="p">);</span> +<a id="line-1279" name="line-1279"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1280" name="line-1280"></a> +<a id="line-1281" name="line-1281"></a><span class="w"> </span><span class="cm">/* If we got one of st, nd, rd, th, fish out the duplicate number. */</span> +<a id="line-1282" name="line-1282"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1283" name="line-1283"></a><span class="w"> </span><span class="cm">/* localizers: opening parentheses to match the "th copy)" string */</span> +<a id="line-1284" name="line-1284"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">" ("</span><span class="p">));</span> +<a id="line-1285" name="line-1285"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1286" name="line-1286"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="o">*</span><span class="n">suffix</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1287" name="line-1287"></a><span class="w"> </span><span class="cm">/* handle case "foo. (22nd copy)" */</span> +<a id="line-1288" name="line-1288"></a><span class="w"> </span><span class="o">*</span><span class="n">suffix</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> +<a id="line-1289" name="line-1289"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1290" name="line-1290"></a><span class="w"> </span><span class="o">*</span><span class="n">name_base</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">extract_string_until</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-1291" name="line-1291"></a><span class="w"> </span><span class="cm">/* localizers: opening parentheses of the "th copy)" string */</span> +<a id="line-1292" name="line-1292"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sscanf</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">" (%d"</span><span class="p">),</span><span class="w"> </span><span class="n">count</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1293" name="line-1293"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">count</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="o">*</span><span class="n">count</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1000000</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1294" name="line-1294"></a><span class="w"> </span><span class="cm">/* keep the count within a reasonable range */</span> +<a id="line-1295" name="line-1295"></a><span class="w"> </span><span class="o">*</span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1296" name="line-1296"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1297" name="line-1297"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1298" name="line-1298"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1299" name="line-1299"></a><span class="w"> </span><span class="o">*</span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1300" name="line-1300"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1301" name="line-1301"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1302" name="line-1302"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1303" name="line-1303"></a> +<a id="line-1304" name="line-1304"></a><span class="w"> </span><span class="o">*</span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1305" name="line-1305"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">**</span><span class="n">suffix</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1306" name="line-1306"></a><span class="w"> </span><span class="o">*</span><span class="n">name_base</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">extract_string_until</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">suffix</span><span class="p">);</span> +<a id="line-1307" name="line-1307"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1308" name="line-1308"></a><span class="w"> </span><span class="o">*</span><span class="n">name_base</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-1309" name="line-1309"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1310" name="line-1310"></a><span class="p">}</span> +<a id="line-1311" name="line-1311"></a> +<a id="line-1312" name="line-1312"></a><span class="k">static</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-1313" name="line-1313"></a><span class="nf">make_next_duplicate_name</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">base</span><span class="p">,</span> +<a id="line-1314" name="line-1314"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">suffix</span><span class="p">,</span> +<a id="line-1315" name="line-1315"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">count</span><span class="p">)</span> +<a id="line-1316" name="line-1316"></a><span class="p">{</span> +<a id="line-1317" name="line-1317"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">format</span><span class="p">;</span> +<a id="line-1318" name="line-1318"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-1319" name="line-1319"></a> +<a id="line-1320" name="line-1320"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1321" name="line-1321"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"bad count %d in make_next_duplicate_name()"</span><span class="p">,</span><span class="w"> </span><span class="n">count</span><span class="p">);</span> +<a id="line-1322" name="line-1322"></a><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1323" name="line-1323"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1324" name="line-1324"></a> +<a id="line-1325" name="line-1325"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1326" name="line-1326"></a> +<a id="line-1327" name="line-1327"></a><span class="w"> </span><span class="cm">/* Handle special cases for low numbers.</span> +<a id="line-1328" name="line-1328"></a><span class="cm"> * Perhaps for some locales we will need to add more.</span> +<a id="line-1329" name="line-1329"></a><span class="cm"> */</span> +<a id="line-1330" name="line-1330"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1331" name="line-1331"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1332" name="line-1332"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-1333" name="line-1333"></a><span class="w"> </span><span class="cm">/* fall through */</span> +<a id="line-1334" name="line-1334"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">1</span><span class="p">:</span> +<a id="line-1335" name="line-1335"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FIRST_COPY_DUPLICATE_FORMAT</span><span class="p">;</span> +<a id="line-1336" name="line-1336"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1337" name="line-1337"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">2</span><span class="p">:</span> +<a id="line-1338" name="line-1338"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SECOND_COPY_DUPLICATE_FORMAT</span><span class="p">;</span> +<a id="line-1339" name="line-1339"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1340" name="line-1340"></a> +<a id="line-1341" name="line-1341"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1342" name="line-1342"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">format</span><span class="p">,</span><span class="w"> </span><span class="n">base</span><span class="p">,</span><span class="w"> </span><span class="n">suffix</span><span class="p">);</span> +<a id="line-1343" name="line-1343"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1344" name="line-1344"></a> +<a id="line-1345" name="line-1345"></a><span class="w"> </span><span class="cm">/* Handle special cases for the first few numbers of each ten.</span> +<a id="line-1346" name="line-1346"></a><span class="cm"> * For locales where getting this exactly right is difficult,</span> +<a id="line-1347" name="line-1347"></a><span class="cm"> * these can just be made all the same as the general case below.</span> +<a id="line-1348" name="line-1348"></a><span class="cm"> */</span> +<a id="line-1349" name="line-1349"></a> +<a id="line-1350" name="line-1350"></a><span class="w"> </span><span class="cm">/* Handle special cases for x11th - x20th.</span> +<a id="line-1351" name="line-1351"></a><span class="cm"> */</span> +<a id="line-1352" name="line-1352"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1353" name="line-1353"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">11</span><span class="p">:</span> +<a id="line-1354" name="line-1354"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">X11TH_COPY_DUPLICATE_FORMAT</span><span class="p">;</span> +<a id="line-1355" name="line-1355"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1356" name="line-1356"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">12</span><span class="p">:</span> +<a id="line-1357" name="line-1357"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">X12TH_COPY_DUPLICATE_FORMAT</span><span class="p">;</span> +<a id="line-1358" name="line-1358"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1359" name="line-1359"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">13</span><span class="p">:</span> +<a id="line-1360" name="line-1360"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">X13TH_COPY_DUPLICATE_FORMAT</span><span class="p">;</span> +<a id="line-1361" name="line-1361"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1362" name="line-1362"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1363" name="line-1363"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1364" name="line-1364"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1365" name="line-1365"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1366" name="line-1366"></a> +<a id="line-1367" name="line-1367"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">format</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1368" name="line-1368"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">10</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1369" name="line-1369"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">1</span><span class="p">:</span> +<a id="line-1370" name="line-1370"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ST_COPY_DUPLICATE_FORMAT</span><span class="p">;</span> +<a id="line-1371" name="line-1371"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1372" name="line-1372"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">2</span><span class="p">:</span> +<a id="line-1373" name="line-1373"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ND_COPY_DUPLICATE_FORMAT</span><span class="p">;</span> +<a id="line-1374" name="line-1374"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1375" name="line-1375"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">3</span><span class="p">:</span> +<a id="line-1376" name="line-1376"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">RD_COPY_DUPLICATE_FORMAT</span><span class="p">;</span> +<a id="line-1377" name="line-1377"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1378" name="line-1378"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1379" name="line-1379"></a><span class="w"> </span><span class="cm">/* The general case. */</span> +<a id="line-1380" name="line-1380"></a><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TH_COPY_DUPLICATE_FORMAT</span><span class="p">;</span> +<a id="line-1381" name="line-1381"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1382" name="line-1382"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1383" name="line-1383"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1384" name="line-1384"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">format</span><span class="p">,</span><span class="w"> </span><span class="n">base</span><span class="p">,</span><span class="w"> </span><span class="n">count</span><span class="p">,</span><span class="w"> </span><span class="n">suffix</span><span class="p">);</span> +<a id="line-1385" name="line-1385"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1386" name="line-1386"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-1387" name="line-1387"></a><span class="p">}</span> +<a id="line-1388" name="line-1388"></a> +<a id="line-1389" name="line-1389"></a><span class="k">static</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-1390" name="line-1390"></a><span class="nf">get_duplicate_name</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">)</span> +<a id="line-1391" name="line-1391"></a><span class="p">{</span> +<a id="line-1392" name="line-1392"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">suffix</span><span class="p">;</span> +<a id="line-1393" name="line-1393"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">name_base</span><span class="p">;</span> +<a id="line-1394" name="line-1394"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-1395" name="line-1395"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">count</span><span class="p">;</span> +<a id="line-1396" name="line-1396"></a> +<a id="line-1397" name="line-1397"></a><span class="w"> </span><span class="n">parse_previous_duplicate_name</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name_base</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">suffix</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">count</span><span class="p">);</span> +<a id="line-1398" name="line-1398"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">make_next_duplicate_name</span><span class="w"> </span><span class="p">(</span><span class="n">name_base</span><span class="p">,</span><span class="w"> </span><span class="n">suffix</span><span class="p">,</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1399" name="line-1399"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name_base</span><span class="p">);</span> +<a id="line-1400" name="line-1400"></a> +<a id="line-1401" name="line-1401"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-1402" name="line-1402"></a><span class="p">}</span> +<a id="line-1403" name="line-1403"></a> +<a id="line-1404" name="line-1404"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-1405" name="line-1405"></a><span class="nf">gsearchtool_get_next_duplicate_name</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">basename</span><span class="p">)</span> +<a id="line-1406" name="line-1406"></a><span class="p">{</span> +<a id="line-1407" name="line-1407"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_name</span><span class="p">;</span> +<a id="line-1408" name="line-1408"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_result</span><span class="p">;</span> +<a id="line-1409" name="line-1409"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-1410" name="line-1410"></a> +<a id="line-1411" name="line-1411"></a><span class="w"> </span><span class="n">utf8_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_to_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">basename</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1412" name="line-1412"></a> +<a id="line-1413" name="line-1413"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_name</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1414" name="line-1414"></a><span class="w"> </span><span class="cm">/* Couldn't convert to utf8 - probably</span> +<a id="line-1415" name="line-1415"></a><span class="cm"> * G_BROKEN_FILENAMES not set when it should be.</span> +<a id="line-1416" name="line-1416"></a><span class="cm"> * Try converting from the locale */</span> +<a id="line-1417" name="line-1417"></a><span class="w"> </span><span class="n">utf8_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_to_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">basename</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1418" name="line-1418"></a> +<a id="line-1419" name="line-1419"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_name</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1420" name="line-1420"></a><span class="w"> </span><span class="n">utf8_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">make_valid_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">basename</span><span class="p">);</span> +<a id="line-1421" name="line-1421"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1422" name="line-1422"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1423" name="line-1423"></a> +<a id="line-1424" name="line-1424"></a><span class="w"> </span><span class="n">utf8_result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_duplicate_name</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_name</span><span class="p">);</span> +<a id="line-1425" name="line-1425"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_name</span><span class="p">);</span> +<a id="line-1426" name="line-1426"></a> +<a id="line-1427" name="line-1427"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_result</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1428" name="line-1428"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_result</span><span class="p">);</span> +<a id="line-1429" name="line-1429"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-1430" name="line-1430"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/16.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/16.html new file mode 100644 index 00000000..64645151 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/16.html @@ -0,0 +1,6433 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: gsearchtool/src/gsearchtool.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gsearchtool.c</p> +<a href="16.html#line-672"> variableScope 672</a><a href="16.html#line-1061"> variableScope 1061</a><a href="16.html#line-2251"> variableScope 2251</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span> +<span class="normal">1328</span> +<span class="normal">1329</span> +<span class="normal">1330</span> +<span class="normal">1331</span> +<span class="normal">1332</span> +<span class="normal">1333</span> +<span class="normal">1334</span> +<span class="normal">1335</span> +<span class="normal">1336</span> +<span class="normal">1337</span> +<span class="normal">1338</span> +<span class="normal">1339</span> +<span class="normal">1340</span> +<span class="normal">1341</span> +<span class="normal">1342</span> +<span class="normal">1343</span> +<span class="normal">1344</span> +<span class="normal">1345</span> +<span class="normal">1346</span> +<span class="normal">1347</span> +<span class="normal">1348</span> +<span class="normal">1349</span> +<span class="normal">1350</span> +<span class="normal">1351</span> +<span class="normal">1352</span> +<span class="normal">1353</span> +<span class="normal">1354</span> +<span class="normal">1355</span> +<span class="normal">1356</span> +<span class="normal">1357</span> +<span class="normal">1358</span> +<span class="normal">1359</span> +<span class="normal">1360</span> +<span class="normal">1361</span> +<span class="normal">1362</span> +<span class="normal">1363</span> +<span class="normal">1364</span> +<span class="normal">1365</span> +<span class="normal">1366</span> +<span class="normal">1367</span> +<span class="normal">1368</span> +<span class="normal">1369</span> +<span class="normal">1370</span> +<span class="normal">1371</span> +<span class="normal">1372</span> +<span class="normal">1373</span> +<span class="normal">1374</span> +<span class="normal">1375</span> +<span class="normal">1376</span> +<span class="normal">1377</span> +<span class="normal">1378</span> +<span class="normal">1379</span> +<span class="normal">1380</span> +<span class="normal">1381</span> +<span class="normal">1382</span> +<span class="normal">1383</span> +<span class="normal">1384</span> +<span class="normal">1385</span> +<span class="normal">1386</span> +<span class="normal">1387</span> +<span class="normal">1388</span> +<span class="normal">1389</span> +<span class="normal">1390</span> +<span class="normal">1391</span> +<span class="normal">1392</span> +<span class="normal">1393</span> +<span class="normal">1394</span> +<span class="normal">1395</span> +<span class="normal">1396</span> +<span class="normal">1397</span> +<span class="normal">1398</span> +<span class="normal">1399</span> +<span class="normal">1400</span> +<span class="normal">1401</span> +<span class="normal">1402</span> +<span class="normal">1403</span> +<span class="normal">1404</span> +<span class="normal">1405</span> +<span class="normal">1406</span> +<span class="normal">1407</span> +<span class="normal">1408</span> +<span class="normal">1409</span> +<span class="normal">1410</span> +<span class="normal">1411</span> +<span class="normal">1412</span> +<span class="normal">1413</span> +<span class="normal">1414</span> +<span class="normal">1415</span> +<span class="normal">1416</span> +<span class="normal">1417</span> +<span class="normal">1418</span> +<span class="normal">1419</span> +<span class="normal">1420</span> +<span class="normal">1421</span> +<span class="normal">1422</span> +<span class="normal">1423</span> +<span class="normal">1424</span> +<span class="normal">1425</span> +<span class="normal">1426</span> +<span class="normal">1427</span> +<span class="normal">1428</span> +<span class="normal">1429</span> +<span class="normal">1430</span> +<span class="normal">1431</span> +<span class="normal">1432</span> +<span class="normal">1433</span> +<span class="normal">1434</span> +<span class="normal">1435</span> +<span class="normal">1436</span> +<span class="normal">1437</span> +<span class="normal">1438</span> +<span class="normal">1439</span> +<span class="normal">1440</span> +<span class="normal">1441</span> +<span class="normal">1442</span> +<span class="normal">1443</span> +<span class="normal">1444</span> +<span class="normal">1445</span> +<span class="normal">1446</span> +<span class="normal">1447</span> +<span class="normal">1448</span> +<span class="normal">1449</span> +<span class="normal">1450</span> +<span class="normal">1451</span> +<span class="normal">1452</span> +<span class="normal">1453</span> +<span class="normal">1454</span> +<span class="normal">1455</span> +<span class="normal">1456</span> +<span class="normal">1457</span> +<span class="normal">1458</span> +<span class="normal">1459</span> +<span class="normal">1460</span> +<span class="normal">1461</span> +<span class="normal">1462</span> +<span class="normal">1463</span> +<span class="normal">1464</span> +<span class="normal">1465</span> +<span class="normal">1466</span> +<span class="normal">1467</span> +<span class="normal">1468</span> +<span class="normal">1469</span> +<span class="normal">1470</span> +<span class="normal">1471</span> +<span class="normal">1472</span> +<span class="normal">1473</span> +<span class="normal">1474</span> +<span class="normal">1475</span> +<span class="normal">1476</span> +<span class="normal">1477</span> +<span class="normal">1478</span> +<span class="normal">1479</span> +<span class="normal">1480</span> +<span class="normal">1481</span> +<span class="normal">1482</span> +<span class="normal">1483</span> +<span class="normal">1484</span> +<span class="normal">1485</span> +<span class="normal">1486</span> +<span class="normal">1487</span> +<span class="normal">1488</span> +<span class="normal">1489</span> +<span class="normal">1490</span> +<span class="normal">1491</span> +<span class="normal">1492</span> +<span class="normal">1493</span> +<span class="normal">1494</span> +<span class="normal">1495</span> +<span class="normal">1496</span> +<span class="normal">1497</span> +<span class="normal">1498</span> +<span class="normal">1499</span> +<span class="normal">1500</span> +<span class="normal">1501</span> +<span class="normal">1502</span> +<span class="normal">1503</span> +<span class="normal">1504</span> +<span class="normal">1505</span> +<span class="normal">1506</span> +<span class="normal">1507</span> +<span class="normal">1508</span> +<span class="normal">1509</span> +<span class="normal">1510</span> +<span class="normal">1511</span> +<span class="normal">1512</span> +<span class="normal">1513</span> +<span class="normal">1514</span> +<span class="normal">1515</span> +<span class="normal">1516</span> +<span class="normal">1517</span> +<span class="normal">1518</span> +<span class="normal">1519</span> +<span class="normal">1520</span> +<span class="normal">1521</span> +<span class="normal">1522</span> +<span class="normal">1523</span> +<span class="normal">1524</span> +<span class="normal">1525</span> +<span class="normal">1526</span> +<span class="normal">1527</span> +<span class="normal">1528</span> +<span class="normal">1529</span> +<span class="normal">1530</span> +<span class="normal">1531</span> +<span class="normal">1532</span> +<span class="normal">1533</span> +<span class="normal">1534</span> +<span class="normal">1535</span> +<span class="normal">1536</span> +<span class="normal">1537</span> +<span class="normal">1538</span> +<span class="normal">1539</span> +<span class="normal">1540</span> +<span class="normal">1541</span> +<span class="normal">1542</span> +<span class="normal">1543</span> +<span class="normal">1544</span> +<span class="normal">1545</span> +<span class="normal">1546</span> +<span class="normal">1547</span> +<span class="normal">1548</span> +<span class="normal">1549</span> +<span class="normal">1550</span> +<span class="normal">1551</span> +<span class="normal">1552</span> +<span class="normal">1553</span> +<span class="normal">1554</span> +<span class="normal">1555</span> +<span class="normal">1556</span> +<span class="normal">1557</span> +<span class="normal">1558</span> +<span class="normal">1559</span> +<span class="normal">1560</span> +<span class="normal">1561</span> +<span class="normal">1562</span> +<span class="normal">1563</span> +<span class="normal">1564</span> +<span class="normal">1565</span> +<span class="normal">1566</span> +<span class="normal">1567</span> +<span class="normal">1568</span> +<span class="normal">1569</span> +<span class="normal">1570</span> +<span class="normal">1571</span> +<span class="normal">1572</span> +<span class="normal">1573</span> +<span class="normal">1574</span> +<span class="normal">1575</span> +<span class="normal">1576</span> +<span class="normal">1577</span> +<span class="normal">1578</span> +<span class="normal">1579</span> +<span class="normal">1580</span> +<span class="normal">1581</span> +<span class="normal">1582</span> +<span class="normal">1583</span> +<span class="normal">1584</span> +<span class="normal">1585</span> +<span class="normal">1586</span> +<span class="normal">1587</span> +<span class="normal">1588</span> +<span class="normal">1589</span> +<span class="normal">1590</span> +<span class="normal">1591</span> +<span class="normal">1592</span> +<span class="normal">1593</span> +<span class="normal">1594</span> +<span class="normal">1595</span> +<span class="normal">1596</span> +<span class="normal">1597</span> +<span class="normal">1598</span> +<span class="normal">1599</span> +<span class="normal">1600</span> +<span class="normal">1601</span> +<span class="normal">1602</span> +<span class="normal">1603</span> +<span class="normal">1604</span> +<span class="normal">1605</span> +<span class="normal">1606</span> +<span class="normal">1607</span> +<span class="normal">1608</span> +<span class="normal">1609</span> +<span class="normal">1610</span> +<span class="normal">1611</span> +<span class="normal">1612</span> +<span class="normal">1613</span> +<span class="normal">1614</span> +<span class="normal">1615</span> +<span class="normal">1616</span> +<span class="normal">1617</span> +<span class="normal">1618</span> +<span class="normal">1619</span> +<span class="normal">1620</span> +<span class="normal">1621</span> +<span class="normal">1622</span> +<span class="normal">1623</span> +<span class="normal">1624</span> +<span class="normal">1625</span> +<span class="normal">1626</span> +<span class="normal">1627</span> +<span class="normal">1628</span> +<span class="normal">1629</span> +<span class="normal">1630</span> +<span class="normal">1631</span> +<span class="normal">1632</span> +<span class="normal">1633</span> +<span class="normal">1634</span> +<span class="normal">1635</span> +<span class="normal">1636</span> +<span class="normal">1637</span> +<span class="normal">1638</span> +<span class="normal">1639</span> +<span class="normal">1640</span> +<span class="normal">1641</span> +<span class="normal">1642</span> +<span class="normal">1643</span> +<span class="normal">1644</span> +<span class="normal">1645</span> +<span class="normal">1646</span> +<span class="normal">1647</span> +<span class="normal">1648</span> +<span class="normal">1649</span> +<span class="normal">1650</span> +<span class="normal">1651</span> +<span class="normal">1652</span> +<span class="normal">1653</span> +<span class="normal">1654</span> +<span class="normal">1655</span> +<span class="normal">1656</span> +<span class="normal">1657</span> +<span class="normal">1658</span> +<span class="normal">1659</span> +<span class="normal">1660</span> +<span class="normal">1661</span> +<span class="normal">1662</span> +<span class="normal">1663</span> +<span class="normal">1664</span> +<span class="normal">1665</span> +<span class="normal">1666</span> +<span class="normal">1667</span> +<span class="normal">1668</span> +<span class="normal">1669</span> +<span class="normal">1670</span> +<span class="normal">1671</span> +<span class="normal">1672</span> +<span class="normal">1673</span> +<span class="normal">1674</span> +<span class="normal">1675</span> +<span class="normal">1676</span> +<span class="normal">1677</span> +<span class="normal">1678</span> +<span class="normal">1679</span> +<span class="normal">1680</span> +<span class="normal">1681</span> +<span class="normal">1682</span> +<span class="normal">1683</span> +<span class="normal">1684</span> +<span class="normal">1685</span> +<span class="normal">1686</span> +<span class="normal">1687</span> +<span class="normal">1688</span> +<span class="normal">1689</span> +<span class="normal">1690</span> +<span class="normal">1691</span> +<span class="normal">1692</span> +<span class="normal">1693</span> +<span class="normal">1694</span> +<span class="normal">1695</span> +<span class="normal">1696</span> +<span class="normal">1697</span> +<span class="normal">1698</span> +<span class="normal">1699</span> +<span class="normal">1700</span> +<span class="normal">1701</span> +<span class="normal">1702</span> +<span class="normal">1703</span> +<span class="normal">1704</span> +<span class="normal">1705</span> +<span class="normal">1706</span> +<span class="normal">1707</span> +<span class="normal">1708</span> +<span class="normal">1709</span> +<span class="normal">1710</span> +<span class="normal">1711</span> +<span class="normal">1712</span> +<span class="normal">1713</span> +<span class="normal">1714</span> +<span class="normal">1715</span> +<span class="normal">1716</span> +<span class="normal">1717</span> +<span class="normal">1718</span> +<span class="normal">1719</span> +<span class="normal">1720</span> +<span class="normal">1721</span> +<span class="normal">1722</span> +<span class="normal">1723</span> +<span class="normal">1724</span> +<span class="normal">1725</span> +<span class="normal">1726</span> +<span class="normal">1727</span> +<span class="normal">1728</span> +<span class="normal">1729</span> +<span class="normal">1730</span> +<span class="normal">1731</span> +<span class="normal">1732</span> +<span class="normal">1733</span> +<span class="normal">1734</span> +<span class="normal">1735</span> +<span class="normal">1736</span> +<span class="normal">1737</span> +<span class="normal">1738</span> +<span class="normal">1739</span> +<span class="normal">1740</span> +<span class="normal">1741</span> +<span class="normal">1742</span> +<span class="normal">1743</span> +<span class="normal">1744</span> +<span class="normal">1745</span> +<span class="normal">1746</span> +<span class="normal">1747</span> +<span class="normal">1748</span> +<span class="normal">1749</span> +<span class="normal">1750</span> +<span class="normal">1751</span> +<span class="normal">1752</span> +<span class="normal">1753</span> +<span class="normal">1754</span> +<span class="normal">1755</span> +<span class="normal">1756</span> +<span class="normal">1757</span> +<span class="normal">1758</span> +<span class="normal">1759</span> +<span class="normal">1760</span> +<span class="normal">1761</span> +<span class="normal">1762</span> +<span class="normal">1763</span> +<span class="normal">1764</span> +<span class="normal">1765</span> +<span class="normal">1766</span> +<span class="normal">1767</span> +<span class="normal">1768</span> +<span class="normal">1769</span> +<span class="normal">1770</span> +<span class="normal">1771</span> +<span class="normal">1772</span> +<span class="normal">1773</span> +<span class="normal">1774</span> +<span class="normal">1775</span> +<span class="normal">1776</span> +<span class="normal">1777</span> +<span class="normal">1778</span> +<span class="normal">1779</span> +<span class="normal">1780</span> +<span class="normal">1781</span> +<span class="normal">1782</span> +<span class="normal">1783</span> +<span class="normal">1784</span> +<span class="normal">1785</span> +<span class="normal">1786</span> +<span class="normal">1787</span> +<span class="normal">1788</span> +<span class="normal">1789</span> +<span class="normal">1790</span> +<span class="normal">1791</span> +<span class="normal">1792</span> +<span class="normal">1793</span> +<span class="normal">1794</span> +<span class="normal">1795</span> +<span class="normal">1796</span> +<span class="normal">1797</span> +<span class="normal">1798</span> +<span class="normal">1799</span> +<span class="normal">1800</span> +<span class="normal">1801</span> +<span class="normal">1802</span> +<span class="normal">1803</span> +<span class="normal">1804</span> +<span class="normal">1805</span> +<span class="normal">1806</span> +<span class="normal">1807</span> +<span class="normal">1808</span> +<span class="normal">1809</span> +<span class="normal">1810</span> +<span class="normal">1811</span> +<span class="normal">1812</span> +<span class="normal">1813</span> +<span class="normal">1814</span> +<span class="normal">1815</span> +<span class="normal">1816</span> +<span class="normal">1817</span> +<span class="normal">1818</span> +<span class="normal">1819</span> +<span class="normal">1820</span> +<span class="normal">1821</span> +<span class="normal">1822</span> +<span class="normal">1823</span> +<span class="normal">1824</span> +<span class="normal">1825</span> +<span class="normal">1826</span> +<span class="normal">1827</span> +<span class="normal">1828</span> +<span class="normal">1829</span> +<span class="normal">1830</span> +<span class="normal">1831</span> +<span class="normal">1832</span> +<span class="normal">1833</span> +<span class="normal">1834</span> +<span class="normal">1835</span> +<span class="normal">1836</span> +<span class="normal">1837</span> +<span class="normal">1838</span> +<span class="normal">1839</span> +<span class="normal">1840</span> +<span class="normal">1841</span> +<span class="normal">1842</span> +<span class="normal">1843</span> +<span class="normal">1844</span> +<span class="normal">1845</span> +<span class="normal">1846</span> +<span class="normal">1847</span> +<span class="normal">1848</span> +<span class="normal">1849</span> +<span class="normal">1850</span> +<span class="normal">1851</span> +<span class="normal">1852</span> +<span class="normal">1853</span> +<span class="normal">1854</span> +<span class="normal">1855</span> +<span class="normal">1856</span> +<span class="normal">1857</span> +<span class="normal">1858</span> +<span class="normal">1859</span> +<span class="normal">1860</span> +<span class="normal">1861</span> +<span class="normal">1862</span> +<span class="normal">1863</span> +<span class="normal">1864</span> +<span class="normal">1865</span> +<span class="normal">1866</span> +<span class="normal">1867</span> +<span class="normal">1868</span> +<span class="normal">1869</span> +<span class="normal">1870</span> +<span class="normal">1871</span> +<span class="normal">1872</span> +<span class="normal">1873</span> +<span class="normal">1874</span> +<span class="normal">1875</span> +<span class="normal">1876</span> +<span class="normal">1877</span> +<span class="normal">1878</span> +<span class="normal">1879</span> +<span class="normal">1880</span> +<span class="normal">1881</span> +<span class="normal">1882</span> +<span class="normal">1883</span> +<span class="normal">1884</span> +<span class="normal">1885</span> +<span class="normal">1886</span> +<span class="normal">1887</span> +<span class="normal">1888</span> +<span class="normal">1889</span> +<span class="normal">1890</span> +<span class="normal">1891</span> +<span class="normal">1892</span> +<span class="normal">1893</span> +<span class="normal">1894</span> +<span class="normal">1895</span> +<span class="normal">1896</span> +<span class="normal">1897</span> +<span class="normal">1898</span> +<span class="normal">1899</span> +<span class="normal">1900</span> +<span class="normal">1901</span> +<span class="normal">1902</span> +<span class="normal">1903</span> +<span class="normal">1904</span> +<span class="normal">1905</span> +<span class="normal">1906</span> +<span class="normal">1907</span> +<span class="normal">1908</span> +<span class="normal">1909</span> +<span class="normal">1910</span> +<span class="normal">1911</span> +<span class="normal">1912</span> +<span class="normal">1913</span> +<span class="normal">1914</span> +<span class="normal">1915</span> +<span class="normal">1916</span> +<span class="normal">1917</span> +<span class="normal">1918</span> +<span class="normal">1919</span> +<span class="normal">1920</span> +<span class="normal">1921</span> +<span class="normal">1922</span> +<span class="normal">1923</span> +<span class="normal">1924</span> +<span class="normal">1925</span> +<span class="normal">1926</span> +<span class="normal">1927</span> +<span class="normal">1928</span> +<span class="normal">1929</span> +<span class="normal">1930</span> +<span class="normal">1931</span> +<span class="normal">1932</span> +<span class="normal">1933</span> +<span class="normal">1934</span> +<span class="normal">1935</span> +<span class="normal">1936</span> +<span class="normal">1937</span> +<span class="normal">1938</span> +<span class="normal">1939</span> +<span class="normal">1940</span> +<span class="normal">1941</span> +<span class="normal">1942</span> +<span class="normal">1943</span> +<span class="normal">1944</span> +<span class="normal">1945</span> +<span class="normal">1946</span> +<span class="normal">1947</span> +<span class="normal">1948</span> +<span class="normal">1949</span> +<span class="normal">1950</span> +<span class="normal">1951</span> +<span class="normal">1952</span> +<span class="normal">1953</span> +<span class="normal">1954</span> +<span class="normal">1955</span> +<span class="normal">1956</span> +<span class="normal">1957</span> +<span class="normal">1958</span> +<span class="normal">1959</span> +<span class="normal">1960</span> +<span class="normal">1961</span> +<span class="normal">1962</span> +<span class="normal">1963</span> +<span class="normal">1964</span> +<span class="normal">1965</span> +<span class="normal">1966</span> +<span class="normal">1967</span> +<span class="normal">1968</span> +<span class="normal">1969</span> +<span class="normal">1970</span> +<span class="normal">1971</span> +<span class="normal">1972</span> +<span class="normal">1973</span> +<span class="normal">1974</span> +<span class="normal">1975</span> +<span class="normal">1976</span> +<span class="normal">1977</span> +<span class="normal">1978</span> +<span class="normal">1979</span> +<span class="normal">1980</span> +<span class="normal">1981</span> +<span class="normal">1982</span> +<span class="normal">1983</span> +<span class="normal">1984</span> +<span class="normal">1985</span> +<span class="normal">1986</span> +<span class="normal">1987</span> +<span class="normal">1988</span> +<span class="normal">1989</span> +<span class="normal">1990</span> +<span class="normal">1991</span> +<span class="normal">1992</span> +<span class="normal">1993</span> +<span class="normal">1994</span> +<span class="normal">1995</span> +<span class="normal">1996</span> +<span class="normal">1997</span> +<span class="normal">1998</span> +<span class="normal">1999</span> +<span class="normal">2000</span> +<span class="normal">2001</span> +<span class="normal">2002</span> +<span class="normal">2003</span> +<span class="normal">2004</span> +<span class="normal">2005</span> +<span class="normal">2006</span> +<span class="normal">2007</span> +<span class="normal">2008</span> +<span class="normal">2009</span> +<span class="normal">2010</span> +<span class="normal">2011</span> +<span class="normal">2012</span> +<span class="normal">2013</span> +<span class="normal">2014</span> +<span class="normal">2015</span> +<span class="normal">2016</span> +<span class="normal">2017</span> +<span class="normal">2018</span> +<span class="normal">2019</span> +<span class="normal">2020</span> +<span class="normal">2021</span> +<span class="normal">2022</span> +<span class="normal">2023</span> +<span class="normal">2024</span> +<span class="normal">2025</span> +<span class="normal">2026</span> +<span class="normal">2027</span> +<span class="normal">2028</span> +<span class="normal">2029</span> +<span class="normal">2030</span> +<span class="normal">2031</span> +<span class="normal">2032</span> +<span class="normal">2033</span> +<span class="normal">2034</span> +<span class="normal">2035</span> +<span class="normal">2036</span> +<span class="normal">2037</span> +<span class="normal">2038</span> +<span class="normal">2039</span> +<span class="normal">2040</span> +<span class="normal">2041</span> +<span class="normal">2042</span> +<span class="normal">2043</span> +<span class="normal">2044</span> +<span class="normal">2045</span> +<span class="normal">2046</span> +<span class="normal">2047</span> +<span class="normal">2048</span> +<span class="normal">2049</span> +<span class="normal">2050</span> +<span class="normal">2051</span> +<span class="normal">2052</span> +<span class="normal">2053</span> +<span class="normal">2054</span> +<span class="normal">2055</span> +<span class="normal">2056</span> +<span class="normal">2057</span> +<span class="normal">2058</span> +<span class="normal">2059</span> +<span class="normal">2060</span> +<span class="normal">2061</span> +<span class="normal">2062</span> +<span class="normal">2063</span> +<span class="normal">2064</span> +<span class="normal">2065</span> +<span class="normal">2066</span> +<span class="normal">2067</span> +<span class="normal">2068</span> +<span class="normal">2069</span> +<span class="normal">2070</span> +<span class="normal">2071</span> +<span class="normal">2072</span> +<span class="normal">2073</span> +<span class="normal">2074</span> +<span class="normal">2075</span> +<span class="normal">2076</span> +<span class="normal">2077</span> +<span class="normal">2078</span> +<span class="normal">2079</span> +<span class="normal">2080</span> +<span class="normal">2081</span> +<span class="normal">2082</span> +<span class="normal">2083</span> +<span class="normal">2084</span> +<span class="normal">2085</span> +<span class="normal">2086</span> +<span class="normal">2087</span> +<span class="normal">2088</span> +<span class="normal">2089</span> +<span class="normal">2090</span> +<span class="normal">2091</span> +<span class="normal">2092</span> +<span class="normal">2093</span> +<span class="normal">2094</span> +<span class="normal">2095</span> +<span class="normal">2096</span> +<span class="normal">2097</span> +<span class="normal">2098</span> +<span class="normal">2099</span> +<span class="normal">2100</span> +<span class="normal">2101</span> +<span class="normal">2102</span> +<span class="normal">2103</span> +<span class="normal">2104</span> +<span class="normal">2105</span> +<span class="normal">2106</span> +<span class="normal">2107</span> +<span class="normal">2108</span> +<span class="normal">2109</span> +<span class="normal">2110</span> +<span class="normal">2111</span> +<span class="normal">2112</span> +<span class="normal">2113</span> +<span class="normal">2114</span> +<span class="normal">2115</span> +<span class="normal">2116</span> +<span class="normal">2117</span> +<span class="normal">2118</span> +<span class="normal">2119</span> +<span class="normal">2120</span> +<span class="normal">2121</span> +<span class="normal">2122</span> +<span class="normal">2123</span> +<span class="normal">2124</span> +<span class="normal">2125</span> +<span class="normal">2126</span> +<span class="normal">2127</span> +<span class="normal">2128</span> +<span class="normal">2129</span> +<span class="normal">2130</span> +<span class="normal">2131</span> +<span class="normal">2132</span> +<span class="normal">2133</span> +<span class="normal">2134</span> +<span class="normal">2135</span> +<span class="normal">2136</span> +<span class="normal">2137</span> +<span class="normal">2138</span> +<span class="normal">2139</span> +<span class="normal">2140</span> +<span class="normal">2141</span> +<span class="normal">2142</span> +<span class="normal">2143</span> +<span class="normal">2144</span> +<span class="normal">2145</span> +<span class="normal">2146</span> +<span class="normal">2147</span> +<span class="normal">2148</span> +<span class="normal">2149</span> +<span class="normal">2150</span> +<span class="normal">2151</span> +<span class="normal">2152</span> +<span class="normal">2153</span> +<span class="normal">2154</span> +<span class="normal">2155</span> +<span class="normal">2156</span> +<span class="normal">2157</span> +<span class="normal">2158</span> +<span class="normal">2159</span> +<span class="normal">2160</span> +<span class="normal">2161</span> +<span class="normal">2162</span> +<span class="normal">2163</span> +<span class="normal">2164</span> +<span class="normal">2165</span> +<span class="normal">2166</span> +<span class="normal">2167</span> +<span class="normal">2168</span> +<span class="normal">2169</span> +<span class="normal">2170</span> +<span class="normal">2171</span> +<span class="normal">2172</span> +<span class="normal">2173</span> +<span class="normal">2174</span> +<span class="normal">2175</span> +<span class="normal">2176</span> +<span class="normal">2177</span> +<span class="normal">2178</span> +<span class="normal">2179</span> +<span class="normal">2180</span> +<span class="normal">2181</span> +<span class="normal">2182</span> +<span class="normal">2183</span> +<span class="normal">2184</span> +<span class="normal">2185</span> +<span class="normal">2186</span> +<span class="normal">2187</span> +<span class="normal">2188</span> +<span class="normal">2189</span> +<span class="normal">2190</span> +<span class="normal">2191</span> +<span class="normal">2192</span> +<span class="normal">2193</span> +<span class="normal">2194</span> +<span class="normal">2195</span> +<span class="normal">2196</span> +<span class="normal">2197</span> +<span class="normal">2198</span> +<span class="normal">2199</span> +<span class="normal">2200</span> +<span class="normal">2201</span> +<span class="normal">2202</span> +<span class="normal">2203</span> +<span class="normal">2204</span> +<span class="normal">2205</span> +<span class="normal">2206</span> +<span class="normal">2207</span> +<span class="normal">2208</span> +<span class="normal">2209</span> +<span class="normal">2210</span> +<span class="normal">2211</span> +<span class="normal">2212</span> +<span class="normal">2213</span> +<span class="normal">2214</span> +<span class="normal">2215</span> +<span class="normal">2216</span> +<span class="normal">2217</span> +<span class="normal">2218</span> +<span class="normal">2219</span> +<span class="normal">2220</span> +<span class="normal">2221</span> +<span class="normal">2222</span> +<span class="normal">2223</span> +<span class="normal">2224</span> +<span class="normal">2225</span> +<span class="normal">2226</span> +<span class="normal">2227</span> +<span class="normal">2228</span> +<span class="normal">2229</span> +<span class="normal">2230</span> +<span class="normal">2231</span> +<span class="normal">2232</span> +<span class="normal">2233</span> +<span class="normal">2234</span> +<span class="normal">2235</span> +<span class="normal">2236</span> +<span class="normal">2237</span> +<span class="normal">2238</span> +<span class="normal">2239</span> +<span class="normal">2240</span> +<span class="normal">2241</span> +<span class="normal">2242</span> +<span class="normal">2243</span> +<span class="normal">2244</span> +<span class="normal">2245</span> +<span class="normal">2246</span> +<span class="normal">2247</span> +<span class="normal">2248</span> +<span class="normal">2249</span> +<span class="normal">2250</span> +<span class="normal">2251</span> +<span class="normal">2252</span> +<span class="normal">2253</span> +<span class="normal">2254</span> +<span class="normal">2255</span> +<span class="normal">2256</span> +<span class="normal">2257</span> +<span class="normal">2258</span> +<span class="normal">2259</span> +<span class="normal">2260</span> +<span class="normal">2261</span> +<span class="normal">2262</span> +<span class="normal">2263</span> +<span class="normal">2264</span> +<span class="normal">2265</span> +<span class="normal">2266</span> +<span class="normal">2267</span> +<span class="normal">2268</span> +<span class="normal">2269</span> +<span class="normal">2270</span> +<span class="normal">2271</span> +<span class="normal">2272</span> +<span class="normal">2273</span> +<span class="normal">2274</span> +<span class="normal">2275</span> +<span class="normal">2276</span> +<span class="normal">2277</span> +<span class="normal">2278</span> +<span class="normal">2279</span> +<span class="normal">2280</span> +<span class="normal">2281</span> +<span class="normal">2282</span> +<span class="normal">2283</span> +<span class="normal">2284</span> +<span class="normal">2285</span> +<span class="normal">2286</span> +<span class="normal">2287</span> +<span class="normal">2288</span> +<span class="normal">2289</span> +<span class="normal">2290</span> +<span class="normal">2291</span> +<span class="normal">2292</span> +<span class="normal">2293</span> +<span class="normal">2294</span> +<span class="normal">2295</span> +<span class="normal">2296</span> +<span class="normal">2297</span> +<span class="normal">2298</span> +<span class="normal">2299</span> +<span class="normal">2300</span> +<span class="normal">2301</span> +<span class="normal">2302</span> +<span class="normal">2303</span> +<span class="normal">2304</span> +<span class="normal">2305</span> +<span class="normal">2306</span> +<span class="normal">2307</span> +<span class="normal">2308</span> +<span class="normal">2309</span> +<span class="normal">2310</span> +<span class="normal">2311</span> +<span class="normal">2312</span> +<span class="normal">2313</span> +<span class="normal">2314</span> +<span class="normal">2315</span> +<span class="normal">2316</span> +<span class="normal">2317</span> +<span class="normal">2318</span> +<span class="normal">2319</span> +<span class="normal">2320</span> +<span class="normal">2321</span> +<span class="normal">2322</span> +<span class="normal">2323</span> +<span class="normal">2324</span> +<span class="normal">2325</span> +<span class="normal">2326</span> +<span class="normal">2327</span> +<span class="normal">2328</span> +<span class="normal">2329</span> +<span class="normal">2330</span> +<span class="normal">2331</span> +<span class="normal">2332</span> +<span class="normal">2333</span> +<span class="normal">2334</span> +<span class="normal">2335</span> +<span class="normal">2336</span> +<span class="normal">2337</span> +<span class="normal">2338</span> +<span class="normal">2339</span> +<span class="normal">2340</span> +<span class="normal">2341</span> +<span class="normal">2342</span> +<span class="normal">2343</span> +<span class="normal">2344</span> +<span class="normal">2345</span> +<span class="normal">2346</span> +<span class="normal">2347</span> +<span class="normal">2348</span> +<span class="normal">2349</span> +<span class="normal">2350</span> +<span class="normal">2351</span> +<span class="normal">2352</span> +<span class="normal">2353</span> +<span class="normal">2354</span> +<span class="normal">2355</span> +<span class="normal">2356</span> +<span class="normal">2357</span> +<span class="normal">2358</span> +<span class="normal">2359</span> +<span class="normal">2360</span> +<span class="normal">2361</span> +<span class="normal">2362</span> +<span class="normal">2363</span> +<span class="normal">2364</span> +<span class="normal">2365</span> +<span class="normal">2366</span> +<span class="normal">2367</span> +<span class="normal">2368</span> +<span class="normal">2369</span> +<span class="normal">2370</span> +<span class="normal">2371</span> +<span class="normal">2372</span> +<span class="normal">2373</span> +<span class="normal">2374</span> +<span class="normal">2375</span> +<span class="normal">2376</span> +<span class="normal">2377</span> +<span class="normal">2378</span> +<span class="normal">2379</span> +<span class="normal">2380</span> +<span class="normal">2381</span> +<span class="normal">2382</span> +<span class="normal">2383</span> +<span class="normal">2384</span> +<span class="normal">2385</span> +<span class="normal">2386</span> +<span class="normal">2387</span> +<span class="normal">2388</span> +<span class="normal">2389</span> +<span class="normal">2390</span> +<span class="normal">2391</span> +<span class="normal">2392</span> +<span class="normal">2393</span> +<span class="normal">2394</span> +<span class="normal">2395</span> +<span class="normal">2396</span> +<span class="normal">2397</span> +<span class="normal">2398</span> +<span class="normal">2399</span> +<span class="normal">2400</span> +<span class="normal">2401</span> +<span class="normal">2402</span> +<span class="normal">2403</span> +<span class="normal">2404</span> +<span class="normal">2405</span> +<span class="normal">2406</span> +<span class="normal">2407</span> +<span class="normal">2408</span> +<span class="normal">2409</span> +<span class="normal">2410</span> +<span class="normal">2411</span> +<span class="normal">2412</span> +<span class="normal">2413</span> +<span class="normal">2414</span> +<span class="normal">2415</span> +<span class="normal">2416</span> +<span class="normal">2417</span> +<span class="normal">2418</span> +<span class="normal">2419</span> +<span class="normal">2420</span> +<span class="normal">2421</span> +<span class="normal">2422</span> +<span class="normal">2423</span> +<span class="normal">2424</span> +<span class="normal">2425</span> +<span class="normal">2426</span> +<span class="normal">2427</span> +<span class="normal">2428</span> +<span class="normal">2429</span> +<span class="normal">2430</span> +<span class="normal">2431</span> +<span class="normal">2432</span> +<span class="normal">2433</span> +<span class="normal">2434</span> +<span class="normal">2435</span> +<span class="normal">2436</span> +<span class="normal">2437</span> +<span class="normal">2438</span> +<span class="normal">2439</span> +<span class="normal">2440</span> +<span class="normal">2441</span> +<span class="normal">2442</span> +<span class="normal">2443</span> +<span class="normal">2444</span> +<span class="normal">2445</span> +<span class="normal">2446</span> +<span class="normal">2447</span> +<span class="normal">2448</span> +<span class="normal">2449</span> +<span class="normal">2450</span> +<span class="normal">2451</span> +<span class="normal">2452</span> +<span class="normal">2453</span> +<span class="normal">2454</span> +<span class="normal">2455</span> +<span class="normal">2456</span> +<span class="normal">2457</span> +<span class="normal">2458</span> +<span class="normal">2459</span> +<span class="normal">2460</span> +<span class="normal">2461</span> +<span class="normal">2462</span> +<span class="normal">2463</span> +<span class="normal">2464</span> +<span class="normal">2465</span> +<span class="normal">2466</span> +<span class="normal">2467</span> +<span class="normal">2468</span> +<span class="normal">2469</span> +<span class="normal">2470</span> +<span class="normal">2471</span> +<span class="normal">2472</span> +<span class="normal">2473</span> +<span class="normal">2474</span> +<span class="normal">2475</span> +<span class="normal">2476</span> +<span class="normal">2477</span> +<span class="normal">2478</span> +<span class="normal">2479</span> +<span class="normal">2480</span> +<span class="normal">2481</span> +<span class="normal">2482</span> +<span class="normal">2483</span> +<span class="normal">2484</span> +<span class="normal">2485</span> +<span class="normal">2486</span> +<span class="normal">2487</span> +<span class="normal">2488</span> +<span class="normal">2489</span> +<span class="normal">2490</span> +<span class="normal">2491</span> +<span class="normal">2492</span> +<span class="normal">2493</span> +<span class="normal">2494</span> +<span class="normal">2495</span> +<span class="normal">2496</span> +<span class="normal">2497</span> +<span class="normal">2498</span> +<span class="normal">2499</span> +<span class="normal">2500</span> +<span class="normal">2501</span> +<span class="normal">2502</span> +<span class="normal">2503</span> +<span class="normal">2504</span> +<span class="normal">2505</span> +<span class="normal">2506</span> +<span class="normal">2507</span> +<span class="normal">2508</span> +<span class="normal">2509</span> +<span class="normal">2510</span> +<span class="normal">2511</span> +<span class="normal">2512</span> +<span class="normal">2513</span> +<span class="normal">2514</span> +<span class="normal">2515</span> +<span class="normal">2516</span> +<span class="normal">2517</span> +<span class="normal">2518</span> +<span class="normal">2519</span> +<span class="normal">2520</span> +<span class="normal">2521</span> +<span class="normal">2522</span> +<span class="normal">2523</span> +<span class="normal">2524</span> +<span class="normal">2525</span> +<span class="normal">2526</span> +<span class="normal">2527</span> +<span class="normal">2528</span> +<span class="normal">2529</span> +<span class="normal">2530</span> +<span class="normal">2531</span> +<span class="normal">2532</span> +<span class="normal">2533</span> +<span class="normal">2534</span> +<span class="normal">2535</span> +<span class="normal">2536</span> +<span class="normal">2537</span> +<span class="normal">2538</span> +<span class="normal">2539</span> +<span class="normal">2540</span> +<span class="normal">2541</span> +<span class="normal">2542</span> +<span class="normal">2543</span> +<span class="normal">2544</span> +<span class="normal">2545</span> +<span class="normal">2546</span> +<span class="normal">2547</span> +<span class="normal">2548</span> +<span class="normal">2549</span> +<span class="normal">2550</span> +<span class="normal">2551</span> +<span class="normal">2552</span> +<span class="normal">2553</span> +<span class="normal">2554</span> +<span class="normal">2555</span> +<span class="normal">2556</span> +<span class="normal">2557</span> +<span class="normal">2558</span> +<span class="normal">2559</span> +<span class="normal">2560</span> +<span class="normal">2561</span> +<span class="normal">2562</span> +<span class="normal">2563</span> +<span class="normal">2564</span> +<span class="normal">2565</span> +<span class="normal">2566</span> +<span class="normal">2567</span> +<span class="normal">2568</span> +<span class="normal">2569</span> +<span class="normal">2570</span> +<span class="normal">2571</span> +<span class="normal">2572</span> +<span class="normal">2573</span> +<span class="normal">2574</span> +<span class="normal">2575</span> +<span class="normal">2576</span> +<span class="normal">2577</span> +<span class="normal">2578</span> +<span class="normal">2579</span> +<span class="normal">2580</span> +<span class="normal">2581</span> +<span class="normal">2582</span> +<span class="normal">2583</span> +<span class="normal">2584</span> +<span class="normal">2585</span> +<span class="normal">2586</span> +<span class="normal">2587</span> +<span class="normal">2588</span> +<span class="normal">2589</span> +<span class="normal">2590</span> +<span class="normal">2591</span> +<span class="normal">2592</span> +<span class="normal">2593</span> +<span class="normal">2594</span> +<span class="normal">2595</span> +<span class="normal">2596</span> +<span class="normal">2597</span> +<span class="normal">2598</span> +<span class="normal">2599</span> +<span class="normal">2600</span> +<span class="normal">2601</span> +<span class="normal">2602</span> +<span class="normal">2603</span> +<span class="normal">2604</span> +<span class="normal">2605</span> +<span class="normal">2606</span> +<span class="normal">2607</span> +<span class="normal">2608</span> +<span class="normal">2609</span> +<span class="normal">2610</span> +<span class="normal">2611</span> +<span class="normal">2612</span> +<span class="normal">2613</span> +<span class="normal">2614</span> +<span class="normal">2615</span> +<span class="normal">2616</span> +<span class="normal">2617</span> +<span class="normal">2618</span> +<span class="normal">2619</span> +<span class="normal">2620</span> +<span class="normal">2621</span> +<span class="normal">2622</span> +<span class="normal">2623</span> +<span class="normal">2624</span> +<span class="normal">2625</span> +<span class="normal">2626</span> +<span class="normal">2627</span> +<span class="normal">2628</span> +<span class="normal">2629</span> +<span class="normal">2630</span> +<span class="normal">2631</span> +<span class="normal">2632</span> +<span class="normal">2633</span> +<span class="normal">2634</span> +<span class="normal">2635</span> +<span class="normal">2636</span> +<span class="normal">2637</span> +<span class="normal">2638</span> +<span class="normal">2639</span> +<span class="normal">2640</span> +<span class="normal">2641</span> +<span class="normal">2642</span> +<span class="normal">2643</span> +<span class="normal">2644</span> +<span class="normal">2645</span> +<span class="normal">2646</span> +<span class="normal">2647</span> +<span class="normal">2648</span> +<span class="normal">2649</span> +<span class="normal">2650</span> +<span class="normal">2651</span> +<span class="normal">2652</span> +<span class="normal">2653</span> +<span class="normal">2654</span> +<span class="normal">2655</span> +<span class="normal">2656</span> +<span class="normal">2657</span> +<span class="normal">2658</span> +<span class="normal">2659</span> +<span class="normal">2660</span> +<span class="normal">2661</span> +<span class="normal">2662</span> +<span class="normal">2663</span> +<span class="normal">2664</span> +<span class="normal">2665</span> +<span class="normal">2666</span> +<span class="normal">2667</span> +<span class="normal">2668</span> +<span class="normal">2669</span> +<span class="normal">2670</span> +<span class="normal">2671</span> +<span class="normal">2672</span> +<span class="normal">2673</span> +<span class="normal">2674</span> +<span class="normal">2675</span> +<span class="normal">2676</span> +<span class="normal">2677</span> +<span class="normal">2678</span> +<span class="normal">2679</span> +<span class="normal">2680</span> +<span class="normal">2681</span> +<span class="normal">2682</span> +<span class="normal">2683</span> +<span class="normal">2684</span> +<span class="normal">2685</span> +<span class="normal">2686</span> +<span class="normal">2687</span> +<span class="normal">2688</span> +<span class="normal">2689</span> +<span class="normal">2690</span> +<span class="normal">2691</span> +<span class="normal">2692</span> +<span class="normal">2693</span> +<span class="normal">2694</span> +<span class="normal">2695</span> +<span class="normal">2696</span> +<span class="normal">2697</span> +<span class="normal">2698</span> +<span class="normal">2699</span> +<span class="normal">2700</span> +<span class="normal">2701</span> +<span class="normal">2702</span> +<span class="normal">2703</span> +<span class="normal">2704</span> +<span class="normal">2705</span> +<span class="normal">2706</span> +<span class="normal">2707</span> +<span class="normal">2708</span> +<span class="normal">2709</span> +<span class="normal">2710</span> +<span class="normal">2711</span> +<span class="normal">2712</span> +<span class="normal">2713</span> +<span class="normal">2714</span> +<span class="normal">2715</span> +<span class="normal">2716</span> +<span class="normal">2717</span> +<span class="normal">2718</span> +<span class="normal">2719</span> +<span class="normal">2720</span> +<span class="normal">2721</span> +<span class="normal">2722</span> +<span class="normal">2723</span> +<span class="normal">2724</span> +<span class="normal">2725</span> +<span class="normal">2726</span> +<span class="normal">2727</span> +<span class="normal">2728</span> +<span class="normal">2729</span> +<span class="normal">2730</span> +<span class="normal">2731</span> +<span class="normal">2732</span> +<span class="normal">2733</span> +<span class="normal">2734</span> +<span class="normal">2735</span> +<span class="normal">2736</span> +<span class="normal">2737</span> +<span class="normal">2738</span> +<span class="normal">2739</span> +<span class="normal">2740</span> +<span class="normal">2741</span> +<span class="normal">2742</span> +<span class="normal">2743</span> +<span class="normal">2744</span> +<span class="normal">2745</span> +<span class="normal">2746</span> +<span class="normal">2747</span> +<span class="normal">2748</span> +<span class="normal">2749</span> +<span class="normal">2750</span> +<span class="normal">2751</span> +<span class="normal">2752</span> +<span class="normal">2753</span> +<span class="normal">2754</span> +<span class="normal">2755</span> +<span class="normal">2756</span> +<span class="normal">2757</span> +<span class="normal">2758</span> +<span class="normal">2759</span> +<span class="normal">2760</span> +<span class="normal">2761</span> +<span class="normal">2762</span> +<span class="normal">2763</span> +<span class="normal">2764</span> +<span class="normal">2765</span> +<span class="normal">2766</span> +<span class="normal">2767</span> +<span class="normal">2768</span> +<span class="normal">2769</span> +<span class="normal">2770</span> +<span class="normal">2771</span> +<span class="normal">2772</span> +<span class="normal">2773</span> +<span class="normal">2774</span> +<span class="normal">2775</span> +<span class="normal">2776</span> +<span class="normal">2777</span> +<span class="normal">2778</span> +<span class="normal">2779</span> +<span class="normal">2780</span> +<span class="normal">2781</span> +<span class="normal">2782</span> +<span class="normal">2783</span> +<span class="normal">2784</span> +<span class="normal">2785</span> +<span class="normal">2786</span> +<span class="normal">2787</span> +<span class="normal">2788</span> +<span class="normal">2789</span> +<span class="normal">2790</span> +<span class="normal">2791</span> +<span class="normal">2792</span> +<span class="normal">2793</span> +<span class="normal">2794</span> +<span class="normal">2795</span> +<span class="normal">2796</span> +<span class="normal">2797</span> +<span class="normal">2798</span> +<span class="normal">2799</span> +<span class="normal">2800</span> +<span class="normal">2801</span> +<span class="normal">2802</span> +<span class="normal">2803</span> +<span class="normal">2804</span> +<span class="normal">2805</span> +<span class="normal">2806</span> +<span class="normal">2807</span> +<span class="normal">2808</span> +<span class="normal">2809</span> +<span class="normal">2810</span> +<span class="normal">2811</span> +<span class="normal">2812</span> +<span class="normal">2813</span> +<span class="normal">2814</span> +<span class="normal">2815</span> +<span class="normal">2816</span> +<span class="normal">2817</span> +<span class="normal">2818</span> +<span class="normal">2819</span> +<span class="normal">2820</span> +<span class="normal">2821</span> +<span class="normal">2822</span> +<span class="normal">2823</span> +<span class="normal">2824</span> +<span class="normal">2825</span> +<span class="normal">2826</span> +<span class="normal">2827</span> +<span class="normal">2828</span> +<span class="normal">2829</span> +<span class="normal">2830</span> +<span class="normal">2831</span> +<span class="normal">2832</span> +<span class="normal">2833</span> +<span class="normal">2834</span> +<span class="normal">2835</span> +<span class="normal">2836</span> +<span class="normal">2837</span> +<span class="normal">2838</span> +<span class="normal">2839</span> +<span class="normal">2840</span> +<span class="normal">2841</span> +<span class="normal">2842</span> +<span class="normal">2843</span> +<span class="normal">2844</span> +<span class="normal">2845</span> +<span class="normal">2846</span> +<span class="normal">2847</span> +<span class="normal">2848</span> +<span class="normal">2849</span> +<span class="normal">2850</span> +<span class="normal">2851</span> +<span class="normal">2852</span> +<span class="normal">2853</span> +<span class="normal">2854</span> +<span class="normal">2855</span> +<span class="normal">2856</span> +<span class="normal">2857</span> +<span class="normal">2858</span> +<span class="normal">2859</span> +<span class="normal">2860</span> +<span class="normal">2861</span> +<span class="normal">2862</span> +<span class="normal">2863</span> +<span class="normal">2864</span> +<span class="normal">2865</span> +<span class="normal">2866</span> +<span class="normal">2867</span> +<span class="normal">2868</span> +<span class="normal">2869</span> +<span class="normal">2870</span> +<span class="normal">2871</span> +<span class="normal">2872</span> +<span class="normal">2873</span> +<span class="normal">2874</span> +<span class="normal">2875</span> +<span class="normal">2876</span> +<span class="normal">2877</span> +<span class="normal">2878</span> +<span class="normal">2879</span> +<span class="normal">2880</span> +<span class="normal">2881</span> +<span class="normal">2882</span> +<span class="normal">2883</span> +<span class="normal">2884</span> +<span class="normal">2885</span> +<span class="normal">2886</span> +<span class="normal">2887</span> +<span class="normal">2888</span> +<span class="normal">2889</span> +<span class="normal">2890</span> +<span class="normal">2891</span> +<span class="normal">2892</span> +<span class="normal">2893</span> +<span class="normal">2894</span> +<span class="normal">2895</span> +<span class="normal">2896</span> +<span class="normal">2897</span> +<span class="normal">2898</span> +<span class="normal">2899</span> +<span class="normal">2900</span> +<span class="normal">2901</span> +<span class="normal">2902</span> +<span class="normal">2903</span> +<span class="normal">2904</span> +<span class="normal">2905</span> +<span class="normal">2906</span> +<span class="normal">2907</span> +<span class="normal">2908</span> +<span class="normal">2909</span> +<span class="normal">2910</span> +<span class="normal">2911</span> +<span class="normal">2912</span> +<span class="normal">2913</span> +<span class="normal">2914</span> +<span class="normal">2915</span> +<span class="normal">2916</span> +<span class="normal">2917</span> +<span class="normal">2918</span> +<span class="normal">2919</span> +<span class="normal">2920</span> +<span class="normal">2921</span> +<span class="normal">2922</span> +<span class="normal">2923</span> +<span class="normal">2924</span> +<span class="normal">2925</span> +<span class="normal">2926</span> +<span class="normal">2927</span> +<span class="normal">2928</span> +<span class="normal">2929</span> +<span class="normal">2930</span> +<span class="normal">2931</span> +<span class="normal">2932</span> +<span class="normal">2933</span> +<span class="normal">2934</span> +<span class="normal">2935</span> +<span class="normal">2936</span> +<span class="normal">2937</span> +<span class="normal">2938</span> +<span class="normal">2939</span> +<span class="normal">2940</span> +<span class="normal">2941</span> +<span class="normal">2942</span> +<span class="normal">2943</span> +<span class="normal">2944</span> +<span class="normal">2945</span> +<span class="normal">2946</span> +<span class="normal">2947</span> +<span class="normal">2948</span> +<span class="normal">2949</span> +<span class="normal">2950</span> +<span class="normal">2951</span> +<span class="normal">2952</span> +<span class="normal">2953</span> +<span class="normal">2954</span> +<span class="normal">2955</span> +<span class="normal">2956</span> +<span class="normal">2957</span> +<span class="normal">2958</span> +<span class="normal">2959</span> +<span class="normal">2960</span> +<span class="normal">2961</span> +<span class="normal">2962</span> +<span class="normal">2963</span> +<span class="normal">2964</span> +<span class="normal">2965</span> +<span class="normal">2966</span> +<span class="normal">2967</span> +<span class="normal">2968</span> +<span class="normal">2969</span> +<span class="normal">2970</span> +<span class="normal">2971</span> +<span class="normal">2972</span> +<span class="normal">2973</span> +<span class="normal">2974</span> +<span class="normal">2975</span> +<span class="normal">2976</span> +<span class="normal">2977</span> +<span class="normal">2978</span> +<span class="normal">2979</span> +<span class="normal">2980</span> +<span class="normal">2981</span> +<span class="normal">2982</span> +<span class="normal">2983</span> +<span class="normal">2984</span> +<span class="normal">2985</span> +<span class="normal">2986</span> +<span class="normal">2987</span> +<span class="normal">2988</span> +<span class="normal">2989</span> +<span class="normal">2990</span> +<span class="normal">2991</span> +<span class="normal">2992</span> +<span class="normal">2993</span> +<span class="normal">2994</span> +<span class="normal">2995</span> +<span class="normal">2996</span> +<span class="normal">2997</span> +<span class="normal">2998</span> +<span class="normal">2999</span> +<span class="normal">3000</span> +<span class="normal">3001</span> +<span class="normal">3002</span> +<span class="normal">3003</span> +<span class="normal">3004</span> +<span class="normal">3005</span> +<span class="normal">3006</span> +<span class="normal">3007</span> +<span class="normal">3008</span> +<span class="normal">3009</span> +<span class="normal">3010</span> +<span class="normal">3011</span> +<span class="normal">3012</span> +<span class="normal">3013</span> +<span class="normal">3014</span> +<span class="normal">3015</span> +<span class="normal">3016</span> +<span class="normal">3017</span> +<span class="normal">3018</span> +<span class="normal">3019</span> +<span class="normal">3020</span> +<span class="normal">3021</span> +<span class="normal">3022</span> +<span class="normal">3023</span> +<span class="normal">3024</span> +<span class="normal">3025</span> +<span class="normal">3026</span> +<span class="normal">3027</span> +<span class="normal">3028</span> +<span class="normal">3029</span> +<span class="normal">3030</span> +<span class="normal">3031</span> +<span class="normal">3032</span> +<span class="normal">3033</span> +<span class="normal">3034</span> +<span class="normal">3035</span> +<span class="normal">3036</span> +<span class="normal">3037</span> +<span class="normal">3038</span> +<span class="normal">3039</span> +<span class="normal">3040</span> +<span class="normal">3041</span> +<span class="normal">3042</span> +<span class="normal">3043</span> +<span class="normal">3044</span> +<span class="normal">3045</span> +<span class="normal">3046</span> +<span class="normal">3047</span> +<span class="normal">3048</span> +<span class="normal">3049</span> +<span class="normal">3050</span> +<span class="normal">3051</span> +<span class="normal">3052</span> +<span class="normal">3053</span> +<span class="normal">3054</span> +<span class="normal">3055</span> +<span class="normal">3056</span> +<span class="normal">3057</span> +<span class="normal">3058</span> +<span class="normal">3059</span> +<span class="normal">3060</span> +<span class="normal">3061</span> +<span class="normal">3062</span> +<span class="normal">3063</span> +<span class="normal">3064</span> +<span class="normal">3065</span> +<span class="normal">3066</span> +<span class="normal">3067</span> +<span class="normal">3068</span> +<span class="normal">3069</span> +<span class="normal">3070</span> +<span class="normal">3071</span> +<span class="normal">3072</span> +<span class="normal">3073</span> +<span class="normal">3074</span> +<span class="normal">3075</span> +<span class="normal">3076</span> +<span class="normal">3077</span> +<span class="normal">3078</span> +<span class="normal">3079</span> +<span class="normal">3080</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) 1998, 2002 the Free Software Foundation</span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-4" name="line-4"></a><span class="cm"> *</span> +<a id="line-5" name="line-5"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-6" name="line-6"></a><span class="cm"> *</span> +<a id="line-7" name="line-7"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-8" name="line-8"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-9" name="line-9"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-10" name="line-10"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-11" name="line-11"></a><span class="cm"> *</span> +<a id="line-12" name="line-12"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-13" name="line-13"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-14" name="line-14"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-15" name="line-15"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-16" name="line-16"></a><span class="cm"> *</span> +<a id="line-17" name="line-17"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-18" name="line-18"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-19" name="line-19"></a><span class="cm"> *</span> +<a id="line-20" name="line-20"></a><span class="cm"> * Authors:</span> +<a id="line-21" name="line-21"></a><span class="cm"> * Dennis Cranston <[email protected]></span> +<a id="line-22" name="line-22"></a><span class="cm"> * George Lebl</span> +<a id="line-23" name="line-23"></a><span class="cm"> */</span> +<a id="line-24" name="line-24"></a> +<a id="line-25" name="line-25"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#endif</span> +<a id="line-28" name="line-28"></a> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><fnmatch.h></span> +<a id="line-30" name="line-30"></a><span class="cp">#ifndef FNM_CASEFOLD</span> +<a id="line-31" name="line-31"></a><span class="cp">#define FNM_CASEFOLD 0</span> +<a id="line-32" name="line-32"></a><span class="cp">#endif</span> +<a id="line-33" name="line-33"></a> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><signal.h></span> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><unistd.h></span> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><errno.h></span> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><sys/wait.h></span> +<a id="line-40" name="line-40"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<a id="line-41" name="line-41"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-42" name="line-42"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdk.h></span> +<a id="line-43" name="line-43"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-44" name="line-44"></a> +<a id="line-45" name="line-45"></a><span class="cp">#ifdef ENABLE_NLS</span> +<a id="line-46" name="line-46"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><locale.h></span> +<a id="line-47" name="line-47"></a><span class="cp">#endif </span><span class="cm">/* ENABLE_NLS */</span> +<a id="line-48" name="line-48"></a> +<a id="line-49" name="line-49"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool.h"</span> +<a id="line-50" name="line-50"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool-callbacks.h"</span> +<a id="line-51" name="line-51"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool-support.h"</span> +<a id="line-52" name="line-52"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool-entry.h"</span> +<a id="line-53" name="line-53"></a> +<a id="line-54" name="line-54"></a><span class="cp">#define MATE_SEARCH_TOOL_DEFAULT_ICON_SIZE 16</span> +<a id="line-55" name="line-55"></a><span class="cp">#define MATE_SEARCH_TOOL_REFRESH_DURATION 50000</span> +<a id="line-56" name="line-56"></a><span class="cp">#define LEFT_LABEL_SPACING " "</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="k">static</span><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">parent_class</span><span class="p">;</span> +<a id="line-59" name="line-59"></a> +<a id="line-60" name="line-60"></a><span class="k">typedef</span><span class="w"> </span><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">,</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_NUMERIC</span><span class="p">,</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">,</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_DATE_BEFORE</span><span class="p">,</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_DATE_AFTER</span><span class="p">,</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR</span><span class="p">,</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_NONE</span> +<a id="line-68" name="line-68"></a><span class="p">}</span><span class="w"> </span><span class="n">GSearchConstraintType</span><span class="p">;</span> +<a id="line-69" name="line-69"></a> +<a id="line-70" name="line-70"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">_GSearchOptionTemplate</span><span class="w"> </span><span class="n">GSearchOptionTemplate</span><span class="p">;</span> +<a id="line-71" name="line-71"></a> +<a id="line-72" name="line-72"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_GSearchOptionTemplate</span><span class="w"> </span><span class="p">{</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">GSearchConstraintType</span><span class="w"> </span><span class="n">type</span><span class="p">;</span><span class="w"> </span><span class="cm">/* The available option type */</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">option</span><span class="p">;</span><span class="w"> </span><span class="cm">/* An option string to pass to the command */</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">desc</span><span class="p">;</span><span class="w"> </span><span class="cm">/* The description for display */</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">units</span><span class="p">;</span><span class="w"> </span><span class="cm">/* Optional units for display */</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_selected</span><span class="p">;</span> +<a id="line-78" name="line-78"></a><span class="p">};</span> +<a id="line-79" name="line-79"></a> +<a id="line-80" name="line-80"></a><span class="k">static</span><span class="w"> </span><span class="n">GSearchOptionTemplate</span><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Contains the _text"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="w"> </span><span class="p">},</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_DATE_BEFORE</span><span class="p">,</span><span class="w"> </span><span class="s">"-mtime -%d"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"_Date modified less than"</span><span class="p">),</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"days"</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_DATE_AFTER</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\</span><span class="s">( -mtime +%d -o -mtime %d </span><span class="se">\\</span><span class="s">)"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Date modified more than"</span><span class="p">),</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"days"</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="w"> </span><span class="p">},</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_NUMERIC</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\</span><span class="s">( -size %uc -o -size +%uc </span><span class="se">\\</span><span class="s">)"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"S_ize at least"</span><span class="p">),</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"kilobytes"</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_NUMERIC</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\</span><span class="s">( -size %uc -o -size -%uc </span><span class="se">\\</span><span class="s">)"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Si_ze at most"</span><span class="p">),</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"kilobytes"</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">,</span><span class="w"> </span><span class="s">"-size 0c </span><span class="se">\\</span><span class="s">( -type f -o -type d </span><span class="se">\\</span><span class="s">)"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"File is empty"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="w"> </span><span class="p">},</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">,</span><span class="w"> </span><span class="s">"-user '%s'"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Owned by _user"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">,</span><span class="w"> </span><span class="s">"-group '%s'"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Owned by _group"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\</span><span class="s">( -nouser -o -nogroup </span><span class="se">\\</span><span class="s">)"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Owner is unrecognized"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="w"> </span><span class="p">},</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">,</span><span class="w"> </span><span class="s">"'!' -name '*%s*'"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Na_me does not contain"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">,</span><span class="w"> </span><span class="s">"-regex '%s'"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Name matches regular e_xpression"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="w"> </span><span class="p">},</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">,</span><span class="w"> </span><span class="s">"SHOW_HIDDEN_FILES"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Show hidden and backup files"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">,</span><span class="w"> </span><span class="s">"-follow"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Follow symbolic links"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">,</span><span class="w"> </span><span class="s">"EXCLUDE_OTHER_FILESYSTEMS"</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Exclude other filesystems"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="p">},</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">}</span> +<a id="line-101" name="line-101"></a><span class="p">};</span> +<a id="line-102" name="line-102"></a> +<a id="line-103" name="line-103"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_CONTAINS_THE_TEXT</span><span class="p">,</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR_00</span><span class="p">,</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_DATE_MODIFIED_BEFORE</span><span class="p">,</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_DATE_MODIFIED_AFTER</span><span class="p">,</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR_01</span><span class="p">,</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SIZE_IS_MORE_THAN</span><span class="p">,</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SIZE_IS_LESS_THAN</span><span class="p">,</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FILE_IS_EMPTY</span><span class="p">,</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR_02</span><span class="p">,</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_OWNED_BY_USER</span><span class="p">,</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_OWNED_BY_GROUP</span><span class="p">,</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_OWNER_IS_UNRECOGNIZED</span><span class="p">,</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR_03</span><span class="p">,</span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FILE_IS_NOT_NAMED</span><span class="p">,</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FILE_MATCHES_REGULAR_EXPRESSION</span><span class="p">,</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR_04</span><span class="p">,</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SHOW_HIDDEN_FILES_AND_FOLDERS</span><span class="p">,</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FOLLOW_SYMBOLIC_LINKS</span><span class="p">,</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SEARCH_OTHER_FILESYSTEMS</span><span class="p">,</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_MAXIMUM_POSSIBLE</span> +<a id="line-124" name="line-124"></a><span class="p">};</span> +<a id="line-125" name="line-125"></a> +<a id="line-126" name="line-126"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkTargetEntry</span><span class="w"> </span><span class="n">GSearchDndTable</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"text/uri-list"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="p">},</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"text/plain"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">},</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"STRING"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">}</span> +<a id="line-130" name="line-130"></a><span class="p">};</span> +<a id="line-131" name="line-131"></a> +<a id="line-132" name="line-132"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">GSearchTotalDnds</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchDndTable</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchDndTable</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span> +<a id="line-133" name="line-133"></a> +<a id="line-134" name="line-134"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_GSearchGOptionArguments</span><span class="w"> </span><span class="p">{</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">name</span><span class="p">;</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">;</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">contains</span><span class="p">;</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">user</span><span class="p">;</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">group</span><span class="p">;</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">nouser</span><span class="p">;</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">mtimeless</span><span class="p">;</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">mtimemore</span><span class="p">;</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">sizeless</span><span class="p">;</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">sizemore</span><span class="p">;</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">empty</span><span class="p">;</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">notnamed</span><span class="p">;</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">regex</span><span class="p">;</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">hidden</span><span class="p">;</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">follow</span><span class="p">;</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">mounts</span><span class="p">;</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">sortby</span><span class="p">;</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">descending</span><span class="p">;</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">start</span><span class="p">;</span> +<a id="line-154" name="line-154"></a><span class="p">}</span><span class="w"> </span><span class="n">GSearchGOptionArguments</span><span class="p">;</span> +<a id="line-155" name="line-155"></a> +<a id="line-156" name="line-156"></a><span class="k">static</span><span class="w"> </span><span class="n">GOptionEntry</span><span class="w"> </span><span class="n">GSearchGOptionEntries</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"version"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_FLAG_NO_ARG</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_CALLBACK</span><span class="p">,</span><span class="w"> </span><span class="n">version_cb</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Show version of the application"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"named"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"STRING"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"path"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"PATH"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"sortby"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sortby</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"VALUE"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"descending"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">descending</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"start"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"contains"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">contains</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"STRING"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"mtimeless"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">mtimeless</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"DAYS"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"mtimemore"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">mtimemore</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"DAYS"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"sizemore"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sizemore</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"KILOBYTES"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"sizeless"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sizeless</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"KILOBYTES"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"empty"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">empty</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"user"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">user</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"USER"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"group"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">group</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"GROUP"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"nouser"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">nouser</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"notnamed"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">notnamed</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"STRING"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"regex"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_STRING</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">regex</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"PATTERN"</span><span class="p">)</span><span class="w"> </span><span class="p">},</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"hidden"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">hidden</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"follow"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">follow</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"mounts"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">mounts</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">}</span> +<a id="line-178" name="line-178"></a><span class="p">};</span> +<a id="line-179" name="line-179"></a> +<a id="line-180" name="line-180"></a><span class="k">static</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">;</span> +<a id="line-181" name="line-181"></a><span class="k">static</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locate_command_default_options</span><span class="p">;</span> +<a id="line-182" name="line-182"></a><span class="kt">pid_t</span><span class="w"> </span><span class="n">locate_database_check_command_pid</span><span class="p">;</span> +<a id="line-183" name="line-183"></a> +<a id="line-184" name="line-184"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-185" name="line-185"></a><span class="nf">handle_locate_command_stdout_io</span><span class="w"> </span><span class="p">(</span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">ioc</span><span class="p">,</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">GIOCondition</span><span class="w"> </span><span class="n">condition</span><span class="p">,</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-188" name="line-188"></a><span class="p">{</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">condition</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-193" name="line-193"></a> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">;</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="o">-></span><span class="n">is_readable</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-200" name="line-200"></a> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">{</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">status</span><span class="p">;</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">{</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_read_line_string</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-206" name="line-206"></a> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_EOF</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="p">}</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_AGAIN</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="p">}</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="p">}</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="p">}</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">string</span><span class="o">-></span><span class="n">len</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">strncmp</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"/"</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_available</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="p">}</span> +<a id="line-221" name="line-221"></a> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_AGAIN</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-223" name="line-223"></a> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="p">}</span> +<a id="line-227" name="line-227"></a> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_IO_STATUS_NORMAL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"handle_locate_command_stdout_io(): %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="p">}</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="p">}</span> +<a id="line-234" name="line-234"></a> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">g_io_channel_get_buffer_condition</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="p">)</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="p">);</span> +<a id="line-236" name="line-236"></a> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">waitpid</span><span class="w"> </span><span class="p">(</span><span class="n">locate_database_check_command_pid</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="p">}</span> +<a id="line-240" name="line-240"></a> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="n">condition</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_check_finished</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">g_io_channel_shutdown</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="p">}</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-247" name="line-247"></a><span class="p">}</span> +<a id="line-248" name="line-248"></a> +<a id="line-249" name="line-249"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-250" name="line-250"></a><span class="nf">setup_case_insensitive_arguments</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-251" name="line-251"></a><span class="p">{</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">case_insensitive_arguments_initialized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">cmd_stderr</span><span class="p">;</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">grep_cmd</span><span class="p">;</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locate</span><span class="p">;</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">case_insensitive_arguments_initialized</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="p">}</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">case_insensitive_arguments_initialized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-261" name="line-261"></a> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="cm">/* check find command for -iname argument compatibility */</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">g_spawn_command_line_sync</span><span class="w"> </span><span class="p">(</span><span class="s">"find /dev/null -iname 'string'"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">cmd_stderr</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-264" name="line-264"></a> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">cmd_stderr</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">cmd_stderr</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"-iname"</span><span class="p">);</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">SEARCH_CONSTRAINT_FILE_IS_NOT_NAMED</span><span class="p">].</span><span class="n">option</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"'!' -iname '*%s*'"</span><span class="p">);</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="p">}</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"-name"</span><span class="p">);</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="p">}</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmd_stderr</span><span class="p">);</span> +<a id="line-273" name="line-273"></a> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="cm">/* check grep command for -i argument compatibility */</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">grep_cmd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s -i 'string' /dev/null"</span><span class="p">,</span><span class="w"> </span><span class="n">GREP_COMMAND</span><span class="p">);</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">g_spawn_command_line_sync</span><span class="w"> </span><span class="p">(</span><span class="n">grep_cmd</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">cmd_stderr</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-277" name="line-277"></a> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">cmd_stderr</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">cmd_stderr</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmd_stderr</span><span class="p">);</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">grep_cmd</span><span class="p">);</span> +<a id="line-281" name="line-281"></a> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="cm">/* check grep command for -I argument compatibility, bug 568840 */</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">grep_cmd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s -i -I 'string' /dev/null"</span><span class="p">,</span><span class="w"> </span><span class="n">GREP_COMMAND</span><span class="p">);</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">g_spawn_command_line_sync</span><span class="w"> </span><span class="p">(</span><span class="n">grep_cmd</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">cmd_stderr</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-285" name="line-285"></a> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">cmd_stderr</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">cmd_stderr</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">SEARCH_CONSTRAINT_CONTAINS_THE_TEXT</span><span class="p">].</span><span class="n">option</span><span class="w"> </span><span class="o">=</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"'!' -type p -exec %s -i -I -c '%%s' {} </span><span class="se">\\</span><span class="s">;"</span><span class="p">,</span><span class="w"> </span><span class="n">GREP_COMMAND</span><span class="p">);</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="p">}</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">SEARCH_CONSTRAINT_CONTAINS_THE_TEXT</span><span class="p">].</span><span class="n">option</span><span class="w"> </span><span class="o">=</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"'!' -type p -exec %s -i -c '%%s' {} </span><span class="se">\\</span><span class="s">;"</span><span class="p">,</span><span class="w"> </span><span class="n">GREP_COMMAND</span><span class="p">);</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="p">}</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="p">}</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">SEARCH_CONSTRAINT_CONTAINS_THE_TEXT</span><span class="p">].</span><span class="n">option</span><span class="w"> </span><span class="o">=</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"'!' -type p -exec %s -c '%%s' {} </span><span class="se">\\</span><span class="s">;"</span><span class="p">,</span><span class="w"> </span><span class="n">GREP_COMMAND</span><span class="p">);</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="p">}</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmd_stderr</span><span class="p">);</span> +<a id="line-300" name="line-300"></a> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">locate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_find_program_in_path</span><span class="w"> </span><span class="p">(</span><span class="s">"locate"</span><span class="p">);</span> +<a id="line-302" name="line-302"></a> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">locate</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">ioc_stdout</span><span class="p">;</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">argv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">child_stdout</span><span class="p">;</span> +<a id="line-308" name="line-308"></a> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="cm">/* check locate command for -i argument compatibility */</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">locate</span><span class="p">,</span><span class="w"> </span><span class="s">" -i /"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">g_shell_parse_argv</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">);</span> +<a id="line-313" name="line-313"></a> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_check_finished</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_available</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-316" name="line-316"></a> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="cm">/* run locate command asynchronously because on some systems it can be slow */</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_spawn_async_with_pipes</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_home_dir</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">G_SPAWN_SEARCH_PATH</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="o">&</span><span class="n">locate_database_check_command_pid</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">child_stdout</span><span class="p">,</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-322" name="line-322"></a> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="n">ioc_stdout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_unix_new</span><span class="w"> </span><span class="p">(</span><span class="n">child_stdout</span><span class="p">);</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">g_io_channel_set_encoding</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">g_io_channel_set_flags</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_FLAG_NONBLOCK</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">g_io_add_watch</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_IO_HUP</span><span class="p">,</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">handle_locate_command_stdout_io</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">g_io_channel_unref</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">);</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="p">}</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_check_finished</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="p">}</span> +<a id="line-333" name="line-333"></a> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">argv</span><span class="p">);</span> +<a id="line-335" name="line-335"></a> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_check_finished</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="p">}</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="p">}</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="p">}</span> +<a id="line-343" name="line-343"></a> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_available</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">locate_command_default_options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"-i"</span><span class="p">);</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="p">}</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="cm">/* run locate again to check if it can find anything */</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">locate</span><span class="p">,</span><span class="w"> </span><span class="s">" /"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">g_shell_parse_argv</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">);</span> +<a id="line-352" name="line-352"></a> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_check_finished</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">locate_command_default_options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-355" name="line-355"></a> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="cm">/* run locate command asynchronously because on some systems it can be slow */</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_spawn_async_with_pipes</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_home_dir</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">G_SPAWN_SEARCH_PATH</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="o">&</span><span class="n">locate_database_check_command_pid</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">child_stdout</span><span class="p">,</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-361" name="line-361"></a> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">ioc_stdout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_unix_new</span><span class="w"> </span><span class="p">(</span><span class="n">child_stdout</span><span class="p">);</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">g_io_channel_set_encoding</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">g_io_channel_set_flags</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_FLAG_NONBLOCK</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">g_io_add_watch</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_IO_HUP</span><span class="p">,</span> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="n">handle_locate_command_stdout_io</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">g_io_channel_unref</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">);</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="p">}</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_check_finished</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="p">}</span> +<a id="line-372" name="line-372"></a> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">argv</span><span class="p">);</span> +<a id="line-374" name="line-374"></a> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_check_finished</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-376" name="line-376"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="p">}</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="p">}</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="p">}</span> +<a id="line-382" name="line-382"></a> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_available</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"A locate database has probably not been created."</span><span class="p">));</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="p">}</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="p">}</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="p">}</span> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="cm">/* locate is not installed */</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">locate_command_default_options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_available</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="p">}</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">grep_cmd</span><span class="p">);</span> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locate</span><span class="p">);</span> +<a id="line-395" name="line-395"></a><span class="p">}</span> +<a id="line-396" name="line-396"></a> +<a id="line-397" name="line-397"></a><span class="k">static</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-398" name="line-398"></a><span class="nf">setup_find_name_options</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">)</span> +<a id="line-399" name="line-399"></a><span class="p">{</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="cm">/* This function builds the name options for the find command. This in</span> +<a id="line-401" name="line-401"></a><span class="cm"> done to insure that the find command returns hidden files and folders. */</span> +<a id="line-402" name="line-402"></a> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">command</span><span class="p">;</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-405" name="line-405"></a> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="s">"*"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-407" name="line-407"></a> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'.'</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\</span><span class="s">( %s </span><span class="se">\"</span><span class="s">*%s*</span><span class="se">\"</span><span class="s"> -o %s </span><span class="se">\"</span><span class="s">.*%s*</span><span class="se">\"</span><span class="s"> </span><span class="se">\\</span><span class="s">) "</span><span class="p">,</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="p">}</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\</span><span class="s">( %s </span><span class="se">\"</span><span class="s">*%s*</span><span class="se">\"</span><span class="s"> -o %s </span><span class="se">\"</span><span class="s">.*%s*</span><span class="se">\"</span><span class="s"> -o %s </span><span class="se">\"</span><span class="s">%s*</span><span class="se">\"</span><span class="s"> </span><span class="se">\\</span><span class="s">) "</span><span class="p">,</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="p">}</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="p">}</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'.'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\</span><span class="s">( %s </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> -o %s </span><span class="se">\"</span><span class="s">.*%s</span><span class="se">\"</span><span class="s"> </span><span class="se">\\</span><span class="s">) "</span><span class="p">,</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="p">}</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'*'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"%s </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> "</span><span class="p">,</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="p">}</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">)</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'.'</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\</span><span class="s">( %s </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> -o %s </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> </span><span class="se">\\</span><span class="s">) "</span><span class="p">,</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">file</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="p">}</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\\</span><span class="s">( %s </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> -o %s </span><span class="se">\"</span><span class="s">.%s</span><span class="se">\"</span><span class="s"> </span><span class="se">\\</span><span class="s">) "</span><span class="p">,</span> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="p">}</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="p">}</span> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="p">}</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-444" name="line-444"></a><span class="p">}</span> +<a id="line-445" name="line-445"></a> +<a id="line-446" name="line-446"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-447" name="line-447"></a><span class="nf">has_additional_constraints</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-448" name="line-448"></a><span class="p">{</span> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-450" name="line-450"></a> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_selected_list</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-452" name="line-452"></a> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_selected_list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_next</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-454" name="line-454"></a> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="n">GSearchConstraint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">constraint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-456" name="line-456"></a> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">:</span> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_NUMERIC</span><span class="p">:</span> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_DATE_BEFORE</span><span class="p">:</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_DATE_AFTER</span><span class="p">:</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">:</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-466" name="line-466"></a><span class="w"> </span><span class="p">}</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="p">}</span> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="p">}</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="p">}</span> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-473" name="line-473"></a><span class="p">}</span> +<a id="line-474" name="line-474"></a> +<a id="line-475" name="line-475"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-476" name="line-476"></a><span class="nf">display_dialog_character_set_conversion_error</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">,</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">,</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="p">)</span> +<a id="line-479" name="line-479"></a><span class="p">{</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-481" name="line-481"></a> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Character set conversion failed for </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">"</span><span class="p">),</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="n">string</span><span class="p">);</span> +<a id="line-488" name="line-488"></a> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">" "</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-491" name="line-491"></a> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-495" name="line-495"></a> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-499" name="line-499"></a> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-501" name="line-501"></a><span class="p">}</span> +<a id="line-502" name="line-502"></a> +<a id="line-503" name="line-503"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-504" name="line-504"></a><span class="nf">start_animation</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">first_pass</span><span class="p">)</span> +<a id="line-505" name="line-505"></a><span class="p">{</span> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">first_pass</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-507" name="line-507"></a> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-509" name="line-509"></a> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="n">title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Searching..."</span><span class="p">),</span><span class="w"> </span><span class="s">" - "</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Search for Files"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">title</span><span class="p">);</span> +<a id="line-512" name="line-512"></a> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="n">gtk_label_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">files_found_label</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_desktop_interface_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"enable-animations"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="n">gtk_spinner_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SPINNER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">progress_spinner</span><span class="p">));</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">progress_spinner</span><span class="p">);</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="p">}</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">title</span><span class="p">);</span> +<a id="line-519" name="line-519"></a> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">focus</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_window_get_focus</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">));</span> +<a id="line-521" name="line-521"></a> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="n">gtk_window_set_default</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">);</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">);</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">);</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_vbox</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_more_options_expander</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_and_folder_table</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="p">}</span> +<a id="line-533" name="line-533"></a><span class="p">}</span> +<a id="line-534" name="line-534"></a> +<a id="line-535" name="line-535"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-536" name="line-536"></a><span class="nf">stop_animation</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-537" name="line-537"></a><span class="p">{</span> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="n">gtk_spinner_stop</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SPINNER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">progress_spinner</span><span class="p">));</span> +<a id="line-539" name="line-539"></a> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="n">gtk_window_set_default</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">);</span> +<a id="line-541" name="line-541"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_more_options_expander</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_and_folder_table</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-544" name="line-544"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-545" name="line-545"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">progress_spinner</span><span class="p">);</span> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">);</span> +<a id="line-547" name="line-547"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">);</span> +<a id="line-548" name="line-548"></a> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_MENU_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_save_results_as_item</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_save_results_as_item</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="p">}</span> +<a id="line-552" name="line-552"></a> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_window_get_focus</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="n">gtk_window_set_focus</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">focus</span><span class="p">);</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="p">}</span> +<a id="line-556" name="line-556"></a><span class="p">}</span> +<a id="line-557" name="line-557"></a> +<a id="line-558" name="line-558"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-559" name="line-559"></a><span class="nf">build_search_command</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">,</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">first_pass</span><span class="p">)</span> +<a id="line-561" name="line-561"></a><span class="p">{</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">command</span><span class="p">;</span> +<a id="line-563" name="line-563"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="p">;</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_is_named_locale</span><span class="p">;</span> +<a id="line-566" name="line-566"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_is_named_escaped</span><span class="p">;</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_is_named_backslashed</span><span class="p">;</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">look_in_folder_locale</span><span class="p">;</span> +<a id="line-569" name="line-569"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">look_in_folder_escaped</span><span class="p">;</span> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">look_in_folder_backslashed</span><span class="p">;</span> +<a id="line-571" name="line-571"></a> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="n">start_animation</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">first_pass</span><span class="p">);</span> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="n">setup_case_insensitive_arguments</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-574" name="line-574"></a> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">((</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_entry_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch_history_entry_get_entry</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">)))));</span> +<a id="line-577" name="line-577"></a> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">file_is_named_utf8</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="o">!*</span><span class="n">file_is_named_utf8</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-579" name="line-579"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_utf8</span><span class="p">);</span> +<a id="line-580" name="line-580"></a><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"*"</span><span class="p">);</span> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="p">}</span> +<a id="line-582" name="line-582"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale</span><span class="p">;</span> +<a id="line-584" name="line-584"></a> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="n">locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_utf8</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-587" name="line-587"></a><span class="w"> </span><span class="n">stop_animation</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="n">display_dialog_character_set_conversion_error</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-589" name="line-589"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_utf8</span><span class="p">);</span> +<a id="line-590" name="line-590"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-591" name="line-591"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="p">}</span> +<a id="line-593" name="line-593"></a><span class="w"> </span><span class="n">gsearch_history_entry_prepend_text</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">),</span><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="p">);</span> +<a id="line-594" name="line-594"></a> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">,</span><span class="w"> </span><span class="s">"*"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">,</span><span class="w"> </span><span class="s">"?"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-596" name="line-596"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">tmp</span><span class="p">;</span> +<a id="line-597" name="line-597"></a> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="p">;</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="s">"*"</span><span class="p">,</span><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="p">,</span><span class="w"> </span><span class="s">"*"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="p">}</span> +<a id="line-602" name="line-602"></a> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="p">}</span> +<a id="line-605" name="line-605"></a> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="n">file_is_named_locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_utf8</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_locale</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="n">stop_animation</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">display_dialog_character_set_conversion_error</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">);</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_utf8</span><span class="p">);</span> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="p">}</span> +<a id="line-614" name="line-614"></a> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="n">look_in_folder_locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_get_filename</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">));</span> +<a id="line-616" name="line-616"></a> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="cm">/* If for some reason a path was not returned fallback to the user's home directory. */</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="n">look_in_folder_locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_home_dir</span><span class="w"> </span><span class="p">());</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_current_folder</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">),</span><span class="w"> </span><span class="n">look_in_folder_locale</span><span class="p">);</span> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="p">}</span> +<a id="line-622" name="line-622"></a> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_str_has_suffix</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">tmp</span><span class="p">;</span> +<a id="line-625" name="line-625"></a> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">look_in_folder_locale</span><span class="p">;</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">look_in_folder_locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="p">}</span> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">look_in_folder_string</span><span class="p">);</span> +<a id="line-631" name="line-631"></a> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="n">look_in_folder_backslashed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">backslash_backslash_characters</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="p">);</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="n">look_in_folder_escaped</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">escape_double_quotes</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_backslashed</span><span class="p">);</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">look_in_folder_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="p">);</span> +<a id="line-635" name="line-635"></a> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_show_hidden_files_enabled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_regex_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_pattern_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-640" name="line-640"></a> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_first_pass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">first_pass</span><span class="p">;</span> +<a id="line-642" name="line-642"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_first_pass</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_using_quick_mode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="p">}</span> +<a id="line-645" name="line-645"></a> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">gtk_widget_get_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="p">(</span><span class="n">has_additional_constraints</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-648" name="line-648"></a> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="n">file_is_named_backslashed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">backslash_backslash_characters</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_locale</span><span class="p">);</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="n">file_is_named_escaped</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">escape_double_quotes</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_backslashed</span><span class="p">);</span> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_pattern_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_utf8</span><span class="p">);</span> +<a id="line-652" name="line-652"></a> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_first_pass</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-654" name="line-654"></a> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locate</span><span class="p">;</span> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="n">CajaSpeedTradeoff</span><span class="w"> </span><span class="n">show_thumbnails_enum</span><span class="p">;</span> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">disable_quick_search</span><span class="p">;</span> +<a id="line-658" name="line-658"></a> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="n">locate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_find_program_in_path</span><span class="w"> </span><span class="p">(</span><span class="s">"locate"</span><span class="p">);</span> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="n">disable_quick_search</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"disable-quick-search"</span><span class="p">);</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_second_pass_enabled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">!</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"disable-quick-search-second-scan"</span><span class="p">);</span> +<a id="line-662" name="line-662"></a> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="cm">/* Use caja settings for thumbnails if caja is installed, else fall back to the caja default */</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_schema_exists</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="n">show_thumbnails_enum</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_enum</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"show-image-thumbnails"</span><span class="p">);</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="n">show_thumbnails_enum</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SPEED_TRADEOFF_LOCAL_ONLY</span><span class="p">;</span> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="p">}</span> +<a id="line-669" name="line-669"></a> +<a id="line-670" name="line-670"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">show_thumbnails_enum</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SPEED_TRADEOFF_ALWAYS</span><span class="w"> </span><span class="o">||</span> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">show_thumbnails_enum</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SPEED_TRADEOFF_LOCAL_ONLY</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-672" name="line-672"></a><span class="hll"><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">value</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'value' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'value' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-673" name="line-673"></a><span class="w"> </span><span class="n">guint64</span><span class="w"> </span><span class="n">size_limit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">10485760</span><span class="p">;</span> +<a id="line-674" name="line-674"></a> +<a id="line-675" name="line-675"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_schema_exists</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_value</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"thumbnail-limit"</span><span class="p">);</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="n">size_limit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_variant_get_uint64</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="p">}</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="p">}</span> +<a id="line-682" name="line-682"></a> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_thumbnails</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-684" name="line-684"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_thumbnails_file_size_limit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">size_limit</span><span class="p">;</span> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="p">}</span> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_thumbnails</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_thumbnails_file_size_limit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="p">}</span> +<a id="line-690" name="line-690"></a> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">disable_quick_search</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_locate_database_available</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">locate</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-694" name="line-694"></a><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">is_quick_search_excluded_path</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-695" name="line-695"></a> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"%s %s </span><span class="se">\"</span><span class="s">%s*%s</span><span class="se">\"</span><span class="s">"</span><span class="p">,</span> +<a id="line-697" name="line-697"></a><span class="w"> </span><span class="n">locate</span><span class="p">,</span> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="n">locate_command_default_options</span><span class="p">,</span> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="n">look_in_folder_escaped</span><span class="p">,</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="n">file_is_named_escaped</span><span class="p">);</span> +<a id="line-701" name="line-701"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_using_quick_mode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="p">}</span> +<a id="line-703" name="line-703"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-704" name="line-704"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"find </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> %s </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> -print"</span><span class="p">,</span> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="n">look_in_folder_escaped</span><span class="p">,</span> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="n">file_is_named_escaped</span><span class="p">);</span> +<a id="line-708" name="line-708"></a><span class="w"> </span><span class="p">}</span> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locate</span><span class="p">);</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="p">}</span> +<a id="line-711" name="line-711"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"find </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> %s </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> -print"</span><span class="p">,</span> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="n">look_in_folder_escaped</span><span class="p">,</span> +<a id="line-714" name="line-714"></a><span class="w"> </span><span class="n">find_command_default_name_argument</span><span class="p">,</span> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="n">file_is_named_escaped</span><span class="p">);</span> +<a id="line-716" name="line-716"></a><span class="w"> </span><span class="p">}</span> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="p">}</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-720" name="line-720"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">disable_mount_argument</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-721" name="line-721"></a> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_regex_matching_enabled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-723" name="line-723"></a><span class="w"> </span><span class="n">file_is_named_backslashed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">backslash_backslash_characters</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_locale</span><span class="p">);</span> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="n">file_is_named_escaped</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">escape_double_quotes</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_backslashed</span><span class="p">);</span> +<a id="line-725" name="line-725"></a> +<a id="line-726" name="line-726"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"find </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> %s"</span><span class="p">,</span> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="n">look_in_folder_escaped</span><span class="p">,</span> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="n">setup_find_name_options</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_escaped</span><span class="p">));</span> +<a id="line-729" name="line-729"></a> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_selected_list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_next</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-731" name="line-731"></a> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="n">GSearchConstraint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">constraint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-733" name="line-733"></a> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-735" name="line-735"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">:</span> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">option</span><span class="p">,</span><span class="w"> </span><span class="s">"EXCLUDE_OTHER_FILESYSTEMS"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="n">disable_mount_argument</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="p">}</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">option</span><span class="p">,</span><span class="w"> </span><span class="s">"SHOW_HIDDEN_FILES"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_show_hidden_files_enabled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="p">}</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"%s "</span><span class="p">,</span> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">option</span><span class="p">);</span> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="p">}</span> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">:</span> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">option</span><span class="p">,</span><span class="w"> </span><span class="s">"-regex '%s'"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-749" name="line-749"></a> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">escaped</span><span class="p">;</span> +<a id="line-751" name="line-751"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">regex</span><span class="p">;</span> +<a id="line-752" name="line-752"></a> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">escaped</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">backslash_special_characters</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="p">);</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="n">regex</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">escape_single_quotes</span><span class="w"> </span><span class="p">(</span><span class="n">escaped</span><span class="p">);</span> +<a id="line-755" name="line-755"></a> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">regex</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_regex_matching_enabled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-758" name="line-758"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_regex_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">regex</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="p">}</span> +<a id="line-760" name="line-760"></a> +<a id="line-761" name="line-761"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">escaped</span><span class="p">);</span> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">regex</span><span class="p">);</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="p">}</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">escaped</span><span class="p">;</span> +<a id="line-766" name="line-766"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">backslashed</span><span class="p">;</span> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale</span><span class="p">;</span> +<a id="line-768" name="line-768"></a> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="n">backslashed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">backslash_special_characters</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="p">);</span> +<a id="line-770" name="line-770"></a><span class="w"> </span><span class="n">escaped</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">escape_single_quotes</span><span class="w"> </span><span class="p">(</span><span class="n">backslashed</span><span class="p">);</span> +<a id="line-771" name="line-771"></a> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="n">locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">escaped</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-773" name="line-773"></a> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">option</span><span class="p">,</span> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="n">locale</span><span class="p">);</span> +<a id="line-778" name="line-778"></a> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="p">}</span> +<a id="line-781" name="line-781"></a> +<a id="line-782" name="line-782"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">escaped</span><span class="p">);</span> +<a id="line-783" name="line-783"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">backslashed</span><span class="p">);</span> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="p">}</span> +<a id="line-786" name="line-786"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_NUMERIC</span><span class="p">:</span> +<a id="line-788" name="line-788"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span> +<a id="line-789" name="line-789"></a><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">option</span><span class="p">,</span> +<a id="line-790" name="line-790"></a><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">number</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">1024</span><span class="p">),</span> +<a id="line-791" name="line-791"></a><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">number</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">1024</span><span class="p">));</span> +<a id="line-792" name="line-792"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-793" name="line-793"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-794" name="line-794"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_DATE_BEFORE</span><span class="p">:</span> +<a id="line-795" name="line-795"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span> +<a id="line-796" name="line-796"></a><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">option</span><span class="p">,</span> +<a id="line-797" name="line-797"></a><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">time</span><span class="p">);</span> +<a id="line-798" name="line-798"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-799" name="line-799"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_DATE_AFTER</span><span class="p">:</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span> +<a id="line-802" name="line-802"></a><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">option</span><span class="p">,</span> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">time</span><span class="p">,</span> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">time</span><span class="p">);</span> +<a id="line-805" name="line-805"></a><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-808" name="line-808"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-809" name="line-809"></a><span class="w"> </span><span class="p">}</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="p">}</span> +<a id="line-811" name="line-811"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_pattern_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"*"</span><span class="p">);</span> +<a id="line-812" name="line-812"></a> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">disable_mount_argument</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"-xdev "</span><span class="p">);</span> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="p">}</span> +<a id="line-816" name="line-816"></a> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="s">"-print "</span><span class="p">);</span> +<a id="line-818" name="line-818"></a><span class="w"> </span><span class="p">}</span> +<a id="line-819" name="line-819"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_locale</span><span class="p">);</span> +<a id="line-820" name="line-820"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_utf8</span><span class="p">);</span> +<a id="line-821" name="line-821"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_backslashed</span><span class="p">);</span> +<a id="line-822" name="line-822"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_escaped</span><span class="p">);</span> +<a id="line-823" name="line-823"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="p">);</span> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_backslashed</span><span class="p">);</span> +<a id="line-825" name="line-825"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_escaped</span><span class="p">);</span> +<a id="line-826" name="line-826"></a> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-828" name="line-828"></a><span class="p">}</span> +<a id="line-829" name="line-829"></a> +<a id="line-830" name="line-830"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-831" name="line-831"></a><span class="nf">add_file_to_search_results</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">store</span><span class="p">,</span> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-835" name="line-835"></a><span class="p">{</span> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">;</span> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="n">GSearchMonitor</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">monitor</span><span class="p">;</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="n">GFileMonitor</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">handle</span><span class="p">;</span> +<a id="line-839" name="line-839"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_info</span><span class="p">;</span> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">g_file</span><span class="p">;</span> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="n">GDateTime</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_dt</span><span class="p">;</span> +<a id="line-843" name="line-843"></a><span class="cp">#if GLIB_CHECK_VERSION(2,61,2)</span> +<a id="line-844" name="line-844"></a><span class="w"> </span><span class="n">gint64</span><span class="w"> </span><span class="n">time_val</span><span class="p">;</span> +<a id="line-845" name="line-845"></a><span class="cp">#else</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="n">GTimeVal</span><span class="w"> </span><span class="n">time_val</span><span class="p">;</span> +<a id="line-847" name="line-847"></a><span class="cp">#endif</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">;</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="n">GtkTreeRowReference</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">reference</span><span class="p">;</span> +<a id="line-850" name="line-850"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">description</span><span class="p">;</span> +<a id="line-851" name="line-851"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">readable_size</span><span class="p">;</span> +<a id="line-852" name="line-852"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">readable_date</span><span class="p">;</span> +<a id="line-853" name="line-853"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_base_name</span><span class="p">;</span> +<a id="line-854" name="line-854"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_relative_dir_name</span><span class="p">;</span> +<a id="line-855" name="line-855"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">base_name</span><span class="p">;</span> +<a id="line-856" name="line-856"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dir_name</span><span class="p">;</span> +<a id="line-857" name="line-857"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">relative_dir_name</span><span class="p">;</span> +<a id="line-858" name="line-858"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">look_in_folder</span><span class="p">;</span> +<a id="line-859" name="line-859"></a> +<a id="line-860" name="line-860"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_hash_table_lookup_extended</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_filename_hash_table</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-861" name="line-861"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-862" name="line-862"></a><span class="w"> </span><span class="p">}</span> +<a id="line-863" name="line-863"></a> +<a id="line-864" name="line-864"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-865" name="line-865"></a><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_SYMLINK</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-866" name="line-866"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-867" name="line-867"></a><span class="w"> </span><span class="p">}</span> +<a id="line-868" name="line-868"></a> +<a id="line-869" name="line-869"></a><span class="w"> </span><span class="n">g_hash_table_insert</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_filename_hash_table</span><span class="p">,</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-870" name="line-870"></a> +<a id="line-871" name="line-871"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-872" name="line-872"></a><span class="w"> </span><span class="n">gtk_tree_view_set_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-873" name="line-873"></a><span class="w"> </span><span class="p">}</span> +<a id="line-874" name="line-874"></a> +<a id="line-875" name="line-875"></a><span class="w"> </span><span class="n">g_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-876" name="line-876"></a><span class="w"> </span><span class="n">file_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_info</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">,</span><span class="w"> </span><span class="s">"standard::*,time::modified,thumbnail::path"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-877" name="line-877"></a> +<a id="line-878" name="line-878"></a><span class="w"> </span><span class="n">pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_file_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">file_info</span><span class="p">);</span> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_file_type_description</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">file_info</span><span class="p">);</span> +<a id="line-880" name="line-880"></a><span class="w"> </span><span class="n">readable_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_get_size</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">));</span> +<a id="line-881" name="line-881"></a> +<a id="line-882" name="line-882"></a><span class="cp">#if GLIB_CHECK_VERSION(2,61,2)</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="n">file_dt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_modification_date_time</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">);</span> +<a id="line-884" name="line-884"></a><span class="w"> </span><span class="n">time_val</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_date_time_to_unix</span><span class="w"> </span><span class="p">(</span><span class="n">file_dt</span><span class="p">);</span> +<a id="line-885" name="line-885"></a><span class="cp">#else</span> +<a id="line-886" name="line-886"></a><span class="w"> </span><span class="n">g_file_info_get_modification_time</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">time_val</span><span class="p">);</span> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="n">file_dt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_date_time_new_from_unix_local</span><span class="w"> </span><span class="p">((</span><span class="n">gint64</span><span class="p">)</span><span class="w"> </span><span class="n">time_val</span><span class="p">.</span><span class="n">tv_sec</span><span class="p">);</span> +<a id="line-888" name="line-888"></a><span class="cp">#endif</span> +<a id="line-889" name="line-889"></a><span class="w"> </span><span class="n">readable_date</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_readable_date</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_date_format</span><span class="p">,</span><span class="w"> </span><span class="n">file_dt</span><span class="p">);</span> +<a id="line-890" name="line-890"></a> +<a id="line-891" name="line-891"></a><span class="w"> </span><span class="n">base_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_path_get_basename</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-892" name="line-892"></a><span class="w"> </span><span class="n">dir_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_path_get_dirname</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-893" name="line-893"></a> +<a id="line-894" name="line-894"></a><span class="w"> </span><span class="n">look_in_folder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">look_in_folder_string</span><span class="p">);</span> +<a id="line-895" name="line-895"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-896" name="line-896"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path_str</span><span class="p">;</span> +<a id="line-897" name="line-897"></a> +<a id="line-898" name="line-898"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_str_has_suffix</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-899" name="line-899"></a><span class="w"> </span><span class="n">look_in_folder</span><span class="p">[</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-900" name="line-900"></a><span class="w"> </span><span class="p">}</span> +<a id="line-901" name="line-901"></a><span class="w"> </span><span class="n">path_str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_path_get_dirname</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder</span><span class="p">);</span> +<a id="line-902" name="line-902"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">path_str</span><span class="p">,</span><span class="w"> </span><span class="n">G_DIR_SEPARATOR_S</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-903" name="line-903"></a><span class="w"> </span><span class="n">relative_dir_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">dir_name</span><span class="p">[</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">path_str</span><span class="p">)],</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-904" name="line-904"></a><span class="w"> </span><span class="p">}</span> +<a id="line-905" name="line-905"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-906" name="line-906"></a><span class="w"> </span><span class="n">relative_dir_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">dir_name</span><span class="p">[</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">path_str</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="p">}</span> +<a id="line-908" name="line-908"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">path_str</span><span class="p">);</span> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="p">}</span> +<a id="line-910" name="line-910"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-911" name="line-911"></a><span class="w"> </span><span class="n">relative_dir_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">dir_name</span><span class="p">);</span> +<a id="line-912" name="line-912"></a><span class="w"> </span><span class="p">}</span> +<a id="line-913" name="line-913"></a> +<a id="line-914" name="line-914"></a><span class="w"> </span><span class="n">utf8_base_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_display_basename</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-915" name="line-915"></a><span class="w"> </span><span class="n">utf8_relative_dir_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_display_name</span><span class="w"> </span><span class="p">(</span><span class="n">relative_dir_name</span><span class="p">);</span> +<a id="line-916" name="line-916"></a> +<a id="line-917" name="line-917"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-918" name="line-918"></a><span class="w"> </span><span class="n">goffset</span><span class="w"> </span><span class="n">file_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_size</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">);</span> +<a id="line-919" name="line-919"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-920" name="line-920"></a><span class="w"> </span><span class="n">COLUMN_ICON</span><span class="p">,</span><span class="w"> </span><span class="n">pixbuf</span><span class="p">,</span> +<a id="line-921" name="line-921"></a><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_base_name</span><span class="p">,</span> +<a id="line-922" name="line-922"></a><span class="w"> </span><span class="n">COLUMN_RELATIVE_PATH</span><span class="p">,</span><span class="w"> </span><span class="n">utf8_relative_dir_name</span><span class="p">,</span> +<a id="line-923" name="line-923"></a><span class="w"> </span><span class="n">COLUMN_LOCALE_FILE</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-924" name="line-924"></a><span class="w"> </span><span class="n">COLUMN_READABLE_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">readable_size</span><span class="p">,</span> +<a id="line-925" name="line-925"></a><span class="w"> </span><span class="n">COLUMN_SIZE</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="n">file_size</span><span class="p">,</span> +<a id="line-926" name="line-926"></a><span class="w"> </span><span class="n">COLUMN_TYPE</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">description</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">description</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_get_content_type</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">)),</span> +<a id="line-927" name="line-927"></a><span class="w"> </span><span class="n">COLUMN_READABLE_DATE</span><span class="p">,</span><span class="w"> </span><span class="n">readable_date</span><span class="p">,</span> +<a id="line-928" name="line-928"></a><span class="cp">#if GLIB_CHECK_VERSION(2,61,2)</span> +<a id="line-929" name="line-929"></a><span class="w"> </span><span class="n">COLUMN_DATE</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="n">time_val</span><span class="p">,</span> +<a id="line-930" name="line-930"></a><span class="cp">#else</span> +<a id="line-931" name="line-931"></a><span class="w"> </span><span class="n">COLUMN_DATE</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="n">time_val</span><span class="p">.</span><span class="n">tv_sec</span><span class="p">,</span> +<a id="line-932" name="line-932"></a><span class="cp">#endif</span> +<a id="line-933" name="line-933"></a><span class="w"> </span><span class="n">COLUMN_NO_FILES_FOUND</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span> +<a id="line-934" name="line-934"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-935" name="line-935"></a> +<a id="line-936" name="line-936"></a><span class="w"> </span><span class="n">monitor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchMonitor</span><span class="p">);</span> +<a id="line-937" name="line-937"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">monitor</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-938" name="line-938"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-939" name="line-939"></a><span class="w"> </span><span class="n">reference</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_row_reference_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-940" name="line-940"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-941" name="line-941"></a> +<a id="line-942" name="line-942"></a><span class="w"> </span><span class="n">handle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_monitor_file</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_MONITOR_NONE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-943" name="line-943"></a> +<a id="line-944" name="line-944"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-945" name="line-945"></a><span class="w"> </span><span class="n">monitor</span><span class="o">-></span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch</span><span class="p">;</span> +<a id="line-946" name="line-946"></a><span class="w"> </span><span class="n">monitor</span><span class="o">-></span><span class="n">reference</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reference</span><span class="p">;</span> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="n">monitor</span><span class="o">-></span><span class="n">handle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">handle</span><span class="p">;</span> +<a id="line-948" name="line-948"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-949" name="line-949"></a><span class="w"> </span><span class="n">COLUMN_MONITOR</span><span class="p">,</span><span class="w"> </span><span class="n">monitor</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-950" name="line-950"></a> +<a id="line-951" name="line-951"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">handle</span><span class="p">,</span><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">file_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">monitor</span><span class="p">);</span> +<a id="line-953" name="line-953"></a><span class="w"> </span><span class="p">}</span> +<a id="line-954" name="line-954"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-955" name="line-955"></a><span class="w"> </span><span class="n">gtk_tree_row_reference_free</span><span class="w"> </span><span class="p">(</span><span class="n">reference</span><span class="p">);</span> +<a id="line-956" name="line-956"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchMonitor</span><span class="p">,</span><span class="w"> </span><span class="n">monitor</span><span class="p">);</span> +<a id="line-957" name="line-957"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-958" name="line-958"></a><span class="w"> </span><span class="p">}</span> +<a id="line-959" name="line-959"></a><span class="w"> </span><span class="p">}</span> +<a id="line-960" name="line-960"></a> +<a id="line-961" name="line-961"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">g_file</span><span class="p">);</span> +<a id="line-962" name="line-962"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">);</span> +<a id="line-963" name="line-963"></a><span class="w"> </span><span class="n">g_date_time_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file_dt</span><span class="p">);</span> +<a id="line-964" name="line-964"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">base_name</span><span class="p">);</span> +<a id="line-965" name="line-965"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir_name</span><span class="p">);</span> +<a id="line-966" name="line-966"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">relative_dir_name</span><span class="p">);</span> +<a id="line-967" name="line-967"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_base_name</span><span class="p">);</span> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_relative_dir_name</span><span class="p">);</span> +<a id="line-969" name="line-969"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder</span><span class="p">);</span> +<a id="line-970" name="line-970"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">description</span><span class="p">);</span> +<a id="line-971" name="line-971"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">readable_size</span><span class="p">);</span> +<a id="line-972" name="line-972"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">readable_date</span><span class="p">);</span> +<a id="line-973" name="line-973"></a><span class="p">}</span> +<a id="line-974" name="line-974"></a> +<a id="line-975" name="line-975"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-976" name="line-976"></a><span class="nf">add_no_files_found_message</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-977" name="line-977"></a><span class="p">{</span> +<a id="line-978" name="line-978"></a><span class="w"> </span><span class="cm">/* When the list is empty append a 'No Files Found.' message. */</span> +<a id="line-979" name="line-979"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-980" name="line-980"></a><span class="w"> </span><span class="n">gtk_tree_view_set_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-981" name="line-981"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_folder_column</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-982" name="line-982"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_size_column</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-983" name="line-983"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_type_column</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-984" name="line-984"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_date_column</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-985" name="line-985"></a><span class="w"> </span><span class="n">gtk_tree_view_columns_autosize</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">));</span> +<a id="line-986" name="line-986"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_name_cell_renderer</span><span class="p">,</span> +<a id="line-987" name="line-987"></a><span class="w"> </span><span class="s">"underline"</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_UNDERLINE_NONE</span><span class="p">,</span> +<a id="line-988" name="line-988"></a><span class="w"> </span><span class="s">"underline-set"</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span> +<a id="line-989" name="line-989"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-990" name="line-990"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_iter</span><span class="p">);</span> +<a id="line-991" name="line-991"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_iter</span><span class="p">,</span> +<a id="line-992" name="line-992"></a><span class="w"> </span><span class="n">COLUMN_ICON</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"No files found"</span><span class="p">),</span> +<a id="line-994" name="line-994"></a><span class="w"> </span><span class="n">COLUMN_RELATIVE_PATH</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span> +<a id="line-995" name="line-995"></a><span class="w"> </span><span class="n">COLUMN_LOCALE_FILE</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span> +<a id="line-996" name="line-996"></a><span class="w"> </span><span class="n">COLUMN_READABLE_SIZE</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span> +<a id="line-997" name="line-997"></a><span class="w"> </span><span class="n">COLUMN_SIZE</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-998" name="line-998"></a><span class="w"> </span><span class="n">COLUMN_TYPE</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span> +<a id="line-999" name="line-999"></a><span class="w"> </span><span class="n">COLUMN_READABLE_DATE</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span> +<a id="line-1000" name="line-1000"></a><span class="w"> </span><span class="n">COLUMN_DATE</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-1001" name="line-1001"></a><span class="w"> </span><span class="n">COLUMN_NO_FILES_FOUND</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-1002" name="line-1002"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1003" name="line-1003"></a><span class="p">}</span> +<a id="line-1004" name="line-1004"></a> +<a id="line-1005" name="line-1005"></a><span class="kt">void</span> +<a id="line-1006" name="line-1006"></a><span class="nf">update_search_counts</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-1007" name="line-1007"></a><span class="p">{</span> +<a id="line-1008" name="line-1008"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">title_bar_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1009" name="line-1009"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">message_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1010" name="line-1010"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">stopped_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1011" name="line-1011"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">tmp</span><span class="p">;</span> +<a id="line-1012" name="line-1012"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">total_files</span><span class="p">;</span> +<a id="line-1013" name="line-1013"></a> +<a id="line-1014" name="line-1014"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">ABORTED</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1015" name="line-1015"></a><span class="w"> </span><span class="n">stopped_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"(stopped)"</span><span class="p">));</span> +<a id="line-1016" name="line-1016"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1017" name="line-1017"></a> +<a id="line-1018" name="line-1018"></a><span class="w"> </span><span class="n">total_files</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_iter_n_children</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1019" name="line-1019"></a> +<a id="line-1020" name="line-1020"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">total_files</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1021" name="line-1021"></a><span class="w"> </span><span class="n">title_bar_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"No Files Found"</span><span class="p">));</span> +<a id="line-1022" name="line-1022"></a><span class="w"> </span><span class="n">message_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"No files found"</span><span class="p">));</span> +<a id="line-1023" name="line-1023"></a><span class="w"> </span><span class="n">add_no_files_found_message</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1024" name="line-1024"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1025" name="line-1025"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1026" name="line-1026"></a><span class="w"> </span><span class="n">title_bar_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">ngettext</span><span class="w"> </span><span class="p">(</span><span class="s">"%'d File Found"</span><span class="p">,</span> +<a id="line-1027" name="line-1027"></a><span class="w"> </span><span class="s">"%'d Files Found"</span><span class="p">,</span> +<a id="line-1028" name="line-1028"></a><span class="w"> </span><span class="n">total_files</span><span class="p">),</span> +<a id="line-1029" name="line-1029"></a><span class="w"> </span><span class="n">total_files</span><span class="p">);</span> +<a id="line-1030" name="line-1030"></a><span class="w"> </span><span class="n">message_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">ngettext</span><span class="w"> </span><span class="p">(</span><span class="s">"%'d file found"</span><span class="p">,</span> +<a id="line-1031" name="line-1031"></a><span class="w"> </span><span class="s">"%'d files found"</span><span class="p">,</span> +<a id="line-1032" name="line-1032"></a><span class="w"> </span><span class="n">total_files</span><span class="p">),</span> +<a id="line-1033" name="line-1033"></a><span class="w"> </span><span class="n">total_files</span><span class="p">);</span> +<a id="line-1034" name="line-1034"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1035" name="line-1035"></a> +<a id="line-1036" name="line-1036"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">stopped_string</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1037" name="line-1037"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">message_string</span><span class="p">;</span> +<a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="n">message_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">message_string</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="n">stopped_string</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1039" name="line-1039"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-1040" name="line-1040"></a> +<a id="line-1041" name="line-1041"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">title_bar_string</span><span class="p">;</span> +<a id="line-1042" name="line-1042"></a><span class="w"> </span><span class="n">title_bar_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">title_bar_string</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="n">stopped_string</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1043" name="line-1043"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-1044" name="line-1044"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1045" name="line-1045"></a> +<a id="line-1046" name="line-1046"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">title_bar_string</span><span class="p">;</span> +<a id="line-1047" name="line-1047"></a><span class="w"> </span><span class="n">title_bar_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">title_bar_string</span><span class="p">,</span><span class="w"> </span><span class="s">" - "</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Search for Files"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1048" name="line-1048"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">title_bar_string</span><span class="p">);</span> +<a id="line-1049" name="line-1049"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-1050" name="line-1050"></a> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="n">gtk_label_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">files_found_label</span><span class="p">),</span><span class="w"> </span><span class="n">message_string</span><span class="p">);</span> +<a id="line-1052" name="line-1052"></a> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">title_bar_string</span><span class="p">);</span> +<a id="line-1054" name="line-1054"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message_string</span><span class="p">);</span> +<a id="line-1055" name="line-1055"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">stopped_string</span><span class="p">);</span> +<a id="line-1056" name="line-1056"></a><span class="p">}</span> +<a id="line-1057" name="line-1057"></a> +<a id="line-1058" name="line-1058"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1059" name="line-1059"></a><span class="nf">intermediate_file_count_update</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-1060" name="line-1060"></a><span class="p">{</span> +<a id="line-1061" name="line-1061"></a><span class="hll"><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'string' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'string' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1062" name="line-1062"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">count</span><span class="p">;</span> +<a id="line-1063" name="line-1063"></a> +<a id="line-1064" name="line-1064"></a><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_iter_n_children</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1065" name="line-1065"></a> +<a id="line-1066" name="line-1066"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1067" name="line-1067"></a> +<a id="line-1068" name="line-1068"></a><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">ngettext</span><span class="w"> </span><span class="p">(</span><span class="s">"%'d file found"</span><span class="p">,</span> +<a id="line-1069" name="line-1069"></a><span class="w"> </span><span class="s">"%'d files found"</span><span class="p">,</span> +<a id="line-1070" name="line-1070"></a><span class="w"> </span><span class="n">count</span><span class="p">),</span> +<a id="line-1071" name="line-1071"></a><span class="w"> </span><span class="n">count</span><span class="p">);</span> +<a id="line-1072" name="line-1072"></a> +<a id="line-1073" name="line-1073"></a><span class="w"> </span><span class="n">gtk_label_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">files_found_label</span><span class="p">),</span><span class="w"> </span><span class="n">string</span><span class="p">);</span> +<a id="line-1074" name="line-1074"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">);</span> +<a id="line-1075" name="line-1075"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1076" name="line-1076"></a><span class="p">}</span> +<a id="line-1077" name="line-1077"></a> +<a id="line-1078" name="line-1078"></a><span class="n">gboolean</span> +<a id="line-1079" name="line-1079"></a><span class="nf">tree_model_iter_free_monitor</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">,</span> +<a id="line-1080" name="line-1080"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">,</span> +<a id="line-1081" name="line-1081"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-1082" name="line-1082"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1083" name="line-1083"></a><span class="p">{</span> +<a id="line-1084" name="line-1084"></a><span class="w"> </span><span class="n">GSearchMonitor</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">monitor</span><span class="p">;</span> +<a id="line-1085" name="line-1085"></a> +<a id="line-1086" name="line-1086"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1087" name="line-1087"></a> +<a id="line-1088" name="line-1088"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_MONITOR</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">monitor</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1089" name="line-1089"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">monitor</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1090" name="line-1090"></a><span class="w"> </span><span class="n">g_file_monitor_cancel</span><span class="w"> </span><span class="p">(</span><span class="n">monitor</span><span class="o">-></span><span class="n">handle</span><span class="p">);</span> +<a id="line-1091" name="line-1091"></a><span class="w"> </span><span class="n">gtk_tree_row_reference_free</span><span class="w"> </span><span class="p">(</span><span class="n">monitor</span><span class="o">-></span><span class="n">reference</span><span class="p">);</span> +<a id="line-1092" name="line-1092"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchMonitor</span><span class="p">,</span><span class="w"> </span><span class="n">monitor</span><span class="p">);</span> +<a id="line-1093" name="line-1093"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1094" name="line-1094"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1095" name="line-1095"></a><span class="p">}</span> +<a id="line-1096" name="line-1096"></a> +<a id="line-1097" name="line-1097"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span> +<a id="line-1098" name="line-1098"></a><span class="nf">gsearch_create_list_of_templates</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-1099" name="line-1099"></a><span class="p">{</span> +<a id="line-1100" name="line-1100"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">store</span><span class="p">;</span> +<a id="line-1101" name="line-1101"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1102" name="line-1102"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-1103" name="line-1103"></a> +<a id="line-1104" name="line-1104"></a><span class="w"> </span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_list_store_new</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">);</span> +<a id="line-1105" name="line-1105"></a> +<a id="line-1106" name="line-1106"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">idx</span><span class="p">].</span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_NONE</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1107" name="line-1107"></a> +<a id="line-1108" name="line-1108"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">idx</span><span class="p">].</span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1109" name="line-1109"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1110" name="line-1110"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">"separator"</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1111" name="line-1111"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1112" name="line-1112"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1113" name="line-1113"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">remove_mnemonic_character</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">idx</span><span class="p">].</span><span class="n">desc</span><span class="p">));</span> +<a id="line-1114" name="line-1114"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1115" name="line-1115"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1116" name="line-1116"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-1117" name="line-1117"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1118" name="line-1118"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1119" name="line-1119"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">);</span> +<a id="line-1120" name="line-1120"></a><span class="p">}</span> +<a id="line-1121" name="line-1121"></a> +<a id="line-1122" name="line-1122"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1123" name="line-1123"></a><span class="nf">set_constraint_info_defaults</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchConstraint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">opt</span><span class="p">)</span> +<a id="line-1124" name="line-1124"></a><span class="p">{</span> +<a id="line-1125" name="line-1125"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1126" name="line-1126"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">:</span> +<a id="line-1127" name="line-1127"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1128" name="line-1128"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">:</span> +<a id="line-1129" name="line-1129"></a><span class="w"> </span><span class="n">opt</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> +<a id="line-1130" name="line-1130"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1131" name="line-1131"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_NUMERIC</span><span class="p">:</span> +<a id="line-1132" name="line-1132"></a><span class="w"> </span><span class="n">opt</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1133" name="line-1133"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1134" name="line-1134"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_DATE_BEFORE</span><span class="p">:</span> +<a id="line-1135" name="line-1135"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_DATE_AFTER</span><span class="p">:</span> +<a id="line-1136" name="line-1136"></a><span class="w"> </span><span class="n">opt</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1137" name="line-1137"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1138" name="line-1138"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1139" name="line-1139"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1140" name="line-1140"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1141" name="line-1141"></a><span class="p">}</span> +<a id="line-1142" name="line-1142"></a> +<a id="line-1143" name="line-1143"></a><span class="kt">void</span> +<a id="line-1144" name="line-1144"></a><span class="nf">update_constraint_info</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchConstraint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">constraint</span><span class="p">,</span> +<a id="line-1145" name="line-1145"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">info</span><span class="p">)</span> +<a id="line-1146" name="line-1146"></a><span class="p">{</span> +<a id="line-1147" name="line-1147"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1148" name="line-1148"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">:</span> +<a id="line-1149" name="line-1149"></a><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">info</span><span class="p">;</span> +<a id="line-1150" name="line-1150"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1151" name="line-1151"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_NUMERIC</span><span class="p">:</span> +<a id="line-1152" name="line-1152"></a><span class="w"> </span><span class="n">sscanf</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="s">"%d"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">number</span><span class="p">);</span> +<a id="line-1153" name="line-1153"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1154" name="line-1154"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_DATE_BEFORE</span><span class="p">:</span> +<a id="line-1155" name="line-1155"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_DATE_AFTER</span><span class="p">:</span> +<a id="line-1156" name="line-1156"></a><span class="w"> </span><span class="n">sscanf</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="s">"%d"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">time</span><span class="p">);</span> +<a id="line-1157" name="line-1157"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1158" name="line-1158"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1159" name="line-1159"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Entry changed called for a non entry option!"</span><span class="p">));</span> +<a id="line-1160" name="line-1160"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1161" name="line-1161"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1162" name="line-1162"></a><span class="p">}</span> +<a id="line-1163" name="line-1163"></a> +<a id="line-1164" name="line-1164"></a><span class="kt">void</span> +<a id="line-1165" name="line-1165"></a><span class="nf">set_constraint_selected_state</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">,</span> +<a id="line-1166" name="line-1166"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">constraint_id</span><span class="p">,</span> +<a id="line-1167" name="line-1167"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">state</span><span class="p">)</span> +<a id="line-1168" name="line-1168"></a><span class="p">{</span> +<a id="line-1169" name="line-1169"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-1170" name="line-1170"></a> +<a id="line-1171" name="line-1171"></a><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">constraint_id</span><span class="p">].</span><span class="n">is_selected</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">state</span><span class="p">;</span> +<a id="line-1172" name="line-1172"></a> +<a id="line-1173" name="line-1173"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">idx</span><span class="p">].</span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_NONE</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1174" name="line-1174"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">idx</span><span class="p">].</span><span class="n">is_selected</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1175" name="line-1175"></a><span class="w"> </span><span class="n">gtk_combo_box_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">),</span><span class="w"> </span><span class="n">idx</span><span class="p">);</span> +<a id="line-1176" name="line-1176"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_add_button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1177" name="line-1177"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1178" name="line-1178"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_label</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1179" name="line-1179"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1180" name="line-1180"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1182" name="line-1182"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_add_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1184" name="line-1184"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1185" name="line-1185"></a><span class="p">}</span> +<a id="line-1186" name="line-1186"></a> +<a id="line-1187" name="line-1187"></a><span class="kt">void</span> +<a id="line-1188" name="line-1188"></a><span class="nf">set_constraint_gsettings_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="w"> </span><span class="n">constraint_id</span><span class="p">,</span> +<a id="line-1189" name="line-1189"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">flag</span><span class="p">)</span> +<a id="line-1190" name="line-1190"></a><span class="p">{</span> +<a id="line-1191" name="line-1191"></a><span class="w"> </span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">select_settings</span><span class="p">;</span> +<a id="line-1192" name="line-1192"></a> +<a id="line-1193" name="line-1193"></a><span class="w"> </span><span class="n">select_settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="s">"org.mate.search-tool.select"</span><span class="p">);</span> +<a id="line-1194" name="line-1194"></a> +<a id="line-1195" name="line-1195"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">constraint_id</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1196" name="line-1196"></a> +<a id="line-1197" name="line-1197"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_CONTAINS_THE_TEXT</span><span class="p">:</span> +<a id="line-1198" name="line-1198"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"contains-the-text"</span><span class="p">,</span> +<a id="line-1199" name="line-1199"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1200" name="line-1200"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1201" name="line-1201"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_DATE_MODIFIED_BEFORE</span><span class="p">:</span> +<a id="line-1202" name="line-1202"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"date-modified-less-than"</span><span class="p">,</span> +<a id="line-1203" name="line-1203"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1204" name="line-1204"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1205" name="line-1205"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_DATE_MODIFIED_AFTER</span><span class="p">:</span> +<a id="line-1206" name="line-1206"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"date-modified-more-than"</span><span class="p">,</span> +<a id="line-1207" name="line-1207"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1208" name="line-1208"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1209" name="line-1209"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_SIZE_IS_MORE_THAN</span><span class="p">:</span> +<a id="line-1210" name="line-1210"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"size-at-least"</span><span class="p">,</span> +<a id="line-1211" name="line-1211"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1212" name="line-1212"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1213" name="line-1213"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_SIZE_IS_LESS_THAN</span><span class="p">:</span> +<a id="line-1214" name="line-1214"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"size-at-most"</span><span class="p">,</span> +<a id="line-1215" name="line-1215"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1216" name="line-1216"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1217" name="line-1217"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_FILE_IS_EMPTY</span><span class="p">:</span> +<a id="line-1218" name="line-1218"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"file-is-empty"</span><span class="p">,</span> +<a id="line-1219" name="line-1219"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1220" name="line-1220"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1221" name="line-1221"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_OWNED_BY_USER</span><span class="p">:</span> +<a id="line-1222" name="line-1222"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"owned-by-user"</span><span class="p">,</span> +<a id="line-1223" name="line-1223"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1224" name="line-1224"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1225" name="line-1225"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_OWNED_BY_GROUP</span><span class="p">:</span> +<a id="line-1226" name="line-1226"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"owned-by-group"</span><span class="p">,</span> +<a id="line-1227" name="line-1227"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1228" name="line-1228"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1229" name="line-1229"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_OWNER_IS_UNRECOGNIZED</span><span class="p">:</span> +<a id="line-1230" name="line-1230"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"owner-is-unrecognized"</span><span class="p">,</span> +<a id="line-1231" name="line-1231"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1232" name="line-1232"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1233" name="line-1233"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_FILE_IS_NOT_NAMED</span><span class="p">:</span> +<a id="line-1234" name="line-1234"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"name-does-not-contain"</span><span class="p">,</span> +<a id="line-1235" name="line-1235"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1236" name="line-1236"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1237" name="line-1237"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_FILE_MATCHES_REGULAR_EXPRESSION</span><span class="p">:</span> +<a id="line-1238" name="line-1238"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"name-matches-regular-expression"</span><span class="p">,</span> +<a id="line-1239" name="line-1239"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1240" name="line-1240"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1241" name="line-1241"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_SHOW_HIDDEN_FILES_AND_FOLDERS</span><span class="p">:</span> +<a id="line-1242" name="line-1242"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"show-hidden-files-and-folders"</span><span class="p">,</span> +<a id="line-1243" name="line-1243"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1244" name="line-1244"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1245" name="line-1245"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_FOLLOW_SYMBOLIC_LINKS</span><span class="p">:</span> +<a id="line-1246" name="line-1246"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"follow-symbolic-links"</span><span class="p">,</span> +<a id="line-1247" name="line-1247"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1248" name="line-1248"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1249" name="line-1249"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_SEARCH_OTHER_FILESYSTEMS</span><span class="p">:</span> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="n">g_settings_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"exclude-other-filesystems"</span><span class="p">,</span> +<a id="line-1251" name="line-1251"></a><span class="w"> </span><span class="n">flag</span><span class="p">);</span> +<a id="line-1252" name="line-1252"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1253" name="line-1253"></a> +<a id="line-1254" name="line-1254"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1255" name="line-1255"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1256" name="line-1256"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1257" name="line-1257"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">select_settings</span><span class="p">);</span> +<a id="line-1258" name="line-1258"></a><span class="p">}</span> +<a id="line-1259" name="line-1259"></a> +<a id="line-1260" name="line-1260"></a><span class="cm">/*</span> +<a id="line-1261" name="line-1261"></a><span class="cm"> * add_atk_namedesc</span> +<a id="line-1262" name="line-1262"></a><span class="cm"> * @widget : The Gtk Widget for which @name and @desc are added.</span> +<a id="line-1263" name="line-1263"></a><span class="cm"> * @name : Accessible Name</span> +<a id="line-1264" name="line-1264"></a><span class="cm"> * @desc : Accessible Description</span> +<a id="line-1265" name="line-1265"></a><span class="cm"> * Description: This function adds accessible name and description to a</span> +<a id="line-1266" name="line-1266"></a><span class="cm"> * Gtk widget.</span> +<a id="line-1267" name="line-1267"></a><span class="cm"> */</span> +<a id="line-1268" name="line-1268"></a> +<a id="line-1269" name="line-1269"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1270" name="line-1270"></a><span class="nf">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-1271" name="line-1271"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">name</span><span class="p">,</span> +<a id="line-1272" name="line-1272"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">desc</span><span class="p">)</span> +<a id="line-1273" name="line-1273"></a><span class="p">{</span> +<a id="line-1274" name="line-1274"></a><span class="w"> </span><span class="n">AtkObject</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">atk_widget</span><span class="p">;</span> +<a id="line-1275" name="line-1275"></a> +<a id="line-1276" name="line-1276"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-1277" name="line-1277"></a> +<a id="line-1278" name="line-1278"></a><span class="w"> </span><span class="n">atk_widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_accessible</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-1279" name="line-1279"></a> +<a id="line-1280" name="line-1280"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1281" name="line-1281"></a><span class="w"> </span><span class="n">atk_object_set_name</span><span class="w"> </span><span class="p">(</span><span class="n">atk_widget</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-1282" name="line-1282"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="w"> </span><span class="o">!=</span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1283" name="line-1283"></a><span class="w"> </span><span class="n">atk_object_set_description</span><span class="w"> </span><span class="p">(</span><span class="n">atk_widget</span><span class="p">,</span><span class="w"> </span><span class="n">desc</span><span class="p">);</span> +<a id="line-1284" name="line-1284"></a><span class="p">}</span> +<a id="line-1285" name="line-1285"></a> +<a id="line-1286" name="line-1286"></a><span class="cm">/*</span> +<a id="line-1287" name="line-1287"></a><span class="cm"> * add_atk_relation</span> +<a id="line-1288" name="line-1288"></a><span class="cm"> * @obj1 : The first widget in the relation @rel_type</span> +<a id="line-1289" name="line-1289"></a><span class="cm"> * @obj2 : The second widget in the relation @rel_type.</span> +<a id="line-1290" name="line-1290"></a><span class="cm"> * @rel_type : Relation type which relates @obj1 and @obj2</span> +<a id="line-1291" name="line-1291"></a><span class="cm"> * Description: This function establishes Atk Relation between two given</span> +<a id="line-1292" name="line-1292"></a><span class="cm"> * objects.</span> +<a id="line-1293" name="line-1293"></a><span class="cm"> */</span> +<a id="line-1294" name="line-1294"></a> +<a id="line-1295" name="line-1295"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1296" name="line-1296"></a><span class="nf">add_atk_relation</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">obj1</span><span class="p">,</span> +<a id="line-1297" name="line-1297"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">obj2</span><span class="p">,</span> +<a id="line-1298" name="line-1298"></a><span class="w"> </span><span class="n">AtkRelationType</span><span class="w"> </span><span class="n">rel_type</span><span class="p">)</span> +<a id="line-1299" name="line-1299"></a><span class="p">{</span> +<a id="line-1300" name="line-1300"></a><span class="w"> </span><span class="n">AtkObject</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">atk_obj1</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">atk_obj2</span><span class="p">;</span> +<a id="line-1301" name="line-1301"></a><span class="w"> </span><span class="n">AtkRelationSet</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">relation_set</span><span class="p">;</span> +<a id="line-1302" name="line-1302"></a><span class="w"> </span><span class="n">AtkRelation</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">relation</span><span class="p">;</span> +<a id="line-1303" name="line-1303"></a> +<a id="line-1304" name="line-1304"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">obj1</span><span class="p">));</span> +<a id="line-1305" name="line-1305"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">obj2</span><span class="p">));</span> +<a id="line-1306" name="line-1306"></a> +<a id="line-1307" name="line-1307"></a><span class="w"> </span><span class="n">atk_obj1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_accessible</span><span class="w"> </span><span class="p">(</span><span class="n">obj1</span><span class="p">);</span> +<a id="line-1308" name="line-1308"></a> +<a id="line-1309" name="line-1309"></a><span class="w"> </span><span class="n">atk_obj2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_accessible</span><span class="w"> </span><span class="p">(</span><span class="n">obj2</span><span class="p">);</span> +<a id="line-1310" name="line-1310"></a> +<a id="line-1311" name="line-1311"></a><span class="w"> </span><span class="n">relation_set</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">atk_object_ref_relation_set</span><span class="w"> </span><span class="p">(</span><span class="n">atk_obj1</span><span class="p">);</span> +<a id="line-1312" name="line-1312"></a><span class="w"> </span><span class="n">relation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">atk_relation_new</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">atk_obj2</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">rel_type</span><span class="p">);</span> +<a id="line-1313" name="line-1313"></a><span class="w"> </span><span class="n">atk_relation_set_add</span><span class="w"> </span><span class="p">(</span><span class="n">relation_set</span><span class="p">,</span><span class="w"> </span><span class="n">relation</span><span class="p">);</span> +<a id="line-1314" name="line-1314"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">relation</span><span class="p">));</span> +<a id="line-1315" name="line-1315"></a> +<a id="line-1316" name="line-1316"></a><span class="p">}</span> +<a id="line-1317" name="line-1317"></a> +<a id="line-1318" name="line-1318"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1319" name="line-1319"></a><span class="nf">gsearch_setup_goption_descriptions</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-1320" name="line-1320"></a><span class="p">{</span> +<a id="line-1321" name="line-1321"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1322" name="line-1322"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">j</span><span class="p">;</span> +<a id="line-1323" name="line-1323"></a> +<a id="line-1324" name="line-1324"></a><span class="w"> </span><span class="n">GSearchGOptionEntries</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">].</span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Set the text of </span><span class="se">\"</span><span class="s">Name contains</span><span class="se">\"</span><span class="s"> search option"</span><span class="p">));</span> +<a id="line-1325" name="line-1325"></a><span class="w"> </span><span class="n">GSearchGOptionEntries</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">].</span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Set the text of </span><span class="se">\"</span><span class="s">Look in folder</span><span class="se">\"</span><span class="s"> search option"</span><span class="p">));</span> +<a id="line-1326" name="line-1326"></a><span class="w"> </span><span class="n">GSearchGOptionEntries</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">].</span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Sort files by one of the following: name, folder, size, type, or date"</span><span class="p">));</span> +<a id="line-1327" name="line-1327"></a><span class="w"> </span><span class="n">GSearchGOptionEntries</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">].</span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Set sort order to descending, the default is ascending"</span><span class="p">));</span> +<a id="line-1328" name="line-1328"></a><span class="w"> </span><span class="n">GSearchGOptionEntries</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">].</span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Automatically start a search"</span><span class="p">));</span> +<a id="line-1329" name="line-1329"></a> +<a id="line-1330" name="line-1330"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">j</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">j</span><span class="p">].</span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_NONE</span><span class="p">;</span><span class="w"> </span><span class="n">j</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1331" name="line-1331"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">j</span><span class="p">].</span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1332" name="line-1332"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">remove_mnemonic_character</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">j</span><span class="p">].</span><span class="n">desc</span><span class="p">));</span> +<a id="line-1333" name="line-1333"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">j</span><span class="p">].</span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1334" name="line-1334"></a><span class="w"> </span><span class="n">GSearchGOptionEntries</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">].</span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Select the </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> search option"</span><span class="p">),</span><span class="w"> </span><span class="n">text</span><span class="p">);</span> +<a id="line-1335" name="line-1335"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1336" name="line-1336"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1337" name="line-1337"></a><span class="w"> </span><span class="n">GSearchGOptionEntries</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">].</span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Select and set the </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> search option"</span><span class="p">),</span><span class="w"> </span><span class="n">text</span><span class="p">);</span> +<a id="line-1338" name="line-1338"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1339" name="line-1339"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-1340" name="line-1340"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1341" name="line-1341"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1342" name="line-1342"></a><span class="p">}</span> +<a id="line-1343" name="line-1343"></a> +<a id="line-1344" name="line-1344"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1345" name="line-1345"></a><span class="nf">handle_goption_args</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-1346" name="line-1346"></a><span class="p">{</span> +<a id="line-1347" name="line-1347"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1348" name="line-1348"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">sort_by</span><span class="p">;</span> +<a id="line-1349" name="line-1349"></a> +<a id="line-1350" name="line-1350"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1351" name="line-1351"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1352" name="line-1352"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch_history_entry_get_entry</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">))),</span> +<a id="line-1353" name="line-1353"></a><span class="w"> </span><span class="n">g_locale_to_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-1354" name="line-1354"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1355" name="line-1355"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1356" name="line-1356"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1357" name="line-1357"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_current_folder</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">),</span> +<a id="line-1358" name="line-1358"></a><span class="w"> </span><span class="n">g_locale_to_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-1359" name="line-1359"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1360" name="line-1360"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">contains</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1361" name="line-1361"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1362" name="line-1362"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_CONTAINS_THE_TEXT</span><span class="p">,</span> +<a id="line-1363" name="line-1363"></a><span class="w"> </span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">contains</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1364" name="line-1364"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1365" name="line-1365"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">mtimeless</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1366" name="line-1366"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1367" name="line-1367"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_DATE_MODIFIED_BEFORE</span><span class="p">,</span> +<a id="line-1368" name="line-1368"></a><span class="w"> </span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">mtimeless</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1369" name="line-1369"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1370" name="line-1370"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">mtimemore</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1371" name="line-1371"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1372" name="line-1372"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_DATE_MODIFIED_AFTER</span><span class="p">,</span> +<a id="line-1373" name="line-1373"></a><span class="w"> </span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">mtimemore</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1374" name="line-1374"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1375" name="line-1375"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sizemore</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1376" name="line-1376"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1377" name="line-1377"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SIZE_IS_MORE_THAN</span><span class="p">,</span> +<a id="line-1378" name="line-1378"></a><span class="w"> </span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sizemore</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1379" name="line-1379"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1380" name="line-1380"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sizeless</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1381" name="line-1381"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1382" name="line-1382"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SIZE_IS_LESS_THAN</span><span class="p">,</span> +<a id="line-1383" name="line-1383"></a><span class="w"> </span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sizeless</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1384" name="line-1384"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1385" name="line-1385"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">empty</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1386" name="line-1386"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1387" name="line-1387"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FILE_IS_EMPTY</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1388" name="line-1388"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1389" name="line-1389"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">user</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1390" name="line-1390"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1391" name="line-1391"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_OWNED_BY_USER</span><span class="p">,</span> +<a id="line-1392" name="line-1392"></a><span class="w"> </span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">user</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1393" name="line-1393"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1394" name="line-1394"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">group</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1395" name="line-1395"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1396" name="line-1396"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_OWNED_BY_GROUP</span><span class="p">,</span> +<a id="line-1397" name="line-1397"></a><span class="w"> </span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">group</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1398" name="line-1398"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1399" name="line-1399"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">nouser</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1400" name="line-1400"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1401" name="line-1401"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_OWNER_IS_UNRECOGNIZED</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1402" name="line-1402"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1403" name="line-1403"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">notnamed</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1404" name="line-1404"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1405" name="line-1405"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FILE_IS_NOT_NAMED</span><span class="p">,</span> +<a id="line-1406" name="line-1406"></a><span class="w"> </span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">notnamed</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1407" name="line-1407"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1408" name="line-1408"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">regex</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1409" name="line-1409"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1410" name="line-1410"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FILE_MATCHES_REGULAR_EXPRESSION</span><span class="p">,</span> +<a id="line-1411" name="line-1411"></a><span class="w"> </span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">regex</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1412" name="line-1412"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1413" name="line-1413"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">hidden</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1414" name="line-1414"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1415" name="line-1415"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SHOW_HIDDEN_FILES_AND_FOLDERS</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1416" name="line-1416"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1417" name="line-1417"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">follow</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1418" name="line-1418"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1419" name="line-1419"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FOLLOW_SYMBOLIC_LINKS</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1420" name="line-1420"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1421" name="line-1421"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">mounts</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1422" name="line-1422"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1423" name="line-1423"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SEARCH_OTHER_FILESYSTEMS</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1424" name="line-1424"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1425" name="line-1425"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sortby</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1426" name="line-1426"></a> +<a id="line-1427" name="line-1427"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1428" name="line-1428"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sortby</span><span class="p">,</span><span class="w"> </span><span class="s">"name"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1429" name="line-1429"></a><span class="w"> </span><span class="n">sort_by</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">;</span> +<a id="line-1430" name="line-1430"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1431" name="line-1431"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sortby</span><span class="p">,</span><span class="w"> </span><span class="s">"folder"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1432" name="line-1432"></a><span class="w"> </span><span class="n">sort_by</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">COLUMN_RELATIVE_PATH</span><span class="p">;</span> +<a id="line-1433" name="line-1433"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1434" name="line-1434"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sortby</span><span class="p">,</span><span class="w"> </span><span class="s">"size"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1435" name="line-1435"></a><span class="w"> </span><span class="n">sort_by</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">COLUMN_SIZE</span><span class="p">;</span> +<a id="line-1436" name="line-1436"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1437" name="line-1437"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sortby</span><span class="p">,</span><span class="w"> </span><span class="s">"type"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1438" name="line-1438"></a><span class="w"> </span><span class="n">sort_by</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">COLUMN_TYPE</span><span class="p">;</span> +<a id="line-1439" name="line-1439"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1440" name="line-1440"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">sortby</span><span class="p">,</span><span class="w"> </span><span class="s">"date"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1441" name="line-1441"></a><span class="w"> </span><span class="n">sort_by</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">COLUMN_DATE</span><span class="p">;</span> +<a id="line-1442" name="line-1442"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1443" name="line-1443"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1444" name="line-1444"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Invalid option passed to sortby command line argument."</span><span class="p">));</span> +<a id="line-1445" name="line-1445"></a><span class="w"> </span><span class="n">sort_by</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">;</span> +<a id="line-1446" name="line-1446"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1447" name="line-1447"></a> +<a id="line-1448" name="line-1448"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">descending</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1449" name="line-1449"></a><span class="w"> </span><span class="n">gtk_tree_sortable_set_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SORTABLE</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="n">sort_by</span><span class="p">,</span> +<a id="line-1450" name="line-1450"></a><span class="w"> </span><span class="n">GTK_SORT_DESCENDING</span><span class="p">);</span> +<a id="line-1451" name="line-1451"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1452" name="line-1452"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1453" name="line-1453"></a><span class="w"> </span><span class="n">gtk_tree_sortable_set_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SORTABLE</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span><span class="w"> </span><span class="n">sort_by</span><span class="p">,</span> +<a id="line-1454" name="line-1454"></a><span class="w"> </span><span class="n">GTK_SORT_ASCENDING</span><span class="p">);</span> +<a id="line-1455" name="line-1455"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1456" name="line-1456"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1457" name="line-1457"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchGOptionArguments</span><span class="p">.</span><span class="n">start</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1458" name="line-1458"></a><span class="w"> </span><span class="n">goption_args_found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1459" name="line-1459"></a><span class="w"> </span><span class="n">click_find_cb</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1460" name="line-1460"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1461" name="line-1461"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">goption_args_found</span><span class="p">;</span> +<a id="line-1462" name="line-1462"></a><span class="p">}</span> +<a id="line-1463" name="line-1463"></a> +<a id="line-1464" name="line-1464"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1465" name="line-1465"></a><span class="nf">handle_search_command_stdout_io</span><span class="w"> </span><span class="p">(</span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">ioc</span><span class="p">,</span> +<a id="line-1466" name="line-1466"></a><span class="w"> </span><span class="n">GIOCondition</span><span class="w"> </span><span class="n">condition</span><span class="p">,</span> +<a id="line-1467" name="line-1467"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1468" name="line-1468"></a><span class="p">{</span> +<a id="line-1469" name="line-1469"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1470" name="line-1470"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1471" name="line-1471"></a> +<a id="line-1472" name="line-1472"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">condition</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1473" name="line-1473"></a> +<a id="line-1474" name="line-1474"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1475" name="line-1475"></a><span class="w"> </span><span class="n">GTimer</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">timer</span><span class="p">;</span> +<a id="line-1476" name="line-1476"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">;</span> +<a id="line-1477" name="line-1477"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">prior_rect</span><span class="p">;</span> +<a id="line-1478" name="line-1478"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">after_rect</span><span class="p">;</span> +<a id="line-1479" name="line-1479"></a><span class="w"> </span><span class="n">gulong</span><span class="w"> </span><span class="n">duration</span><span class="p">;</span> +<a id="line-1480" name="line-1480"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">look_in_folder_string_length</span><span class="p">;</span> +<a id="line-1481" name="line-1481"></a> +<a id="line-1482" name="line-1482"></a><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1483" name="line-1483"></a><span class="w"> </span><span class="n">look_in_folder_string_length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">look_in_folder_string</span><span class="p">);</span> +<a id="line-1484" name="line-1484"></a> +<a id="line-1485" name="line-1485"></a><span class="w"> </span><span class="n">timer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timer_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1486" name="line-1486"></a><span class="w"> </span><span class="n">g_timer_start</span><span class="w"> </span><span class="p">(</span><span class="n">timer</span><span class="p">);</span> +<a id="line-1487" name="line-1487"></a> +<a id="line-1488" name="line-1488"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="o">-></span><span class="n">is_readable</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1489" name="line-1489"></a> +<a id="line-1490" name="line-1490"></a><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">{</span> +<a id="line-1491" name="line-1491"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1492" name="line-1492"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1493" name="line-1493"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">status</span><span class="p">;</span> +<a id="line-1494" name="line-1494"></a> +<a id="line-1495" name="line-1495"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">MAKE_IT_STOP</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1496" name="line-1496"></a><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1497" name="line-1497"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1498" name="line-1498"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1499" name="line-1499"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">RUNNING</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1500" name="line-1500"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1501" name="line-1501"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1502" name="line-1502"></a> +<a id="line-1503" name="line-1503"></a><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">{</span> +<a id="line-1504" name="line-1504"></a><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_read_line_string</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-1505" name="line-1505"></a> +<a id="line-1506" name="line-1506"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_EOF</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1507" name="line-1507"></a><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1508" name="line-1508"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1509" name="line-1509"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_AGAIN</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1510" name="line-1510"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-1511" name="line-1511"></a><span class="w"> </span><span class="n">intermediate_file_count_update</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1512" name="line-1512"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-1513" name="line-1513"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">MAKE_IT_QUIT</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1514" name="line-1514"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1515" name="line-1515"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1516" name="line-1516"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-1517" name="line-1517"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1518" name="line-1518"></a> +<a id="line-1519" name="line-1519"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1520" name="line-1520"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1521" name="line-1521"></a> +<a id="line-1522" name="line-1522"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_AGAIN</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1523" name="line-1523"></a> +<a id="line-1524" name="line-1524"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1525" name="line-1525"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1526" name="line-1526"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1527" name="line-1527"></a> +<a id="line-1528" name="line-1528"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_IO_STATUS_NORMAL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1529" name="line-1529"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1530" name="line-1530"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"handle_search_command_stdout_io(): %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1531" name="line-1531"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-1532" name="line-1532"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1533" name="line-1533"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-1534" name="line-1534"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1535" name="line-1535"></a> +<a id="line-1536" name="line-1536"></a><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_truncate</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="o">-></span><span class="n">len</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1537" name="line-1537"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">len</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1538" name="line-1538"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-1539" name="line-1539"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1540" name="line-1540"></a> +<a id="line-1541" name="line-1541"></a><span class="w"> </span><span class="n">utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_display_name</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">);</span> +<a id="line-1542" name="line-1542"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">utf8</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1543" name="line-1543"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-1544" name="line-1544"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1545" name="line-1545"></a> +<a id="line-1546" name="line-1546"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strncmp</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">look_in_folder_string</span><span class="p">,</span><span class="w"> </span><span class="n">look_in_folder_string_length</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1547" name="line-1547"></a> +<a id="line-1548" name="line-1548"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">look_in_folder_string_length</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1549" name="line-1549"></a> +<a id="line-1550" name="line-1550"></a><span class="w"> </span><span class="n">filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_path_get_basename</span><span class="w"> </span><span class="p">(</span><span class="n">utf8</span><span class="p">);</span> +<a id="line-1551" name="line-1551"></a> +<a id="line-1552" name="line-1552"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">fnmatch</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_pattern_string</span><span class="p">,</span><span class="w"> </span><span class="n">filename</span><span class="p">,</span><span class="w"> </span><span class="n">FNM_NOESCAPE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">FNM_CASEFOLD</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FNM_NOMATCH</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1553" name="line-1553"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_show_hidden_files_enabled</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1554" name="line-1554"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_regex_matching_enabled</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1555" name="line-1555"></a><span class="w"> </span><span class="n">add_file_to_search_results</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_iter</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1556" name="line-1556"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1557" name="line-1557"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">compare_regex</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_regex_string</span><span class="p">,</span><span class="w"> </span><span class="n">filename</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1558" name="line-1558"></a><span class="w"> </span><span class="n">add_file_to_search_results</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_iter</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1559" name="line-1559"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1560" name="line-1560"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1561" name="line-1561"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">is_path_hidden</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="o">||</span> +<a id="line-1562" name="line-1562"></a><span class="w"> </span><span class="n">is_path_hidden</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">look_in_folder_string</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-1563" name="line-1563"></a><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_str_has_suffix</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"~"</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1564" name="line-1564"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_regex_matching_enabled</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1565" name="line-1565"></a><span class="w"> </span><span class="n">add_file_to_search_results</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_iter</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1566" name="line-1566"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1567" name="line-1567"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">compare_regex</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_regex_string</span><span class="p">,</span><span class="w"> </span><span class="n">filename</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1568" name="line-1568"></a><span class="w"> </span><span class="n">add_file_to_search_results</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_iter</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1569" name="line-1569"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1570" name="line-1570"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1571" name="line-1571"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1572" name="line-1572"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1573" name="line-1573"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1574" name="line-1574"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8</span><span class="p">);</span> +<a id="line-1575" name="line-1575"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">);</span> +<a id="line-1576" name="line-1576"></a> +<a id="line-1577" name="line-1577"></a><span class="w"> </span><span class="n">gtk_tree_view_get_visible_rect</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">prior_rect</span><span class="p">);</span> +<a id="line-1578" name="line-1578"></a> +<a id="line-1579" name="line-1579"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prior_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1580" name="line-1580"></a><span class="w"> </span><span class="n">gtk_tree_view_get_visible_rect</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">after_rect</span><span class="p">);</span> +<a id="line-1581" name="line-1581"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">after_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">40</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* limit this hack to the first few pixels */</span> +<a id="line-1582" name="line-1582"></a><span class="w"> </span><span class="n">gtk_tree_view_scroll_to_point</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1583" name="line-1583"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1584" name="line-1584"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1585" name="line-1585"></a> +<a id="line-1586" name="line-1586"></a><span class="w"> </span><span class="n">g_timer_elapsed</span><span class="w"> </span><span class="p">(</span><span class="n">timer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">duration</span><span class="p">);</span> +<a id="line-1587" name="line-1587"></a> +<a id="line-1588" name="line-1588"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">duration</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">MATE_SEARCH_TOOL_REFRESH_DURATION</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1589" name="line-1589"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-1590" name="line-1590"></a><span class="w"> </span><span class="n">intermediate_file_count_update</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1591" name="line-1591"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-1592" name="line-1592"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">MAKE_IT_QUIT</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1593" name="line-1593"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1594" name="line-1594"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1595" name="line-1595"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-1596" name="line-1596"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1597" name="line-1597"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1598" name="line-1598"></a><span class="w"> </span><span class="n">g_timer_reset</span><span class="w"> </span><span class="p">(</span><span class="n">timer</span><span class="p">);</span> +<a id="line-1599" name="line-1599"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1600" name="line-1600"></a> +<a id="line-1601" name="line-1601"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">g_io_channel_get_buffer_condition</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="p">)</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="p">);</span> +<a id="line-1602" name="line-1602"></a> +<a id="line-1603" name="line-1603"></a><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1604" name="line-1604"></a><span class="w"> </span><span class="n">g_timer_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">timer</span><span class="p">);</span> +<a id="line-1605" name="line-1605"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1606" name="line-1606"></a> +<a id="line-1607" name="line-1607"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="n">condition</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1608" name="line-1608"></a> +<a id="line-1609" name="line-1609"></a><span class="w"> </span><span class="n">g_io_channel_shutdown</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1610" name="line-1610"></a> +<a id="line-1611" name="line-1611"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">MAKE_IT_STOP</span><span class="p">)</span> +<a id="line-1612" name="line-1612"></a><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_using_quick_mode</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span> +<a id="line-1613" name="line-1613"></a><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_first_pass</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span> +<a id="line-1614" name="line-1614"></a><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_second_pass_enabled</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span> +<a id="line-1615" name="line-1615"></a><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">is_second_scan_excluded_path</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">look_in_folder_string</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1616" name="line-1616"></a> +<a id="line-1617" name="line-1617"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">command</span><span class="p">;</span> +<a id="line-1618" name="line-1618"></a> +<a id="line-1619" name="line-1619"></a><span class="w"> </span><span class="cm">/* Free these strings now because they are reassign values during the second pass. */</span> +<a id="line-1620" name="line-1620"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_pattern_string</span><span class="p">);</span> +<a id="line-1621" name="line-1621"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_regex_string</span><span class="p">);</span> +<a id="line-1622" name="line-1622"></a> +<a id="line-1623" name="line-1623"></a><span class="w"> </span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">build_search_command</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1624" name="line-1624"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1625" name="line-1625"></a><span class="w"> </span><span class="n">spawn_search_command</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">command</span><span class="p">);</span> +<a id="line-1626" name="line-1626"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">);</span> +<a id="line-1627" name="line-1627"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1628" name="line-1628"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1629" name="line-1629"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1630" name="line-1630"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">MAKE_IT_STOP</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">ABORTED</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">STOPPED</span><span class="p">;</span> +<a id="line-1631" name="line-1631"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_timeout_enabled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1632" name="line-1632"></a><span class="w"> </span><span class="n">g_hash_table_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_pixbuf_hash_table</span><span class="p">);</span> +<a id="line-1633" name="line-1633"></a><span class="w"> </span><span class="n">g_hash_table_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_filename_hash_table</span><span class="p">);</span> +<a id="line-1634" name="line-1634"></a><span class="w"> </span><span class="n">g_timeout_add</span><span class="w"> </span><span class="p">(</span><span class="mi">500</span><span class="p">,</span><span class="w"> </span><span class="n">not_running_timeout_cb</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1635" name="line-1635"></a> +<a id="line-1636" name="line-1636"></a><span class="w"> </span><span class="n">update_search_counts</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1637" name="line-1637"></a><span class="w"> </span><span class="n">stop_animation</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1638" name="line-1638"></a> +<a id="line-1639" name="line-1639"></a><span class="w"> </span><span class="cm">/* Free the gchar fields of search_command structure. */</span> +<a id="line-1640" name="line-1640"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_pattern_string</span><span class="p">);</span> +<a id="line-1641" name="line-1641"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_regex_string</span><span class="p">);</span> +<a id="line-1642" name="line-1642"></a> +<a id="line-1643" name="line-1643"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1644" name="line-1644"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1645" name="line-1645"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1646" name="line-1646"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1647" name="line-1647"></a><span class="p">}</span> +<a id="line-1648" name="line-1648"></a> +<a id="line-1649" name="line-1649"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1650" name="line-1650"></a><span class="nf">handle_search_command_stderr_io</span><span class="w"> </span><span class="p">(</span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">ioc</span><span class="p">,</span> +<a id="line-1651" name="line-1651"></a><span class="w"> </span><span class="n">GIOCondition</span><span class="w"> </span><span class="n">condition</span><span class="p">,</span> +<a id="line-1652" name="line-1652"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1653" name="line-1653"></a><span class="p">{</span> +<a id="line-1654" name="line-1654"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1655" name="line-1655"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error_msgs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1656" name="line-1656"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">truncate_error_msgs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1657" name="line-1657"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1658" name="line-1658"></a> +<a id="line-1659" name="line-1659"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">condition</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1660" name="line-1660"></a> +<a id="line-1661" name="line-1661"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">string</span><span class="p">;</span> +<a id="line-1662" name="line-1662"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1663" name="line-1663"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1664" name="line-1664"></a> +<a id="line-1665" name="line-1665"></a><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1666" name="line-1666"></a> +<a id="line-1667" name="line-1667"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error_msgs</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1668" name="line-1668"></a><span class="w"> </span><span class="n">error_msgs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1669" name="line-1669"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1670" name="line-1670"></a> +<a id="line-1671" name="line-1671"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="o">-></span><span class="n">is_readable</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1672" name="line-1672"></a> +<a id="line-1673" name="line-1673"></a><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">{</span> +<a id="line-1674" name="line-1674"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">status</span><span class="p">;</span> +<a id="line-1675" name="line-1675"></a> +<a id="line-1676" name="line-1676"></a><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">{</span> +<a id="line-1677" name="line-1677"></a><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_read_line_string</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-1678" name="line-1678"></a> +<a id="line-1679" name="line-1679"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_EOF</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1680" name="line-1680"></a><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1681" name="line-1681"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1682" name="line-1682"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_AGAIN</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1683" name="line-1683"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-1684" name="line-1684"></a><span class="w"> </span><span class="n">intermediate_file_count_update</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1685" name="line-1685"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-1686" name="line-1686"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">MAKE_IT_QUIT</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1687" name="line-1687"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1688" name="line-1688"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1689" name="line-1689"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-1690" name="line-1690"></a> +<a id="line-1691" name="line-1691"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1692" name="line-1692"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1693" name="line-1693"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1694" name="line-1694"></a> +<a id="line-1695" name="line-1695"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_AGAIN</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1696" name="line-1696"></a> +<a id="line-1697" name="line-1697"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1698" name="line-1698"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1699" name="line-1699"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1700" name="line-1700"></a> +<a id="line-1701" name="line-1701"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_IO_STATUS_NORMAL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1702" name="line-1702"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1703" name="line-1703"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"handle_search_command_stderr_io(): %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1704" name="line-1704"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-1705" name="line-1705"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1706" name="line-1706"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-1707" name="line-1707"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1708" name="line-1708"></a> +<a id="line-1709" name="line-1709"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">truncate_error_msgs</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1710" name="line-1710"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"ermission denied"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-1711" name="line-1711"></a><span class="w"> </span><span class="p">(</span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"No such file or directory"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-1712" name="line-1712"></a><span class="w"> </span><span class="p">(</span><span class="n">strncmp</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"grep: "</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-1713" name="line-1713"></a><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"find: "</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1714" name="line-1714"></a><span class="w"> </span><span class="n">utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_to_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="o">-></span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1715" name="line-1715"></a><span class="w"> </span><span class="n">error_msgs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">error_msgs</span><span class="p">,</span><span class="w"> </span><span class="n">utf8</span><span class="p">);</span> +<a id="line-1716" name="line-1716"></a><span class="w"> </span><span class="n">truncate_error_msgs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">limit_string_to_x_lines</span><span class="w"> </span><span class="p">(</span><span class="n">error_msgs</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span> +<a id="line-1717" name="line-1717"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1718" name="line-1718"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1719" name="line-1719"></a> +<a id="line-1720" name="line-1720"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">g_io_channel_get_buffer_condition</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="p">)</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="p">);</span> +<a id="line-1721" name="line-1721"></a> +<a id="line-1722" name="line-1722"></a><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1723" name="line-1723"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8</span><span class="p">);</span> +<a id="line-1724" name="line-1724"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1725" name="line-1725"></a> +<a id="line-1726" name="line-1726"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="n">condition</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">broken_pipe</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1727" name="line-1727"></a> +<a id="line-1728" name="line-1728"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error_msgs</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1729" name="line-1729"></a> +<a id="line-1730" name="line-1730"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error_msgs</span><span class="o">-></span><span class="n">len</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1731" name="line-1731"></a> +<a id="line-1732" name="line-1732"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-1733" name="line-1733"></a> +<a id="line-1734" name="line-1734"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">truncate_error_msgs</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1735" name="line-1735"></a><span class="w"> </span><span class="n">error_msgs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">error_msgs</span><span class="p">,</span> +<a id="line-1736" name="line-1736"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"</span><span class="se">\n</span><span class="s">... Too many errors to display ..."</span><span class="p">));</span> +<a id="line-1737" name="line-1737"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1738" name="line-1738"></a> +<a id="line-1739" name="line-1739"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_using_quick_mode</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1740" name="line-1740"></a> +<a id="line-1741" name="line-1741"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">hbox</span><span class="p">;</span> +<a id="line-1742" name="line-1742"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">spacer</span><span class="p">;</span> +<a id="line-1743" name="line-1743"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">expander</span><span class="p">;</span> +<a id="line-1744" name="line-1744"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">label</span><span class="p">;</span> +<a id="line-1745" name="line-1745"></a> +<a id="line-1746" name="line-1746"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-1747" name="line-1747"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-1748" name="line-1748"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-1749" name="line-1749"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-1750" name="line-1750"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The search results may be invalid."</span> +<a id="line-1751" name="line-1751"></a><span class="w"> </span><span class="s">" There were errors while performing this search."</span><span class="p">));</span> +<a id="line-1752" name="line-1752"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">" "</span><span class="p">);</span> +<a id="line-1753" name="line-1753"></a> +<a id="line-1754" name="line-1754"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-1755" name="line-1755"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-1756" name="line-1756"></a> +<a id="line-1757" name="line-1757"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1758" name="line-1758"></a> +<a id="line-1759" name="line-1759"></a><span class="w"> </span><span class="n">spacer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="s">" "</span><span class="p">);</span> +<a id="line-1760" name="line-1760"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">spacer</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1761" name="line-1761"></a> +<a id="line-1762" name="line-1762"></a><span class="w"> </span><span class="n">expander</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_expander_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Show more _details"</span><span class="p">));</span> +<a id="line-1763" name="line-1763"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">expander</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1764" name="line-1764"></a><span class="w"> </span><span class="n">gtk_expander_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EXPANDER</span><span class="w"> </span><span class="p">(</span><span class="n">expander</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1765" name="line-1765"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">expander</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1766" name="line-1766"></a> +<a id="line-1767" name="line-1767"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="n">error_msgs</span><span class="o">-></span><span class="n">str</span><span class="p">);</span> +<a id="line-1768" name="line-1768"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">expander</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">);</span> +<a id="line-1769" name="line-1769"></a> +<a id="line-1770" name="line-1770"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1771" name="line-1771"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">);</span> +<a id="line-1772" name="line-1772"></a> +<a id="line-1773" name="line-1773"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-1774" name="line-1774"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span> +<a id="line-1775" name="line-1775"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1776" name="line-1776"></a> +<a id="line-1777" name="line-1777"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-1778" name="line-1778"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1779" name="line-1779"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_second_pass_enabled</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-1780" name="line-1780"></a><span class="w"> </span><span class="p">(</span><span class="n">is_second_scan_excluded_path</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">look_in_folder_string</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1781" name="line-1781"></a> +<a id="line-1782" name="line-1782"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">button</span><span class="p">;</span> +<a id="line-1783" name="line-1783"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">hbox</span><span class="p">;</span> +<a id="line-1784" name="line-1784"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">spacer</span><span class="p">;</span> +<a id="line-1785" name="line-1785"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">expander</span><span class="p">;</span> +<a id="line-1786" name="line-1786"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">label</span><span class="p">;</span> +<a id="line-1787" name="line-1787"></a> +<a id="line-1788" name="line-1788"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-1789" name="line-1789"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-1790" name="line-1790"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-1791" name="line-1791"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CANCEL</span><span class="p">,</span> +<a id="line-1792" name="line-1792"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The search results may be out of date or invalid."</span> +<a id="line-1793" name="line-1793"></a><span class="w"> </span><span class="s">" Do you want to disable the quick search feature?"</span><span class="p">));</span> +<a id="line-1794" name="line-1794"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-1795" name="line-1795"></a><span class="w"> </span><span class="s">"Please reference the help documentation for instructions "</span> +<a id="line-1796" name="line-1796"></a><span class="w"> </span><span class="s">"on how to configure and enable quick searches."</span><span class="p">);</span> +<a id="line-1797" name="line-1797"></a> +<a id="line-1798" name="line-1798"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-1799" name="line-1799"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-1800" name="line-1800"></a> +<a id="line-1801" name="line-1801"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1802" name="line-1802"></a> +<a id="line-1803" name="line-1803"></a><span class="w"> </span><span class="n">spacer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="s">" "</span><span class="p">);</span> +<a id="line-1804" name="line-1804"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">spacer</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1805" name="line-1805"></a> +<a id="line-1806" name="line-1806"></a><span class="w"> </span><span class="n">expander</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_expander_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Show more _details"</span><span class="p">));</span> +<a id="line-1807" name="line-1807"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">expander</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1808" name="line-1808"></a><span class="w"> </span><span class="n">gtk_expander_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EXPANDER</span><span class="w"> </span><span class="p">(</span><span class="n">expander</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1809" name="line-1809"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">expander</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1810" name="line-1810"></a> +<a id="line-1811" name="line-1811"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="n">error_msgs</span><span class="o">-></span><span class="n">str</span><span class="p">);</span> +<a id="line-1812" name="line-1812"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">expander</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">);</span> +<a id="line-1813" name="line-1813"></a> +<a id="line-1814" name="line-1814"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1815" name="line-1815"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">);</span> +<a id="line-1816" name="line-1816"></a> +<a id="line-1817" name="line-1817"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearchtool_button_new_with_icon</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Disable _Quick Search"</span><span class="p">),</span><span class="w"> </span><span class="s">"gtk-ok"</span><span class="p">);</span> +<a id="line-1818" name="line-1818"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1819" name="line-1819"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">);</span> +<a id="line-1820" name="line-1820"></a> +<a id="line-1821" name="line-1821"></a><span class="w"> </span><span class="n">gtk_dialog_add_action_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-1822" name="line-1822"></a><span class="w"> </span><span class="n">gtk_dialog_set_default_response</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-1823" name="line-1823"></a> +<a id="line-1824" name="line-1824"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-1825" name="line-1825"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">disable_quick_search_cb</span><span class="p">),</span> +<a id="line-1826" name="line-1826"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1827" name="line-1827"></a> +<a id="line-1828" name="line-1828"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-1829" name="line-1829"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1830" name="line-1830"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1831" name="line-1831"></a><span class="w"> </span><span class="n">truncate_error_msgs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1832" name="line-1832"></a><span class="w"> </span><span class="n">g_string_truncate</span><span class="w"> </span><span class="p">(</span><span class="n">error_msgs</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1833" name="line-1833"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1834" name="line-1834"></a><span class="w"> </span><span class="n">g_io_channel_shutdown</span><span class="w"> </span><span class="p">(</span><span class="n">ioc</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1835" name="line-1835"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1836" name="line-1836"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1837" name="line-1837"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1838" name="line-1838"></a><span class="p">}</span> +<a id="line-1839" name="line-1839"></a> +<a id="line-1840" name="line-1840"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1841" name="line-1841"></a><span class="nf">child_command_set_pgid_cb</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1842" name="line-1842"></a><span class="p">{</span> +<a id="line-1843" name="line-1843"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">setpgid</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1844" name="line-1844"></a><span class="w"> </span><span class="n">g_print</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Failed to set process group id of child %d: %s.</span><span class="se">\n</span><span class="s">"</span><span class="p">),</span> +<a id="line-1845" name="line-1845"></a><span class="w"> </span><span class="n">getpid</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">g_strerror</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="p">));</span> +<a id="line-1846" name="line-1846"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1847" name="line-1847"></a><span class="p">}</span> +<a id="line-1848" name="line-1848"></a> +<a id="line-1849" name="line-1849"></a><span class="kt">void</span> +<a id="line-1850" name="line-1850"></a><span class="nf">spawn_search_command</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">,</span> +<a id="line-1851" name="line-1851"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">command</span><span class="p">)</span> +<a id="line-1852" name="line-1852"></a><span class="p">{</span> +<a id="line-1853" name="line-1853"></a><span class="w"> </span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">ioc_stdout</span><span class="p">;</span> +<a id="line-1854" name="line-1854"></a><span class="w"> </span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">ioc_stderr</span><span class="p">;</span> +<a id="line-1855" name="line-1855"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1856" name="line-1856"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">argv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1857" name="line-1857"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">child_stdout</span><span class="p">;</span> +<a id="line-1858" name="line-1858"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">child_stderr</span><span class="p">;</span> +<a id="line-1859" name="line-1859"></a> +<a id="line-1860" name="line-1860"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_shell_parse_argv</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1861" name="line-1861"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-1862" name="line-1862"></a> +<a id="line-1863" name="line-1863"></a><span class="w"> </span><span class="n">stop_animation</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1864" name="line-1864"></a> +<a id="line-1865" name="line-1865"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-1866" name="line-1866"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-1867" name="line-1867"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-1868" name="line-1868"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-1869" name="line-1869"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Error parsing the search command."</span><span class="p">));</span> +<a id="line-1870" name="line-1870"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-1871" name="line-1871"></a><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">" "</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1872" name="line-1872"></a> +<a id="line-1873" name="line-1873"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-1874" name="line-1874"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-1875" name="line-1875"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-1876" name="line-1876"></a> +<a id="line-1877" name="line-1877"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-1878" name="line-1878"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-1879" name="line-1879"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-1880" name="line-1880"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">argv</span><span class="p">);</span> +<a id="line-1881" name="line-1881"></a> +<a id="line-1882" name="line-1882"></a><span class="w"> </span><span class="cm">/* Free the gchar fields of search_command structure. */</span> +<a id="line-1883" name="line-1883"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">look_in_folder_string</span><span class="p">);</span> +<a id="line-1884" name="line-1884"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_pattern_string</span><span class="p">);</span> +<a id="line-1885" name="line-1885"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_regex_string</span><span class="p">);</span> +<a id="line-1886" name="line-1886"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1887" name="line-1887"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1888" name="line-1888"></a> +<a id="line-1889" name="line-1889"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_spawn_async_with_pipes</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_home_dir</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1890" name="line-1890"></a><span class="w"> </span><span class="n">G_SPAWN_SEARCH_PATH</span><span class="p">,</span> +<a id="line-1891" name="line-1891"></a><span class="w"> </span><span class="n">child_command_set_pgid_cb</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_pid</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">child_stdout</span><span class="p">,</span> +<a id="line-1892" name="line-1892"></a><span class="w"> </span><span class="o">&</span><span class="n">child_stderr</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1893" name="line-1893"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-1894" name="line-1894"></a> +<a id="line-1895" name="line-1895"></a><span class="w"> </span><span class="n">stop_animation</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1896" name="line-1896"></a> +<a id="line-1897" name="line-1897"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-1898" name="line-1898"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-1899" name="line-1899"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-1900" name="line-1900"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-1901" name="line-1901"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Error running the search command."</span><span class="p">));</span> +<a id="line-1902" name="line-1902"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-1903" name="line-1903"></a><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">" "</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1904" name="line-1904"></a> +<a id="line-1905" name="line-1905"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-1906" name="line-1906"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-1907" name="line-1907"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">14</span><span class="p">);</span> +<a id="line-1908" name="line-1908"></a> +<a id="line-1909" name="line-1909"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-1910" name="line-1910"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-1911" name="line-1911"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-1912" name="line-1912"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">argv</span><span class="p">);</span> +<a id="line-1913" name="line-1913"></a> +<a id="line-1914" name="line-1914"></a><span class="w"> </span><span class="cm">/* Free the gchar fields of search_command structure. */</span> +<a id="line-1915" name="line-1915"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">look_in_folder_string</span><span class="p">);</span> +<a id="line-1916" name="line-1916"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_pattern_string</span><span class="p">);</span> +<a id="line-1917" name="line-1917"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">name_contains_regex_string</span><span class="p">);</span> +<a id="line-1918" name="line-1918"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1919" name="line-1919"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1920" name="line-1920"></a> +<a id="line-1921" name="line-1921"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">is_command_first_pass</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1922" name="line-1922"></a> +<a id="line-1923" name="line-1923"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="o">-></span><span class="n">command_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">RUNNING</span><span class="p">;</span> +<a id="line-1924" name="line-1924"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_pixbuf_hash_table</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_hash_table_new_full</span><span class="w"> </span><span class="p">(</span><span class="n">g_str_hash</span><span class="p">,</span><span class="w"> </span><span class="n">g_str_equal</span><span class="p">,</span><span class="w"> </span><span class="n">g_free</span><span class="p">,</span><span class="w"> </span><span class="n">g_object_unref</span><span class="p">);</span> +<a id="line-1925" name="line-1925"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_filename_hash_table</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_hash_table_new_full</span><span class="w"> </span><span class="p">(</span><span class="n">g_str_hash</span><span class="p">,</span><span class="w"> </span><span class="n">g_str_equal</span><span class="p">,</span><span class="w"> </span><span class="n">g_free</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1926" name="line-1926"></a> +<a id="line-1927" name="line-1927"></a><span class="w"> </span><span class="cm">/* Get the value of the caja date-format key if available. */</span> +<a id="line-1928" name="line-1928"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_schema_exists</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1929" name="line-1929"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_date_format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_enum</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"date-format"</span><span class="p">);</span> +<a id="line-1930" name="line-1930"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1931" name="line-1931"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_date_format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">CAJA_DATE_FORMAT_LOCALE</span><span class="p">;</span> +<a id="line-1932" name="line-1932"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1933" name="line-1933"></a> +<a id="line-1934" name="line-1934"></a><span class="w"> </span><span class="n">gtk_tree_view_scroll_to_point</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1935" name="line-1935"></a><span class="w"> </span><span class="n">gtk_tree_model_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">),</span> +<a id="line-1936" name="line-1936"></a><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModelForeachFunc</span><span class="p">)</span><span class="w"> </span><span class="n">tree_model_iter_free_monitor</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1937" name="line-1937"></a><span class="w"> </span><span class="n">gtk_list_store_clear</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">));</span> +<a id="line-1938" name="line-1938"></a> +<a id="line-1939" name="line-1939"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_folder_column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1940" name="line-1940"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_size_column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1941" name="line-1941"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_type_column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1942" name="line-1942"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_date_column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1943" name="line-1943"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1944" name="line-1944"></a> +<a id="line-1945" name="line-1945"></a><span class="w"> </span><span class="n">ioc_stdout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_unix_new</span><span class="w"> </span><span class="p">(</span><span class="n">child_stdout</span><span class="p">);</span> +<a id="line-1946" name="line-1946"></a><span class="w"> </span><span class="n">ioc_stderr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_unix_new</span><span class="w"> </span><span class="p">(</span><span class="n">child_stderr</span><span class="p">);</span> +<a id="line-1947" name="line-1947"></a> +<a id="line-1948" name="line-1948"></a><span class="w"> </span><span class="n">g_io_channel_set_encoding</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1949" name="line-1949"></a><span class="w"> </span><span class="n">g_io_channel_set_encoding</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stderr</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1950" name="line-1950"></a> +<a id="line-1951" name="line-1951"></a><span class="w"> </span><span class="n">g_io_channel_set_flags</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_FLAG_NONBLOCK</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1952" name="line-1952"></a><span class="w"> </span><span class="n">g_io_channel_set_flags</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stderr</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_FLAG_NONBLOCK</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1953" name="line-1953"></a> +<a id="line-1954" name="line-1954"></a><span class="w"> </span><span class="n">g_io_add_watch</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_IO_HUP</span><span class="p">,</span> +<a id="line-1955" name="line-1955"></a><span class="w"> </span><span class="n">handle_search_command_stdout_io</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1956" name="line-1956"></a><span class="w"> </span><span class="n">g_io_add_watch</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stderr</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_IO_HUP</span><span class="p">,</span> +<a id="line-1957" name="line-1957"></a><span class="w"> </span><span class="n">handle_search_command_stderr_io</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-1958" name="line-1958"></a> +<a id="line-1959" name="line-1959"></a><span class="w"> </span><span class="n">g_io_channel_unref</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stdout</span><span class="p">);</span> +<a id="line-1960" name="line-1960"></a><span class="w"> </span><span class="n">g_io_channel_unref</span><span class="w"> </span><span class="p">(</span><span class="n">ioc_stderr</span><span class="p">);</span> +<a id="line-1961" name="line-1961"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">argv</span><span class="p">);</span> +<a id="line-1962" name="line-1962"></a><span class="p">}</span> +<a id="line-1963" name="line-1963"></a> +<a id="line-1964" name="line-1964"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-1965" name="line-1965"></a><span class="nf">create_constraint_box</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">,</span> +<a id="line-1966" name="line-1966"></a><span class="w"> </span><span class="n">GSearchConstraint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">opt</span><span class="p">,</span> +<a id="line-1967" name="line-1967"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">value</span><span class="p">)</span> +<a id="line-1968" name="line-1968"></a><span class="p">{</span> +<a id="line-1969" name="line-1969"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">hbox</span><span class="p">;</span> +<a id="line-1970" name="line-1970"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">label</span><span class="p">;</span> +<a id="line-1971" name="line-1971"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">entry</span><span class="p">;</span> +<a id="line-1972" name="line-1972"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">entry_hbox</span><span class="p">;</span> +<a id="line-1973" name="line-1973"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">button</span><span class="p">;</span> +<a id="line-1974" name="line-1974"></a> +<a id="line-1975" name="line-1975"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">12</span><span class="p">);</span> +<a id="line-1976" name="line-1976"></a> +<a id="line-1977" name="line-1977"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1978" name="line-1978"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_BOOLEAN</span><span class="p">:</span> +<a id="line-1979" name="line-1979"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1980" name="line-1980"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">remove_mnemonic_character</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">desc</span><span class="p">);</span> +<a id="line-1981" name="line-1981"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">LEFT_LABEL_SPACING</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">text</span><span class="p">),</span><span class="w"> </span><span class="s">"."</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1982" name="line-1982"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-1983" name="line-1983"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1984" name="line-1984"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-1985" name="line-1985"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-1986" name="line-1986"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1987" name="line-1987"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1988" name="line-1988"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">:</span> +<a id="line-1989" name="line-1989"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_NUMERIC</span><span class="p">:</span> +<a id="line-1990" name="line-1990"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_DATE_BEFORE</span><span class="p">:</span> +<a id="line-1991" name="line-1991"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_TYPE_DATE_AFTER</span><span class="p">:</span> +<a id="line-1992" name="line-1992"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1993" name="line-1993"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">LEFT_LABEL_SPACING</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">desc</span><span class="p">),</span><span class="w"> </span><span class="s">":"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1994" name="line-1994"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-1995" name="line-1995"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-1996" name="line-1996"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1997" name="line-1997"></a> +<a id="line-1998" name="line-1998"></a><span class="w"> </span><span class="cm">/* add description label */</span> +<a id="line-1999" name="line-1999"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2000" name="line-2000"></a> +<a id="line-2001" name="line-2001"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_TEXT</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2002" name="line-2002"></a><span class="w"> </span><span class="n">entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2003" name="line-2003"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2004" name="line-2004"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="n">value</span><span class="p">);</span> +<a id="line-2005" name="line-2005"></a><span class="w"> </span><span class="n">opt</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">value</span><span class="p">;</span> +<a id="line-2006" name="line-2006"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2007" name="line-2007"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2008" name="line-2008"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-2009" name="line-2009"></a><span class="w"> </span><span class="n">entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_spin_button_new_with_range</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">999999999</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-2010" name="line-2010"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2011" name="line-2011"></a><span class="w"> </span><span class="n">gtk_spin_button_set_value</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SPIN_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="n">atoi</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-2012" name="line-2012"></a><span class="w"> </span><span class="n">opt</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">atoi</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-2013" name="line-2013"></a><span class="w"> </span><span class="n">opt</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">atoi</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-2014" name="line-2014"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2015" name="line-2015"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2016" name="line-2016"></a> +<a id="line-2017" name="line-2017"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2018" name="line-2018"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">remove_mnemonic_character</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">desc</span><span class="p">);</span> +<a id="line-2019" name="line-2019"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">name</span><span class="p">;</span> +<a id="line-2020" name="line-2020"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">desc</span><span class="p">;</span> +<a id="line-2021" name="line-2021"></a> +<a id="line-2022" name="line-2022"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">units</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2023" name="line-2023"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">text</span><span class="p">));</span> +<a id="line-2024" name="line-2024"></a><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Enter a text value for the </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> search option."</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">text</span><span class="p">));</span> +<a id="line-2025" name="line-2025"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2026" name="line-2026"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-2027" name="line-2027"></a><span class="w"> </span><span class="cm">/* Translators: Below is a string displaying the search options name</span> +<a id="line-2028" name="line-2028"></a><span class="cm"> and unit value. For example, "\"Date modified less than\" in days". */</span> +<a id="line-2029" name="line-2029"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"</span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> in %s"</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">text</span><span class="p">),</span> +<a id="line-2030" name="line-2030"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">units</span><span class="p">));</span> +<a id="line-2031" name="line-2031"></a><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Enter a value in %s for the </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> search option."</span><span class="p">),</span> +<a id="line-2032" name="line-2032"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">units</span><span class="p">),</span> +<a id="line-2033" name="line-2033"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">text</span><span class="p">));</span> +<a id="line-2034" name="line-2034"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2035" name="line-2035"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">desc</span><span class="p">);</span> +<a id="line-2036" name="line-2036"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-2037" name="line-2037"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-2038" name="line-2038"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-2039" name="line-2039"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2040" name="line-2040"></a> +<a id="line-2041" name="line-2041"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-2042" name="line-2042"></a> +<a id="line-2043" name="line-2043"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span> +<a id="line-2044" name="line-2044"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">constraint_update_info_cb</span><span class="p">),</span> +<a id="line-2045" name="line-2045"></a><span class="w"> </span><span class="n">opt</span><span class="p">);</span> +<a id="line-2046" name="line-2046"></a> +<a id="line-2047" name="line-2047"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-2048" name="line-2048"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">constraint_activate_cb</span><span class="p">),</span> +<a id="line-2049" name="line-2049"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2050" name="line-2050"></a> +<a id="line-2051" name="line-2051"></a><span class="w"> </span><span class="cm">/* add text field */</span> +<a id="line-2052" name="line-2052"></a><span class="w"> </span><span class="n">entry_hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-2053" name="line-2053"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">entry_hbox</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2054" name="line-2054"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">entry_hbox</span><span class="p">),</span><span class="w"> </span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2055" name="line-2055"></a> +<a id="line-2056" name="line-2056"></a><span class="w"> </span><span class="cm">/* add units label */</span> +<a id="line-2057" name="line-2057"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">units</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-2058" name="line-2058"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2059" name="line-2059"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">units</span><span class="p">));</span> +<a id="line-2060" name="line-2060"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">entry_hbox</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2061" name="line-2061"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2062" name="line-2062"></a> +<a id="line-2063" name="line-2063"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2064" name="line-2064"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-2065" name="line-2065"></a><span class="w"> </span><span class="cm">/* This should never happen. If it does, there is a bug */</span> +<a id="line-2066" name="line-2066"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="s">"???"</span><span class="p">);</span> +<a id="line-2067" name="line-2067"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2068" name="line-2068"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2069" name="line-2069"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2070" name="line-2070"></a> +<a id="line-2071" name="line-2071"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-2072" name="line-2072"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-remove"</span><span class="p">,</span> +<a id="line-2073" name="line-2073"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2074" name="line-2074"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2075" name="line-2075"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-2076" name="line-2076"></a> +<a id="line-2077" name="line-2077"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2078" name="line-2078"></a> +<a id="line-2079" name="line-2079"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2080" name="line-2080"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2081" name="line-2081"></a> +<a id="line-2082" name="line-2082"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_append</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2083" name="line-2083"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_append</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">opt</span><span class="p">);</span> +<a id="line-2084" name="line-2084"></a> +<a id="line-2085" name="line-2085"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-2086" name="line-2086"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">remove_constraint_cb</span><span class="p">),</span> +<a id="line-2087" name="line-2087"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> +<a id="line-2088" name="line-2088"></a> +<a id="line-2089" name="line-2089"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2090" name="line-2090"></a><span class="w"> </span><span class="n">gtk_size_group_add_widget</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_button_size_group</span><span class="p">,</span><span class="w"> </span><span class="n">button</span><span class="p">);</span> +<a id="line-2091" name="line-2091"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2092" name="line-2092"></a> +<a id="line-2093" name="line-2093"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2094" name="line-2094"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">remove_mnemonic_character</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">opt</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">].</span><span class="n">desc</span><span class="p">);</span> +<a id="line-2095" name="line-2095"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Remove </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">"</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">text</span><span class="p">));</span> +<a id="line-2096" name="line-2096"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Click to remove the </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> search option."</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">text</span><span class="p">));</span> +<a id="line-2097" name="line-2097"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">),</span><span class="w"> </span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">desc</span><span class="p">);</span> +<a id="line-2098" name="line-2098"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-2099" name="line-2099"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-2100" name="line-2100"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-2101" name="line-2101"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2102" name="line-2102"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">hbox</span><span class="p">;</span> +<a id="line-2103" name="line-2103"></a><span class="p">}</span> +<a id="line-2104" name="line-2104"></a> +<a id="line-2105" name="line-2105"></a><span class="kt">void</span> +<a id="line-2106" name="line-2106"></a><span class="nf">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">,</span> +<a id="line-2107" name="line-2107"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">constraint_id</span><span class="p">,</span> +<a id="line-2108" name="line-2108"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">value</span><span class="p">,</span> +<a id="line-2109" name="line-2109"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">show_constraint</span><span class="p">)</span> +<a id="line-2110" name="line-2110"></a><span class="p">{</span> +<a id="line-2111" name="line-2111"></a><span class="w"> </span><span class="n">GSearchConstraint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">constraint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchConstraint</span><span class="p">);</span> +<a id="line-2112" name="line-2112"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">;</span> +<a id="line-2113" name="line-2113"></a> +<a id="line-2114" name="line-2114"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">show_constraint</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2115" name="line-2115"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2116" name="line-2116"></a><span class="w"> </span><span class="n">gtk_expander_set_expanded</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EXPANDER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_more_options_expander</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2117" name="line-2117"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">);</span> +<a id="line-2118" name="line-2118"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2119" name="line-2119"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2120" name="line-2120"></a> +<a id="line-2121" name="line-2121"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_geometry</span><span class="p">.</span><span class="n">min_height</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">WINDOW_HEIGHT_STEP</span><span class="p">;</span> +<a id="line-2122" name="line-2122"></a> +<a id="line-2123" name="line-2123"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2124" name="line-2124"></a><span class="w"> </span><span class="n">gtk_window_set_geometry_hints</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-2125" name="line-2125"></a><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-2126" name="line-2126"></a><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_geometry</span><span class="p">,</span> +<a id="line-2127" name="line-2127"></a><span class="w"> </span><span class="n">GDK_HINT_MIN_SIZE</span><span class="p">);</span> +<a id="line-2128" name="line-2128"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2129" name="line-2129"></a> +<a id="line-2130" name="line-2130"></a><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">constraint_id</span><span class="p">;</span> +<a id="line-2131" name="line-2131"></a><span class="w"> </span><span class="n">set_constraint_info_defaults</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="p">);</span> +<a id="line-2132" name="line-2132"></a><span class="w"> </span><span class="n">set_constraint_gsettings_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2133" name="line-2133"></a> +<a id="line-2134" name="line-2134"></a><span class="w"> </span><span class="n">widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">create_constraint_box</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">constraint</span><span class="p">,</span><span class="w"> </span><span class="n">value</span><span class="p">);</span> +<a id="line-2135" name="line-2135"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">),</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2136" name="line-2136"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-2137" name="line-2137"></a> +<a id="line-2138" name="line-2138"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_selected_list</span><span class="w"> </span><span class="o">=</span> +<a id="line-2139" name="line-2139"></a><span class="w"> </span><span class="n">g_list_append</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_selected_list</span><span class="p">,</span><span class="w"> </span><span class="n">constraint</span><span class="p">);</span> +<a id="line-2140" name="line-2140"></a> +<a id="line-2141" name="line-2141"></a><span class="w"> </span><span class="n">set_constraint_selected_state</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2142" name="line-2142"></a><span class="p">}</span> +<a id="line-2143" name="line-2143"></a> +<a id="line-2144" name="line-2144"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2145" name="line-2145"></a><span class="nf">set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GtkCellLayout</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">cell_layout</span><span class="p">,</span> +<a id="line-2146" name="line-2146"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">cell</span><span class="p">,</span> +<a id="line-2147" name="line-2147"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">tree_model</span><span class="p">,</span> +<a id="line-2148" name="line-2148"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-2149" name="line-2149"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-2150" name="line-2150"></a><span class="p">{</span> +<a id="line-2151" name="line-2151"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">;</span> +<a id="line-2152" name="line-2152"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-2153" name="line-2153"></a> +<a id="line-2154" name="line-2154"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">tree_model</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-2155" name="line-2155"></a><span class="w"> </span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_path_get_indices</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">)[</span><span class="mi">0</span><span class="p">];</span> +<a id="line-2156" name="line-2156"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-2157" name="line-2157"></a> +<a id="line-2158" name="line-2158"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">cell</span><span class="p">,</span><span class="w"> </span><span class="s">"sensitive"</span><span class="p">,</span><span class="w"> </span><span class="o">!</span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">idx</span><span class="p">].</span><span class="n">is_selected</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2159" name="line-2159"></a><span class="p">}</span> +<a id="line-2160" name="line-2160"></a> +<a id="line-2161" name="line-2161"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-2162" name="line-2162"></a><span class="nf">is_separator</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">,</span> +<a id="line-2163" name="line-2163"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-2164" name="line-2164"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-2165" name="line-2165"></a><span class="p">{</span> +<a id="line-2166" name="line-2166"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">;</span> +<a id="line-2167" name="line-2167"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-2168" name="line-2168"></a> +<a id="line-2169" name="line-2169"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-2170" name="line-2170"></a><span class="w"> </span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_path_get_indices</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">)[</span><span class="mi">0</span><span class="p">];</span> +<a id="line-2171" name="line-2171"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-2172" name="line-2172"></a> +<a id="line-2173" name="line-2173"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchOptionTemplates</span><span class="p">[</span><span class="n">idx</span><span class="p">].</span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_TYPE_SEPARATOR</span><span class="p">);</span> +<a id="line-2174" name="line-2174"></a><span class="p">}</span> +<a id="line-2175" name="line-2175"></a> +<a id="line-2176" name="line-2176"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2177" name="line-2177"></a><span class="nf">create_additional_constraint_section</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-2178" name="line-2178"></a><span class="p">{</span> +<a id="line-2179" name="line-2179"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">renderer</span><span class="p">;</span> +<a id="line-2180" name="line-2180"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-2181" name="line-2181"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">hbox</span><span class="p">;</span> +<a id="line-2182" name="line-2182"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">desc</span><span class="p">;</span> +<a id="line-2183" name="line-2183"></a> +<a id="line-2184" name="line-2184"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-2185" name="line-2185"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">12</span><span class="p">);</span> +<a id="line-2186" name="line-2186"></a> +<a id="line-2187" name="line-2187"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">),</span><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2188" name="line-2188"></a> +<a id="line-2189" name="line-2189"></a><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">LEFT_LABEL_SPACING</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"A_vailable options:"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2190" name="line-2190"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-2191" name="line-2191"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-2192" name="line-2192"></a> +<a id="line-2193" name="line-2193"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2194" name="line-2194"></a> +<a id="line-2195" name="line-2195"></a><span class="w"> </span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch_create_list_of_templates</span><span class="w"> </span><span class="p">();</span> +<a id="line-2196" name="line-2196"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_combo_box_new_with_model</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">);</span> +<a id="line-2197" name="line-2197"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">);</span> +<a id="line-2198" name="line-2198"></a> +<a id="line-2199" name="line-2199"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_label</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">));</span> +<a id="line-2200" name="line-2200"></a><span class="w"> </span><span class="n">gtk_combo_box_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2201" name="line-2201"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2202" name="line-2202"></a> +<a id="line-2203" name="line-2203"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2204" name="line-2204"></a><span class="w"> </span><span class="n">gtk_cell_layout_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CELL_LAYOUT</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">),</span> +<a id="line-2205" name="line-2205"></a><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-2206" name="line-2206"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2207" name="line-2207"></a><span class="w"> </span><span class="n">gtk_cell_layout_set_attributes</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CELL_LAYOUT</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">),</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-2208" name="line-2208"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-2209" name="line-2209"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2210" name="line-2210"></a><span class="w"> </span><span class="n">gtk_cell_layout_set_cell_data_func</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CELL_LAYOUT</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">),</span> +<a id="line-2211" name="line-2211"></a><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-2212" name="line-2212"></a><span class="w"> </span><span class="n">set_sensitive</span><span class="p">,</span> +<a id="line-2213" name="line-2213"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2214" name="line-2214"></a><span class="w"> </span><span class="n">gtk_combo_box_set_row_separator_func</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">),</span> +<a id="line-2215" name="line-2215"></a><span class="w"> </span><span class="n">is_separator</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2216" name="line-2216"></a> +<a id="line-2217" name="line-2217"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2218" name="line-2218"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_combo_box</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Available options"</span><span class="p">),</span> +<a id="line-2219" name="line-2219"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Select a search option from the drop-down list."</span><span class="p">));</span> +<a id="line-2220" name="line-2220"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2221" name="line-2221"></a> +<a id="line-2222" name="line-2222"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_add_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-2223" name="line-2223"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-add"</span><span class="p">,</span> +<a id="line-2224" name="line-2224"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2225" name="line-2225"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2226" name="line-2226"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-2227" name="line-2227"></a> +<a id="line-2228" name="line-2228"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_add_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2229" name="line-2229"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_button_size_group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_size_group_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SIZE_GROUP_BOTH</span><span class="p">);</span> +<a id="line-2230" name="line-2230"></a><span class="w"> </span><span class="n">gtk_size_group_add_widget</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_button_size_group</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_add_button</span><span class="p">);</span> +<a id="line-2231" name="line-2231"></a> +<a id="line-2232" name="line-2232"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_add_button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-2233" name="line-2233"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">add_constraint_cb</span><span class="p">),</span> +<a id="line-2234" name="line-2234"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2235" name="line-2235"></a> +<a id="line-2236" name="line-2236"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2237" name="line-2237"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_add_button</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Add search option"</span><span class="p">),</span> +<a id="line-2238" name="line-2238"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Click to add the selected available search option."</span><span class="p">));</span> +<a id="line-2239" name="line-2239"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2240" name="line-2240"></a> +<a id="line-2241" name="line-2241"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_add_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2242" name="line-2242"></a><span class="p">}</span> +<a id="line-2243" name="line-2243"></a> +<a id="line-2244" name="line-2244"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2245" name="line-2245"></a><span class="nf">filename_cell_data_func</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">column</span><span class="p">,</span> +<a id="line-2246" name="line-2246"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-2247" name="line-2247"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">,</span> +<a id="line-2248" name="line-2248"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-2249" name="line-2249"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-2250" name="line-2250"></a><span class="p">{</span> +<a id="line-2251" name="line-2251"></a><span class="hll"><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">path</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'path' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'path' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-2252" name="line-2252"></a><span class="w"> </span><span class="n">PangoUnderline</span><span class="w"> </span><span class="n">underline</span><span class="p">;</span> +<a id="line-2253" name="line-2253"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">underline_set</span><span class="p">;</span> +<a id="line-2254" name="line-2254"></a> +<a id="line-2255" name="line-2255"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_search_results_single_click_to_activate</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2256" name="line-2256"></a> +<a id="line-2257" name="line-2257"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-2258" name="line-2258"></a> +<a id="line-2259" name="line-2259"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-2260" name="line-2260"></a><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_path_compare</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_hover_path</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2261" name="line-2261"></a><span class="w"> </span><span class="n">underline</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PANGO_UNDERLINE_NONE</span><span class="p">;</span> +<a id="line-2262" name="line-2262"></a><span class="w"> </span><span class="n">underline_set</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2263" name="line-2263"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2264" name="line-2264"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-2265" name="line-2265"></a><span class="w"> </span><span class="n">underline</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PANGO_UNDERLINE_SINGLE</span><span class="p">;</span> +<a id="line-2266" name="line-2266"></a><span class="w"> </span><span class="n">underline_set</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-2267" name="line-2267"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2268" name="line-2268"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-2269" name="line-2269"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2270" name="line-2270"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-2271" name="line-2271"></a><span class="w"> </span><span class="n">underline</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PANGO_UNDERLINE_NONE</span><span class="p">;</span> +<a id="line-2272" name="line-2272"></a><span class="w"> </span><span class="n">underline_set</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2273" name="line-2273"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2274" name="line-2274"></a> +<a id="line-2275" name="line-2275"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_name_cell_renderer</span><span class="p">,</span> +<a id="line-2276" name="line-2276"></a><span class="w"> </span><span class="s">"underline"</span><span class="p">,</span><span class="w"> </span><span class="n">underline</span><span class="p">,</span> +<a id="line-2277" name="line-2277"></a><span class="w"> </span><span class="s">"underline-set"</span><span class="p">,</span><span class="w"> </span><span class="n">underline_set</span><span class="p">,</span> +<a id="line-2278" name="line-2278"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2279" name="line-2279"></a><span class="p">}</span> +<a id="line-2280" name="line-2280"></a> +<a id="line-2281" name="line-2281"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-2282" name="line-2282"></a><span class="nf">gsearch_equal_func</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">model</span><span class="p">,</span> +<a id="line-2283" name="line-2283"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">column</span><span class="p">,</span> +<a id="line-2284" name="line-2284"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">key</span><span class="p">,</span> +<a id="line-2285" name="line-2285"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-2286" name="line-2286"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">search_data</span><span class="p">)</span> +<a id="line-2287" name="line-2287"></a><span class="p">{</span> +<a id="line-2288" name="line-2288"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-2289" name="line-2289"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">name</span><span class="p">;</span> +<a id="line-2290" name="line-2290"></a> +<a id="line-2291" name="line-2291"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-2292" name="line-2292"></a> +<a id="line-2293" name="line-2293"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2294" name="line-2294"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">casefold_key</span><span class="p">;</span> +<a id="line-2295" name="line-2295"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">casefold_name</span><span class="p">;</span> +<a id="line-2296" name="line-2296"></a> +<a id="line-2297" name="line-2297"></a><span class="w"> </span><span class="n">casefold_key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">key</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-2298" name="line-2298"></a><span class="w"> </span><span class="n">casefold_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-2299" name="line-2299"></a> +<a id="line-2300" name="line-2300"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">casefold_key</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-2301" name="line-2301"></a><span class="w"> </span><span class="p">(</span><span class="n">casefold_name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-2302" name="line-2302"></a><span class="w"> </span><span class="p">(</span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">casefold_name</span><span class="p">,</span><span class="w"> </span><span class="n">casefold_key</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2303" name="line-2303"></a><span class="w"> </span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2304" name="line-2304"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2305" name="line-2305"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">casefold_key</span><span class="p">);</span> +<a id="line-2306" name="line-2306"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">casefold_name</span><span class="p">);</span> +<a id="line-2307" name="line-2307"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-2308" name="line-2308"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2309" name="line-2309"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">results</span><span class="p">;</span> +<a id="line-2310" name="line-2310"></a><span class="p">}</span> +<a id="line-2311" name="line-2311"></a> +<a id="line-2312" name="line-2312"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-2313" name="line-2313"></a><span class="nf">create_search_results_section</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-2314" name="line-2314"></a><span class="p">{</span> +<a id="line-2315" name="line-2315"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">label</span><span class="p">;</span> +<a id="line-2316" name="line-2316"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">vbox</span><span class="p">;</span> +<a id="line-2317" name="line-2317"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">hbox</span><span class="p">;</span> +<a id="line-2318" name="line-2318"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">;</span> +<a id="line-2319" name="line-2319"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">column</span><span class="p">;</span> +<a id="line-2320" name="line-2320"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">renderer</span><span class="p">;</span> +<a id="line-2321" name="line-2321"></a> +<a id="line-2322" name="line-2322"></a><span class="w"> </span><span class="n">vbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-2323" name="line-2323"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-2324" name="line-2324"></a> +<a id="line-2325" name="line-2325"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2326" name="line-2326"></a> +<a id="line-2327" name="line-2327"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"S_earch results:"</span><span class="p">));</span> +<a id="line-2328" name="line-2328"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="s">"xalign"</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2329" name="line-2329"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2330" name="line-2330"></a> +<a id="line-2331" name="line-2331"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">progress_spinner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_spinner_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2332" name="line-2332"></a><span class="w"> </span><span class="n">gtk_widget_set_size_request</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">progress_spinner</span><span class="p">,</span> +<a id="line-2333" name="line-2333"></a><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">);</span> +<a id="line-2334" name="line-2334"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">progress_spinner</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2335" name="line-2335"></a> +<a id="line-2336" name="line-2336"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">files_found_label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2337" name="line-2337"></a><span class="w"> </span><span class="n">gtk_label_set_selectable</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">files_found_label</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2338" name="line-2338"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">files_found_label</span><span class="p">),</span><span class="w"> </span><span class="s">"xalign"</span><span class="p">,</span><span class="w"> </span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2339" name="line-2339"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">files_found_label</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2340" name="line-2340"></a> +<a id="line-2341" name="line-2341"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_scrolled_window_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2342" name="line-2342"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_shadow_type</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_SHADOW_IN</span><span class="p">);</span> +<a id="line-2343" name="line-2343"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2344" name="line-2344"></a><span class="w"> </span><span class="n">gtk_widget_set_size_request</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="mi">530</span><span class="p">,</span><span class="w"> </span><span class="mi">160</span><span class="p">);</span> +<a id="line-2345" name="line-2345"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_policy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-2346" name="line-2346"></a><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">,</span> +<a id="line-2347" name="line-2347"></a><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">);</span> +<a id="line-2348" name="line-2348"></a> +<a id="line-2349" name="line-2349"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_list_store_new</span><span class="w"> </span><span class="p">(</span><span class="n">NUM_COLUMNS</span><span class="p">,</span> +<a id="line-2350" name="line-2350"></a><span class="w"> </span><span class="n">GDK_TYPE_PIXBUF</span><span class="p">,</span> +<a id="line-2351" name="line-2351"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span> +<a id="line-2352" name="line-2352"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span> +<a id="line-2353" name="line-2353"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span> +<a id="line-2354" name="line-2354"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span> +<a id="line-2355" name="line-2355"></a><span class="w"> </span><span class="n">G_TYPE_DOUBLE</span><span class="p">,</span> +<a id="line-2356" name="line-2356"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span> +<a id="line-2357" name="line-2357"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span> +<a id="line-2358" name="line-2358"></a><span class="w"> </span><span class="n">G_TYPE_DOUBLE</span><span class="p">,</span> +<a id="line-2359" name="line-2359"></a><span class="w"> </span><span class="n">G_TYPE_POINTER</span><span class="p">,</span> +<a id="line-2360" name="line-2360"></a><span class="w"> </span><span class="n">G_TYPE_BOOLEAN</span><span class="p">);</span> +<a id="line-2361" name="line-2361"></a> +<a id="line-2362" name="line-2362"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_new_with_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">)));</span> +<a id="line-2363" name="line-2363"></a> +<a id="line-2364" name="line-2364"></a><span class="w"> </span><span class="n">gtk_tree_view_set_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2365" name="line-2365"></a><span class="w"> </span><span class="n">gtk_tree_view_set_search_equal_func</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span> +<a id="line-2366" name="line-2366"></a><span class="w"> </span><span class="n">gsearch_equal_func</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2367" name="line-2367"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_list_store</span><span class="p">));</span> +<a id="line-2368" name="line-2368"></a> +<a id="line-2369" name="line-2369"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2370" name="line-2370"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"List View"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2371" name="line-2371"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2372" name="line-2372"></a> +<a id="line-2373" name="line-2373"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">));</span> +<a id="line-2374" name="line-2374"></a> +<a id="line-2375" name="line-2375"></a><span class="w"> </span><span class="n">gtk_tree_selection_set_mode</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SELECTION</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_selection</span><span class="p">),</span> +<a id="line-2376" name="line-2376"></a><span class="w"> </span><span class="n">GTK_SELECTION_MULTIPLE</span><span class="p">);</span> +<a id="line-2377" name="line-2377"></a> +<a id="line-2378" name="line-2378"></a><span class="w"> </span><span class="n">gtk_drag_source_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span> +<a id="line-2379" name="line-2379"></a><span class="w"> </span><span class="n">GDK_BUTTON1_MASK</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_BUTTON2_MASK</span><span class="p">,</span> +<a id="line-2380" name="line-2380"></a><span class="w"> </span><span class="n">GSearchDndTable</span><span class="p">,</span><span class="w"> </span><span class="n">GSearchTotalDnds</span><span class="p">,</span> +<a id="line-2381" name="line-2381"></a><span class="w"> </span><span class="n">GDK_ACTION_COPY</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_ACTION_MOVE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_ACTION_ASK</span><span class="p">);</span> +<a id="line-2382" name="line-2382"></a> +<a id="line-2383" name="line-2383"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span><span class="w"> </span><span class="s">"drag_data_get"</span><span class="p">,</span> +<a id="line-2384" name="line-2384"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">drag_file_cb</span><span class="p">),</span> +<a id="line-2385" name="line-2385"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2386" name="line-2386"></a> +<a id="line-2387" name="line-2387"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span><span class="w"> </span><span class="s">"drag_begin"</span><span class="p">,</span> +<a id="line-2388" name="line-2388"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">drag_begin_file_cb</span><span class="p">),</span> +<a id="line-2389" name="line-2389"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2390" name="line-2390"></a> +<a id="line-2391" name="line-2391"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span><span class="w"> </span><span class="s">"event_after"</span><span class="p">,</span> +<a id="line-2392" name="line-2392"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">file_event_after_cb</span><span class="p">),</span> +<a id="line-2393" name="line-2393"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2394" name="line-2394"></a> +<a id="line-2395" name="line-2395"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span><span class="w"> </span><span class="s">"button_release_event"</span><span class="p">,</span> +<a id="line-2396" name="line-2396"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">file_button_release_event_cb</span><span class="p">),</span> +<a id="line-2397" name="line-2397"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2398" name="line-2398"></a> +<a id="line-2399" name="line-2399"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span><span class="w"> </span><span class="s">"button_press_event"</span><span class="p">,</span> +<a id="line-2400" name="line-2400"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">file_button_press_event_cb</span><span class="p">),</span> +<a id="line-2401" name="line-2401"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">);</span> +<a id="line-2402" name="line-2402"></a> +<a id="line-2403" name="line-2403"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span><span class="w"> </span><span class="s">"key_press_event"</span><span class="p">,</span> +<a id="line-2404" name="line-2404"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">file_key_press_event_cb</span><span class="p">),</span> +<a id="line-2405" name="line-2405"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2406" name="line-2406"></a> +<a id="line-2407" name="line-2407"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span><span class="w"> </span><span class="s">"motion_notify_event"</span><span class="p">,</span> +<a id="line-2408" name="line-2408"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">file_motion_notify_cb</span><span class="p">),</span> +<a id="line-2409" name="line-2409"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2410" name="line-2410"></a> +<a id="line-2411" name="line-2411"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span><span class="w"> </span><span class="s">"leave_notify_event"</span><span class="p">,</span> +<a id="line-2412" name="line-2412"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">file_leave_notify_cb</span><span class="p">),</span> +<a id="line-2413" name="line-2413"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2414" name="line-2414"></a> +<a id="line-2415" name="line-2415"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">));</span> +<a id="line-2416" name="line-2416"></a> +<a id="line-2417" name="line-2417"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">));</span> +<a id="line-2418" name="line-2418"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2419" name="line-2419"></a> +<a id="line-2420" name="line-2420"></a><span class="w"> </span><span class="cm">/* create the name column */</span> +<a id="line-2421" name="line-2421"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2422" name="line-2422"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Name"</span><span class="p">));</span> +<a id="line-2423" name="line-2423"></a> +<a id="line-2424" name="line-2424"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_pixbuf_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2425" name="line-2425"></a><span class="w"> </span><span class="n">gtk_tree_view_column_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2426" name="line-2426"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_attributes</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-2427" name="line-2427"></a><span class="w"> </span><span class="s">"pixbuf"</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_ICON</span><span class="p">,</span> +<a id="line-2428" name="line-2428"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2429" name="line-2429"></a> +<a id="line-2430" name="line-2430"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_name_cell_renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2431" name="line-2431"></a><span class="w"> </span><span class="n">gtk_tree_view_column_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_name_cell_renderer</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2432" name="line-2432"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_attributes</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_name_cell_renderer</span><span class="p">,</span> +<a id="line-2433" name="line-2433"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span> +<a id="line-2434" name="line-2434"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2435" name="line-2435"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_sizing</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TREE_VIEW_COLUMN_AUTOSIZE</span><span class="p">);</span> +<a id="line-2436" name="line-2436"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_resizable</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2437" name="line-2437"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">);</span> +<a id="line-2438" name="line-2438"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_reorderable</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2439" name="line-2439"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_cell_data_func</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-2440" name="line-2440"></a><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeCellDataFunc</span><span class="p">)</span><span class="w"> </span><span class="n">filename_cell_data_func</span><span class="p">,</span> +<a id="line-2441" name="line-2441"></a><span class="w"> </span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2442" name="line-2442"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-2443" name="line-2443"></a> +<a id="line-2444" name="line-2444"></a><span class="w"> </span><span class="cm">/* create the folder column */</span> +<a id="line-2445" name="line-2445"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2446" name="line-2446"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new_with_attributes</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Folder"</span><span class="p">),</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-2447" name="line-2447"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_RELATIVE_PATH</span><span class="p">,</span> +<a id="line-2448" name="line-2448"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2449" name="line-2449"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_sizing</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TREE_VIEW_COLUMN_AUTOSIZE</span><span class="p">);</span> +<a id="line-2450" name="line-2450"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_resizable</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2451" name="line-2451"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_RELATIVE_PATH</span><span class="p">);</span> +<a id="line-2452" name="line-2452"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_reorderable</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2453" name="line-2453"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-2454" name="line-2454"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_folder_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">column</span><span class="p">;</span> +<a id="line-2455" name="line-2455"></a> +<a id="line-2456" name="line-2456"></a><span class="w"> </span><span class="cm">/* create the size column */</span> +<a id="line-2457" name="line-2457"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2458" name="line-2458"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">renderer</span><span class="p">,</span><span class="w"> </span><span class="s">"xalign"</span><span class="p">,</span><span class="w"> </span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2459" name="line-2459"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new_with_attributes</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Size"</span><span class="p">),</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-2460" name="line-2460"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_READABLE_SIZE</span><span class="p">,</span> +<a id="line-2461" name="line-2461"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2462" name="line-2462"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_sizing</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TREE_VIEW_COLUMN_AUTOSIZE</span><span class="p">);</span> +<a id="line-2463" name="line-2463"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_resizable</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2464" name="line-2464"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_SIZE</span><span class="p">);</span> +<a id="line-2465" name="line-2465"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_reorderable</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2466" name="line-2466"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-2467" name="line-2467"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_size_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">column</span><span class="p">;</span> +<a id="line-2468" name="line-2468"></a> +<a id="line-2469" name="line-2469"></a><span class="w"> </span><span class="cm">/* create the type column */</span> +<a id="line-2470" name="line-2470"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2471" name="line-2471"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new_with_attributes</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Type"</span><span class="p">),</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-2472" name="line-2472"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_TYPE</span><span class="p">,</span> +<a id="line-2473" name="line-2473"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2474" name="line-2474"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_sizing</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TREE_VIEW_COLUMN_AUTOSIZE</span><span class="p">);</span> +<a id="line-2475" name="line-2475"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_resizable</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2476" name="line-2476"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_TYPE</span><span class="p">);</span> +<a id="line-2477" name="line-2477"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_reorderable</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2478" name="line-2478"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-2479" name="line-2479"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_type_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">column</span><span class="p">;</span> +<a id="line-2480" name="line-2480"></a> +<a id="line-2481" name="line-2481"></a><span class="w"> </span><span class="cm">/* create the date modified column */</span> +<a id="line-2482" name="line-2482"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2483" name="line-2483"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new_with_attributes</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Date Modified"</span><span class="p">),</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-2484" name="line-2484"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_READABLE_DATE</span><span class="p">,</span> +<a id="line-2485" name="line-2485"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2486" name="line-2486"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_sizing</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TREE_VIEW_COLUMN_AUTOSIZE</span><span class="p">);</span> +<a id="line-2487" name="line-2487"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_resizable</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2488" name="line-2488"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_DATE</span><span class="p">);</span> +<a id="line-2489" name="line-2489"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_reorderable</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2490" name="line-2490"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-2491" name="line-2491"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_date_column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">column</span><span class="p">;</span> +<a id="line-2492" name="line-2492"></a> +<a id="line-2493" name="line-2493"></a><span class="w"> </span><span class="n">gsearchtool_set_columns_order</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">);</span> +<a id="line-2494" name="line-2494"></a> +<a id="line-2495" name="line-2495"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_tree_view</span><span class="p">,</span><span class="w"> </span><span class="s">"columns-changed"</span><span class="p">,</span> +<a id="line-2496" name="line-2496"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">columns_changed_cb</span><span class="p">),</span> +<a id="line-2497" name="line-2497"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2498" name="line-2498"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">vbox</span><span class="p">;</span> +<a id="line-2499" name="line-2499"></a><span class="p">}</span> +<a id="line-2500" name="line-2500"></a> +<a id="line-2501" name="line-2501"></a><span class="kt">void</span> +<a id="line-2502" name="line-2502"></a><span class="nf">set_clone_command</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">,</span> +<a id="line-2503" name="line-2503"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">argcp</span><span class="p">,</span> +<a id="line-2504" name="line-2504"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">***</span><span class="w"> </span><span class="n">argvp</span><span class="p">,</span> +<a id="line-2505" name="line-2505"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">client_data</span><span class="p">,</span> +<a id="line-2506" name="line-2506"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">escape_values</span><span class="p">)</span> +<a id="line-2507" name="line-2507"></a><span class="p">{</span> +<a id="line-2508" name="line-2508"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">argv</span><span class="p">;</span> +<a id="line-2509" name="line-2509"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="p">;</span> +<a id="line-2510" name="line-2510"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">file_is_named_locale</span><span class="p">;</span> +<a id="line-2511" name="line-2511"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">look_in_folder_locale</span><span class="p">;</span> +<a id="line-2512" name="line-2512"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">tmp</span><span class="p">;</span> +<a id="line-2513" name="line-2513"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">list</span><span class="p">;</span> +<a id="line-2514" name="line-2514"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-2515" name="line-2515"></a> +<a id="line-2516" name="line-2516"></a><span class="w"> </span><span class="n">argv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new0</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_MAXIMUM_POSSIBLE</span><span class="p">);</span> +<a id="line-2517" name="line-2517"></a> +<a id="line-2518" name="line-2518"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">client_data</span><span class="p">;</span> +<a id="line-2519" name="line-2519"></a> +<a id="line-2520" name="line-2520"></a><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_entry_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch_history_entry_get_entry</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">))));</span> +<a id="line-2521" name="line-2521"></a><span class="w"> </span><span class="n">file_is_named_locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_utf8</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">file_is_named_utf8</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">""</span><span class="w"> </span><span class="p">,</span> +<a id="line-2522" name="line-2522"></a><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2523" name="line-2523"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">escape_values</span><span class="p">)</span> +<a id="line-2524" name="line-2524"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_locale</span><span class="p">);</span> +<a id="line-2525" name="line-2525"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2526" name="line-2526"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_locale</span><span class="p">);</span> +<a id="line-2527" name="line-2527"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--named=%s"</span><span class="p">,</span><span class="w"> </span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2528" name="line-2528"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2529" name="line-2529"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file_is_named_locale</span><span class="p">);</span> +<a id="line-2530" name="line-2530"></a> +<a id="line-2531" name="line-2531"></a><span class="w"> </span><span class="n">look_in_folder_locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_get_current_folder</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">));</span> +<a id="line-2532" name="line-2532"></a> +<a id="line-2533" name="line-2533"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2534" name="line-2534"></a><span class="w"> </span><span class="n">look_in_folder_locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-2535" name="line-2535"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2536" name="line-2536"></a> +<a id="line-2537" name="line-2537"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">escape_values</span><span class="p">)</span> +<a id="line-2538" name="line-2538"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="p">);</span> +<a id="line-2539" name="line-2539"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2540" name="line-2540"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="p">);</span> +<a id="line-2541" name="line-2541"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--path=%s"</span><span class="p">,</span><span class="w"> </span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2542" name="line-2542"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2543" name="line-2543"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_locale</span><span class="p">);</span> +<a id="line-2544" name="line-2544"></a> +<a id="line-2545" name="line-2545"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2546" name="line-2546"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_selected_list</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_next</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2547" name="line-2547"></a><span class="w"> </span><span class="n">GSearchConstraint</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">constraint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-2548" name="line-2548"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2549" name="line-2549"></a> +<a id="line-2550" name="line-2550"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">constraint_id</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2551" name="line-2551"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_CONTAINS_THE_TEXT</span><span class="p">:</span> +<a id="line-2552" name="line-2552"></a><span class="w"> </span><span class="n">locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2553" name="line-2553"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">escape_values</span><span class="p">)</span> +<a id="line-2554" name="line-2554"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2555" name="line-2555"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2556" name="line-2556"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2557" name="line-2557"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--contains=%s"</span><span class="p">,</span><span class="w"> </span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2558" name="line-2558"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2559" name="line-2559"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2560" name="line-2560"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_DATE_MODIFIED_BEFORE</span><span class="p">:</span> +<a id="line-2561" name="line-2561"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--mtimeless=%d"</span><span class="p">,</span><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">time</span><span class="p">);</span> +<a id="line-2562" name="line-2562"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2563" name="line-2563"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_DATE_MODIFIED_AFTER</span><span class="p">:</span> +<a id="line-2564" name="line-2564"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--mtimemore=%d"</span><span class="p">,</span><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">time</span><span class="p">);</span> +<a id="line-2565" name="line-2565"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2566" name="line-2566"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_SIZE_IS_MORE_THAN</span><span class="p">:</span> +<a id="line-2567" name="line-2567"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--sizemore=%u"</span><span class="p">,</span><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">number</span><span class="p">);</span> +<a id="line-2568" name="line-2568"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2569" name="line-2569"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_SIZE_IS_LESS_THAN</span><span class="p">:</span> +<a id="line-2570" name="line-2570"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--sizeless=%u"</span><span class="p">,</span><span class="w"> </span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">number</span><span class="p">);</span> +<a id="line-2571" name="line-2571"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2572" name="line-2572"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_FILE_IS_EMPTY</span><span class="p">:</span> +<a id="line-2573" name="line-2573"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"--empty"</span><span class="p">);</span> +<a id="line-2574" name="line-2574"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2575" name="line-2575"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_OWNED_BY_USER</span><span class="p">:</span> +<a id="line-2576" name="line-2576"></a><span class="w"> </span><span class="n">locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2577" name="line-2577"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">escape_values</span><span class="p">)</span> +<a id="line-2578" name="line-2578"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2579" name="line-2579"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2580" name="line-2580"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2581" name="line-2581"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--user=%s"</span><span class="p">,</span><span class="w"> </span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2582" name="line-2582"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2583" name="line-2583"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2584" name="line-2584"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_OWNED_BY_GROUP</span><span class="p">:</span> +<a id="line-2585" name="line-2585"></a><span class="w"> </span><span class="n">locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2586" name="line-2586"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">escape_values</span><span class="p">)</span> +<a id="line-2587" name="line-2587"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2588" name="line-2588"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2589" name="line-2589"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2590" name="line-2590"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--group=%s"</span><span class="p">,</span><span class="w"> </span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2591" name="line-2591"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2592" name="line-2592"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2593" name="line-2593"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_OWNER_IS_UNRECOGNIZED</span><span class="p">:</span> +<a id="line-2594" name="line-2594"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"--nouser"</span><span class="p">);</span> +<a id="line-2595" name="line-2595"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2596" name="line-2596"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_FILE_IS_NOT_NAMED</span><span class="p">:</span> +<a id="line-2597" name="line-2597"></a><span class="w"> </span><span class="n">locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2598" name="line-2598"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">escape_values</span><span class="p">)</span> +<a id="line-2599" name="line-2599"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2600" name="line-2600"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2601" name="line-2601"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2602" name="line-2602"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--notnamed=%s"</span><span class="p">,</span><span class="w"> </span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2603" name="line-2603"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2604" name="line-2604"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2605" name="line-2605"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_FILE_MATCHES_REGULAR_EXPRESSION</span><span class="p">:</span> +<a id="line-2606" name="line-2606"></a><span class="w"> </span><span class="n">locale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">constraint</span><span class="o">-></span><span class="n">data</span><span class="p">.</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2607" name="line-2607"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">escape_values</span><span class="p">)</span> +<a id="line-2608" name="line-2608"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2609" name="line-2609"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2610" name="line-2610"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2611" name="line-2611"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"--regex=%s"</span><span class="p">,</span><span class="w"> </span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2612" name="line-2612"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-2613" name="line-2613"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2614" name="line-2614"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_SHOW_HIDDEN_FILES_AND_FOLDERS</span><span class="p">:</span> +<a id="line-2615" name="line-2615"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"--hidden"</span><span class="p">);</span> +<a id="line-2616" name="line-2616"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2617" name="line-2617"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_FOLLOW_SYMBOLIC_LINKS</span><span class="p">:</span> +<a id="line-2618" name="line-2618"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"--follow"</span><span class="p">);</span> +<a id="line-2619" name="line-2619"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2620" name="line-2620"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">SEARCH_CONSTRAINT_SEARCH_OTHER_FILESYSTEMS</span><span class="p">:</span> +<a id="line-2621" name="line-2621"></a><span class="w"> </span><span class="n">argv</span><span class="p">[</span><span class="n">i</span><span class="o">++</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="s">"--mounts"</span><span class="p">);</span> +<a id="line-2622" name="line-2622"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2623" name="line-2623"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-2624" name="line-2624"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2625" name="line-2625"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2626" name="line-2626"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale</span><span class="p">);</span> +<a id="line-2627" name="line-2627"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2628" name="line-2628"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2629" name="line-2629"></a><span class="w"> </span><span class="o">*</span><span class="n">argvp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">argv</span><span class="p">;</span> +<a id="line-2630" name="line-2630"></a><span class="w"> </span><span class="o">*</span><span class="n">argcp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-2631" name="line-2631"></a><span class="p">}</span> +<a id="line-2632" name="line-2632"></a> +<a id="line-2633" name="line-2633"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2634" name="line-2634"></a><span class="nf">handle_gsettings_settings</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-2635" name="line-2635"></a><span class="p">{</span> +<a id="line-2636" name="line-2636"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"show-additional-options"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2637" name="line-2637"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_visible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2638" name="line-2638"></a><span class="w"> </span><span class="n">gtk_expander_set_expanded</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EXPANDER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_more_options_expander</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2639" name="line-2639"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">);</span> +<a id="line-2640" name="line-2640"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2641" name="line-2641"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2642" name="line-2642"></a> +<a id="line-2643" name="line-2643"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"contains-the-text"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2644" name="line-2644"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_CONTAINS_THE_TEXT</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2645" name="line-2645"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2646" name="line-2646"></a> +<a id="line-2647" name="line-2647"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"date-modified-less-than"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2648" name="line-2648"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_DATE_MODIFIED_BEFORE</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2649" name="line-2649"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2650" name="line-2650"></a> +<a id="line-2651" name="line-2651"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"date-modified-more-than"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2652" name="line-2652"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_DATE_MODIFIED_AFTER</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2653" name="line-2653"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2654" name="line-2654"></a> +<a id="line-2655" name="line-2655"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"size-at-least"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2656" name="line-2656"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SIZE_IS_MORE_THAN</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2657" name="line-2657"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2658" name="line-2658"></a> +<a id="line-2659" name="line-2659"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"size-at-most"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2660" name="line-2660"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SIZE_IS_LESS_THAN</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2661" name="line-2661"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2662" name="line-2662"></a> +<a id="line-2663" name="line-2663"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"file-is-empty"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2664" name="line-2664"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FILE_IS_EMPTY</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2665" name="line-2665"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2666" name="line-2666"></a> +<a id="line-2667" name="line-2667"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"owned-by-user"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2668" name="line-2668"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_OWNED_BY_USER</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2669" name="line-2669"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2670" name="line-2670"></a> +<a id="line-2671" name="line-2671"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"owned-by-group"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2672" name="line-2672"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_OWNED_BY_GROUP</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2673" name="line-2673"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2674" name="line-2674"></a> +<a id="line-2675" name="line-2675"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"owner-is-unrecognized"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2676" name="line-2676"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_OWNER_IS_UNRECOGNIZED</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2677" name="line-2677"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2678" name="line-2678"></a> +<a id="line-2679" name="line-2679"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"name-does-not-contain"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2680" name="line-2680"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FILE_IS_NOT_NAMED</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2681" name="line-2681"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2682" name="line-2682"></a> +<a id="line-2683" name="line-2683"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"name-matches-regular-expression"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2684" name="line-2684"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FILE_MATCHES_REGULAR_EXPRESSION</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2685" name="line-2685"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2686" name="line-2686"></a> +<a id="line-2687" name="line-2687"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"show-hidden-files-and-folders"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2688" name="line-2688"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SHOW_HIDDEN_FILES_AND_FOLDERS</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2689" name="line-2689"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2690" name="line-2690"></a> +<a id="line-2691" name="line-2691"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"follow-symbolic-links"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2692" name="line-2692"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_FOLLOW_SYMBOLIC_LINKS</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2693" name="line-2693"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2694" name="line-2694"></a> +<a id="line-2695" name="line-2695"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"exclude-other-filesystems"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2696" name="line-2696"></a><span class="w"> </span><span class="n">add_constraint</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_CONSTRAINT_SEARCH_OTHER_FILESYSTEMS</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2697" name="line-2697"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2698" name="line-2698"></a><span class="p">}</span> +<a id="line-2699" name="line-2699"></a> +<a id="line-2700" name="line-2700"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2701" name="line-2701"></a><span class="nf">gsearch_window_size_allocate</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">widget</span><span class="p">,</span> +<a id="line-2702" name="line-2702"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">allocation</span><span class="p">,</span> +<a id="line-2703" name="line-2703"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-2704" name="line-2704"></a><span class="p">{</span> +<a id="line-2705" name="line-2705"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_maximized</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2706" name="line-2706"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="o">-></span><span class="n">width</span><span class="p">;</span> +<a id="line-2707" name="line-2707"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="o">-></span><span class="n">height</span><span class="p">;</span> +<a id="line-2708" name="line-2708"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2709" name="line-2709"></a><span class="p">}</span> +<a id="line-2710" name="line-2710"></a> +<a id="line-2711" name="line-2711"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-2712" name="line-2712"></a><span class="nf">gsearch_app_create</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-2713" name="line-2713"></a><span class="p">{</span> +<a id="line-2714" name="line-2714"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">locale_string</span><span class="p">;</span> +<a id="line-2715" name="line-2715"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">utf8_string</span><span class="p">;</span> +<a id="line-2716" name="line-2716"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">hbox</span><span class="p">;</span> +<a id="line-2717" name="line-2717"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">vbox</span><span class="p">;</span> +<a id="line-2718" name="line-2718"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">entry</span><span class="p">;</span> +<a id="line-2719" name="line-2719"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">label</span><span class="p">;</span> +<a id="line-2720" name="line-2720"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">button</span><span class="p">;</span> +<a id="line-2721" name="line-2721"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">container</span><span class="p">;</span> +<a id="line-2722" name="line-2722"></a> +<a id="line-2723" name="line-2723"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="s">"org.mate.search-tool"</span><span class="p">);</span> +<a id="line-2724" name="line-2724"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_select_settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="s">"org.mate.search-tool.select"</span><span class="p">);</span> +<a id="line-2725" name="line-2725"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_desktop_interface_settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="s">"org.mate.interface"</span><span class="p">);</span> +<a id="line-2726" name="line-2726"></a> +<a id="line-2727" name="line-2727"></a><span class="w"> </span><span class="cm">/* Check if caja schema is installed before trying to read caja settings */</span> +<a id="line-2728" name="line-2728"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_schema_exists</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2729" name="line-2729"></a><span class="w"> </span><span class="n">GSettingsSchema</span><span class="w"> </span><span class="o">*</span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_schema_source_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_schema_source_get_default</span><span class="w"> </span><span class="p">(),</span> +<a id="line-2730" name="line-2730"></a><span class="w"> </span><span class="n">CAJA_PREFERENCES_SCHEMA</span><span class="p">,</span> +<a id="line-2731" name="line-2731"></a><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2732" name="line-2732"></a> +<a id="line-2733" name="line-2733"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">schema</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2734" name="line-2734"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_schema_exists</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-2735" name="line-2735"></a><span class="w"> </span><span class="n">g_settings_schema_unref</span><span class="w"> </span><span class="p">(</span><span class="n">schema</span><span class="p">);</span> +<a id="line-2736" name="line-2736"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2737" name="line-2737"></a> +<a id="line-2738" name="line-2738"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_schema_exists</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2739" name="line-2739"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="n">CAJA_PREFERENCES_SCHEMA</span><span class="p">);</span> +<a id="line-2740" name="line-2740"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-2741" name="line-2741"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2742" name="line-2742"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2743" name="line-2743"></a> +<a id="line-2744" name="line-2744"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_window_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW_TOPLEVEL</span><span class="p">);</span> +<a id="line-2745" name="line-2745"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_maximized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"default-window-maximized"</span><span class="p">);</span> +<a id="line-2746" name="line-2746"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"size-allocate"</span><span class="p">,</span> +<a id="line-2747" name="line-2747"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch_window_size_allocate</span><span class="p">),</span> +<a id="line-2748" name="line-2748"></a><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2749" name="line-2749"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">command_details</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchCommandDetails</span><span class="p">);</span> +<a id="line-2750" name="line-2750"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_geometry</span><span class="p">.</span><span class="n">min_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MINIMUM_WINDOW_HEIGHT</span><span class="p">;</span> +<a id="line-2751" name="line-2751"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_geometry</span><span class="p">.</span><span class="n">min_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MINIMUM_WINDOW_WIDTH</span><span class="p">;</span> +<a id="line-2752" name="line-2752"></a> +<a id="line-2753" name="line-2753"></a><span class="w"> </span><span class="n">gtk_window_set_position</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIN_POS_CENTER</span><span class="p">);</span> +<a id="line-2754" name="line-2754"></a><span class="w"> </span><span class="n">gtk_window_set_geometry_hints</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-2755" name="line-2755"></a><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_geometry</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_HINT_MIN_SIZE</span><span class="p">);</span> +<a id="line-2756" name="line-2756"></a> +<a id="line-2757" name="line-2757"></a><span class="w"> </span><span class="n">gsearchtool_get_stored_window_geometry</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_width</span><span class="p">,</span> +<a id="line-2758" name="line-2758"></a><span class="w"> </span><span class="o">&</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_height</span><span class="p">);</span> +<a id="line-2759" name="line-2759"></a><span class="w"> </span><span class="n">gtk_window_set_default_size</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-2760" name="line-2760"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_width</span><span class="p">,</span> +<a id="line-2761" name="line-2761"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window_height</span><span class="p">);</span> +<a id="line-2762" name="line-2762"></a> +<a id="line-2763" name="line-2763"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_maximized</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2764" name="line-2764"></a><span class="w"> </span><span class="n">gtk_window_maximize</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">));</span> +<a id="line-2765" name="line-2765"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2766" name="line-2766"></a> +<a id="line-2767" name="line-2767"></a><span class="w"> </span><span class="n">container</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-2768" name="line-2768"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">container</span><span class="p">);</span> +<a id="line-2769" name="line-2769"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">container</span><span class="p">),</span><span class="w"> </span><span class="mi">12</span><span class="p">);</span> +<a id="line-2770" name="line-2770"></a> +<a id="line-2771" name="line-2771"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-2772" name="line-2772"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">container</span><span class="p">),</span><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2773" name="line-2773"></a> +<a id="line-2774" name="line-2774"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_and_folder_table</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_grid_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2775" name="line-2775"></a><span class="w"> </span><span class="n">gtk_grid_set_row_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_and_folder_table</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-2776" name="line-2776"></a><span class="w"> </span><span class="n">gtk_grid_set_column_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_and_folder_table</span><span class="p">),</span><span class="w"> </span><span class="mi">12</span><span class="p">);</span> +<a id="line-2777" name="line-2777"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_and_folder_table</span><span class="p">);</span> +<a id="line-2778" name="line-2778"></a> +<a id="line-2779" name="line-2779"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Name contains:"</span><span class="p">));</span> +<a id="line-2780" name="line-2780"></a><span class="w"> </span><span class="n">gtk_label_set_justify</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_JUSTIFY_LEFT</span><span class="p">);</span> +<a id="line-2781" name="line-2781"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="s">"xalign"</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2782" name="line-2782"></a> +<a id="line-2783" name="line-2783"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_and_folder_table</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-2784" name="line-2784"></a> +<a id="line-2785" name="line-2785"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch_history_entry_new</span><span class="w"> </span><span class="p">(</span><span class="s">"gsearchtool-file-entry"</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2786" name="line-2786"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">);</span> +<a id="line-2787" name="line-2787"></a><span class="w"> </span><span class="n">gsearch_history_entry_set_history_length</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">),</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span> +<a id="line-2788" name="line-2788"></a><span class="w"> </span><span class="n">gtk_widget_set_hexpand</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2789" name="line-2789"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_and_folder_table</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-2790" name="line-2790"></a><span class="w"> </span><span class="n">entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch_history_entry_get_entry</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">));</span> +<a id="line-2791" name="line-2791"></a> +<a id="line-2792" name="line-2792"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_ACCESSIBLE</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_accessible</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2793" name="line-2793"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-2794" name="line-2794"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Enter a filename or partial filename with or without wildcards."</span><span class="p">));</span> +<a id="line-2795" name="line-2795"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Name contains"</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Enter a filename or partial filename with or without wildcards."</span><span class="p">));</span> +<a id="line-2796" name="line-2796"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2797" name="line-2797"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch_history_entry_get_entry</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">)),</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-2798" name="line-2798"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">name_contains_activate_cb</span><span class="p">),</span> +<a id="line-2799" name="line-2799"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2800" name="line-2800"></a> +<a id="line-2801" name="line-2801"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Look in folder:"</span><span class="p">));</span> +<a id="line-2802" name="line-2802"></a><span class="w"> </span><span class="n">gtk_label_set_justify</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_JUSTIFY_LEFT</span><span class="p">);</span> +<a id="line-2803" name="line-2803"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="s">"xalign"</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2804" name="line-2804"></a> +<a id="line-2805" name="line-2805"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_and_folder_table</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-2806" name="line-2806"></a> +<a id="line-2807" name="line-2807"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_button_new</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Browse"</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</span><span class="p">);</span> +<a id="line-2808" name="line-2808"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">));</span> +<a id="line-2809" name="line-2809"></a><span class="w"> </span><span class="n">gtk_widget_set_hexpand</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2810" name="line-2810"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_and_folder_table</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-2811" name="line-2811"></a> +<a id="line-2812" name="line-2812"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">,</span><span class="w"> </span><span class="s">"current-folder-changed"</span><span class="p">,</span> +<a id="line-2813" name="line-2813"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">look_in_folder_changed_cb</span><span class="p">),</span> +<a id="line-2814" name="line-2814"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2815" name="line-2815"></a> +<a id="line-2816" name="line-2816"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2817" name="line-2817"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Look in folder"</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Select the folder or device from which you want to begin the search."</span><span class="p">));</span> +<a id="line-2818" name="line-2818"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2819" name="line-2819"></a> +<a id="line-2820" name="line-2820"></a><span class="w"> </span><span class="n">locale_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">mate_search_tool_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"look-in-folder"</span><span class="p">);</span> +<a id="line-2821" name="line-2821"></a> +<a id="line-2822" name="line-2822"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">locale_string</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-2823" name="line-2823"></a><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">locale_string</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_DIR</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-2824" name="line-2824"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_string</span><span class="p">);</span> +<a id="line-2825" name="line-2825"></a><span class="w"> </span><span class="n">locale_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_get_current_dir</span><span class="w"> </span><span class="p">();</span> +<a id="line-2826" name="line-2826"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2827" name="line-2827"></a> +<a id="line-2828" name="line-2828"></a><span class="w"> </span><span class="n">utf8_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_to_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">locale_string</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2829" name="line-2829"></a> +<a id="line-2830" name="line-2830"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_current_folder</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">look_in_folder_button</span><span class="p">),</span><span class="w"> </span><span class="n">utf8_string</span><span class="p">);</span> +<a id="line-2831" name="line-2831"></a> +<a id="line-2832" name="line-2832"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">locale_string</span><span class="p">);</span> +<a id="line-2833" name="line-2833"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_string</span><span class="p">);</span> +<a id="line-2834" name="line-2834"></a> +<a id="line-2835" name="line-2835"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_more_options_expander</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_expander_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Select more _options"</span><span class="p">));</span> +<a id="line-2836" name="line-2836"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">container</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_more_options_expander</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2837" name="line-2837"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_more_options_expander</span><span class="p">,</span><span class="w"> </span><span class="s">"notify::expanded"</span><span class="p">,</span> +<a id="line-2838" name="line-2838"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">click_expander_cb</span><span class="p">),</span> +<a id="line-2839" name="line-2839"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2840" name="line-2840"></a> +<a id="line-2841" name="line-2841"></a><span class="w"> </span><span class="n">create_additional_constraint_section</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2842" name="line-2842"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">container</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2843" name="line-2843"></a> +<a id="line-2844" name="line-2844"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2845" name="line-2845"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_more_options_expander</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Select more options"</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Click to expand or collapse the list of available options."</span><span class="p">));</span> +<a id="line-2846" name="line-2846"></a><span class="w"> </span><span class="n">add_atk_relation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_more_options_expander</span><span class="p">),</span><span class="w"> </span><span class="n">ATK_RELATION_CONTROLLED_BY</span><span class="p">);</span> +<a id="line-2847" name="line-2847"></a><span class="w"> </span><span class="n">add_atk_relation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">show_more_options_expander</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">),</span><span class="w"> </span><span class="n">ATK_RELATION_CONTROLLER_FOR</span><span class="p">);</span> +<a id="line-2848" name="line-2848"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2849" name="line-2849"></a> +<a id="line-2850" name="line-2850"></a><span class="w"> </span><span class="n">vbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">12</span><span class="p">);</span> +<a id="line-2851" name="line-2851"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">container</span><span class="p">),</span><span class="w"> </span><span class="n">vbox</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2852" name="line-2852"></a> +<a id="line-2853" name="line-2853"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_vbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">create_search_results_section</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2854" name="line-2854"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_vbox</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2855" name="line-2855"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">search_results_vbox</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2856" name="line-2856"></a> +<a id="line-2857" name="line-2857"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">);</span> +<a id="line-2858" name="line-2858"></a><span class="w"> </span><span class="n">gtk_button_box_set_layout</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_BUTTONBOX_END</span><span class="p">);</span> +<a id="line-2859" name="line-2859"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2860" name="line-2860"></a> +<a id="line-2861" name="line-2861"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-2862" name="line-2862"></a> +<a id="line-2863" name="line-2863"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-2864" name="line-2864"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-help"</span><span class="p">,</span> +<a id="line-2865" name="line-2865"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2866" name="line-2866"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2867" name="line-2867"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-2868" name="line-2868"></a> +<a id="line-2869" name="line-2869"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2870" name="line-2870"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2871" name="line-2871"></a><span class="w"> </span><span class="n">gtk_button_box_set_child_secondary</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2872" name="line-2872"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-2873" name="line-2873"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">click_help_cb</span><span class="p">),</span> +<a id="line-2874" name="line-2874"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">);</span> +<a id="line-2875" name="line-2875"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2876" name="line-2876"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Click to display the help manual."</span><span class="p">));</span> +<a id="line-2877" name="line-2877"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2878" name="line-2878"></a> +<a id="line-2879" name="line-2879"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-2880" name="line-2880"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-close"</span><span class="p">,</span> +<a id="line-2881" name="line-2881"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2882" name="line-2882"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2883" name="line-2883"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-2884" name="line-2884"></a> +<a id="line-2885" name="line-2885"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2886" name="line-2886"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-2887" name="line-2887"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">click_close_cb</span><span class="p">),</span> +<a id="line-2888" name="line-2888"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2889" name="line-2889"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2890" name="line-2890"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Click to close </span><span class="se">\"</span><span class="s">Search for Files</span><span class="se">\"</span><span class="s">."</span><span class="p">));</span> +<a id="line-2891" name="line-2891"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2892" name="line-2892"></a> +<a id="line-2893" name="line-2893"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2894" name="line-2894"></a> +<a id="line-2895" name="line-2895"></a><span class="w"> </span><span class="cm">/* Find and Stop buttons... */</span> +<a id="line-2896" name="line-2896"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-2897" name="line-2897"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-find"</span><span class="p">,</span> +<a id="line-2898" name="line-2898"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2899" name="line-2899"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2900" name="line-2900"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-2901" name="line-2901"></a> +<a id="line-2902" name="line-2902"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-2903" name="line-2903"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-stop"</span><span class="p">,</span> +<a id="line-2904" name="line-2904"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2905" name="line-2905"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2906" name="line-2906"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-2907" name="line-2907"></a> +<a id="line-2908" name="line-2908"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2909" name="line-2909"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2910" name="line-2910"></a> +<a id="line-2911" name="line-2911"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2912" name="line-2912"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2913" name="line-2913"></a> +<a id="line-2914" name="line-2914"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2915" name="line-2915"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2916" name="line-2916"></a> +<a id="line-2917" name="line-2917"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-2918" name="line-2918"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">click_find_cb</span><span class="p">),</span> +<a id="line-2919" name="line-2919"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2920" name="line-2920"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">,</span><span class="w"> </span><span class="s">"size_allocate"</span><span class="p">,</span> +<a id="line-2921" name="line-2921"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">size_allocate_cb</span><span class="p">),</span> +<a id="line-2922" name="line-2922"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_add_button</span><span class="p">);</span> +<a id="line-2923" name="line-2923"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-2924" name="line-2924"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">click_stop_cb</span><span class="p">),</span> +<a id="line-2925" name="line-2925"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2926" name="line-2926"></a> +<a id="line-2927" name="line-2927"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_window_accessible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2928" name="line-2928"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Click to perform a search."</span><span class="p">));</span> +<a id="line-2929" name="line-2929"></a><span class="w"> </span><span class="n">add_atk_namedesc</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Click to stop a search."</span><span class="p">));</span> +<a id="line-2930" name="line-2930"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2931" name="line-2931"></a> +<a id="line-2932" name="line-2932"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">container</span><span class="p">);</span> +<a id="line-2933" name="line-2933"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">available_options_vbox</span><span class="p">);</span> +<a id="line-2934" name="line-2934"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">progress_spinner</span><span class="p">);</span> +<a id="line-2935" name="line-2935"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">stop_button</span><span class="p">);</span> +<a id="line-2936" name="line-2936"></a> +<a id="line-2937" name="line-2937"></a><span class="w"> </span><span class="n">gtk_window_set_focus</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span> +<a id="line-2938" name="line-2938"></a><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch_history_entry_get_entry</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">name_contains_entry</span><span class="p">))));</span> +<a id="line-2939" name="line-2939"></a> +<a id="line-2940" name="line-2940"></a><span class="w"> </span><span class="n">gtk_window_set_default</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">find_button</span><span class="p">);</span> +<a id="line-2941" name="line-2941"></a> +<a id="line-2942" name="line-2942"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">;</span> +<a id="line-2943" name="line-2943"></a><span class="p">}</span> +<a id="line-2944" name="line-2944"></a> +<a id="line-2945" name="line-2945"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2946" name="line-2946"></a><span class="nf">gsearch_window_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">object</span><span class="p">)</span> +<a id="line-2947" name="line-2947"></a><span class="p">{</span> +<a id="line-2948" name="line-2948"></a><span class="w"> </span><span class="n">parent_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-2949" name="line-2949"></a><span class="p">}</span> +<a id="line-2950" name="line-2950"></a> +<a id="line-2951" name="line-2951"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2952" name="line-2952"></a><span class="nf">gsearch_window_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindowClass</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">klass</span><span class="p">,</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">dara</span><span class="p">)</span> +<a id="line-2953" name="line-2953"></a><span class="p">{</span> +<a id="line-2954" name="line-2954"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">object_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">klass</span><span class="p">;</span> +<a id="line-2955" name="line-2955"></a> +<a id="line-2956" name="line-2956"></a><span class="w"> </span><span class="n">object_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch_window_finalize</span><span class="p">;</span> +<a id="line-2957" name="line-2957"></a><span class="w"> </span><span class="n">parent_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_type_class_peek_parent</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-2958" name="line-2958"></a><span class="p">}</span> +<a id="line-2959" name="line-2959"></a> +<a id="line-2960" name="line-2960"></a><span class="n">GType</span> +<a id="line-2961" name="line-2961"></a><span class="nf">gsearch_window_get_type</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-2962" name="line-2962"></a><span class="p">{</span> +<a id="line-2963" name="line-2963"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GType</span><span class="w"> </span><span class="n">object_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-2964" name="line-2964"></a> +<a id="line-2965" name="line-2965"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">object_type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2966" name="line-2966"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GTypeInfo</span><span class="w"> </span><span class="n">object_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-2967" name="line-2967"></a><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindowClass</span><span class="p">),</span> +<a id="line-2968" name="line-2968"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-2969" name="line-2969"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-2970" name="line-2970"></a><span class="w"> </span><span class="p">(</span><span class="n">GClassInitFunc</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch_window_class_init</span><span class="p">,</span> +<a id="line-2971" name="line-2971"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-2972" name="line-2972"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-2973" name="line-2973"></a><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="p">),</span> +<a id="line-2974" name="line-2974"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-2975" name="line-2975"></a><span class="w"> </span><span class="p">(</span><span class="n">GInstanceInitFunc</span><span class="p">)(</span><span class="kt">void</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="p">)(</span><span class="kt">void</span><span class="p">))</span><span class="w"> </span><span class="n">gsearch_app_create</span><span class="p">,</span> +<a id="line-2976" name="line-2976"></a><span class="w"> </span><span class="nb">NULL</span> +<a id="line-2977" name="line-2977"></a><span class="w"> </span><span class="p">};</span> +<a id="line-2978" name="line-2978"></a><span class="w"> </span><span class="n">object_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_type_register_static</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_WINDOW</span><span class="p">,</span><span class="w"> </span><span class="s">"GSearchWindow"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">object_info</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2979" name="line-2979"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2980" name="line-2980"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">object_type</span><span class="p">;</span> +<a id="line-2981" name="line-2981"></a><span class="p">}</span> +<a id="line-2982" name="line-2982"></a> +<a id="line-2983" name="line-2983"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2984" name="line-2984"></a><span class="nf">gsearchtool_setup_gsettings_notifications</span><span class="w"> </span><span class="p">(</span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">)</span> +<a id="line-2985" name="line-2985"></a> +<a id="line-2986" name="line-2986"></a><span class="p">{</span> +<a id="line-2987" name="line-2987"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">click_to_activate_pref</span><span class="p">;</span> +<a id="line-2988" name="line-2988"></a> +<a id="line-2989" name="line-2989"></a><span class="w"> </span><span class="cm">/* Use the default double click behavior if caja isn't installed */</span> +<a id="line-2990" name="line-2990"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_schema_exists</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-2991" name="line-2991"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_search_results_single_click_to_activate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2992" name="line-2992"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2993" name="line-2993"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2994" name="line-2994"></a> +<a id="line-2995" name="line-2995"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_settings</span><span class="p">,</span> +<a id="line-2996" name="line-2996"></a><span class="w"> </span><span class="s">"changed::click-policy"</span><span class="p">,</span> +<a id="line-2997" name="line-2997"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">single_click_to_activate_key_changed_cb</span><span class="p">),</span> +<a id="line-2998" name="line-2998"></a><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-2999" name="line-2999"></a> +<a id="line-3000" name="line-3000"></a><span class="w"> </span><span class="cm">/* Get value of caja click behavior (single or double click to activate items) */</span> +<a id="line-3001" name="line-3001"></a><span class="w"> </span><span class="n">click_to_activate_pref</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">caja_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"click-policy"</span><span class="p">);</span> +<a id="line-3002" name="line-3002"></a> +<a id="line-3003" name="line-3003"></a><span class="w"> </span><span class="n">gsearch</span><span class="o">-></span><span class="n">is_search_results_single_click_to_activate</span><span class="w"> </span><span class="o">=</span> +<a id="line-3004" name="line-3004"></a><span class="w"> </span><span class="p">(</span><span class="n">strncmp</span><span class="w"> </span><span class="p">(</span><span class="n">click_to_activate_pref</span><span class="p">,</span><span class="w"> </span><span class="s">"single"</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">TRUE</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-3005" name="line-3005"></a> +<a id="line-3006" name="line-3006"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">click_to_activate_pref</span><span class="p">);</span> +<a id="line-3007" name="line-3007"></a><span class="p">}</span> +<a id="line-3008" name="line-3008"></a> +<a id="line-3009" name="line-3009"></a><span class="kt">int</span> +<a id="line-3010" name="line-3010"></a><span class="nf">main</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span> +<a id="line-3011" name="line-3011"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">argv</span><span class="p">[])</span> +<a id="line-3012" name="line-3012"></a><span class="p">{</span> +<a id="line-3013" name="line-3013"></a><span class="w"> </span><span class="n">GSearchWindow</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gsearch</span><span class="p">;</span> +<a id="line-3014" name="line-3014"></a><span class="w"> </span><span class="n">GOptionContext</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">context</span><span class="p">;</span> +<a id="line-3015" name="line-3015"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">window</span><span class="p">;</span> +<a id="line-3016" name="line-3016"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-3017" name="line-3017"></a><span class="w"> </span><span class="n">EggSMClient</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">client</span><span class="p">;</span> +<a id="line-3018" name="line-3018"></a> +<a id="line-3019" name="line-3019"></a><span class="cp">#ifdef ENABLE_NLS</span> +<a id="line-3020" name="line-3020"></a><span class="w"> </span><span class="n">setlocale</span><span class="w"> </span><span class="p">(</span><span class="n">LC_ALL</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-3021" name="line-3021"></a><span class="w"> </span><span class="n">bindtextdomain</span><span class="w"> </span><span class="p">(</span><span class="n">GETTEXT_PACKAGE</span><span class="p">,</span><span class="w"> </span><span class="n">MATELOCALEDIR</span><span class="p">);</span> +<a id="line-3022" name="line-3022"></a><span class="w"> </span><span class="n">bind_textdomain_codeset</span><span class="w"> </span><span class="p">(</span><span class="n">GETTEXT_PACKAGE</span><span class="p">,</span><span class="w"> </span><span class="s">"UTF-8"</span><span class="p">);</span> +<a id="line-3023" name="line-3023"></a><span class="w"> </span><span class="n">textdomain</span><span class="w"> </span><span class="p">(</span><span class="n">GETTEXT_PACKAGE</span><span class="p">);</span> +<a id="line-3024" name="line-3024"></a><span class="cp">#endif </span><span class="cm">/* ENABLE_NLS */</span> +<a id="line-3025" name="line-3025"></a> +<a id="line-3026" name="line-3026"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_option_context_new</span><span class="w"> </span><span class="p">(</span><span class="n">N_</span><span class="p">(</span><span class="s">"- the MATE Search Tool"</span><span class="p">));</span> +<a id="line-3027" name="line-3027"></a><span class="cp">#ifdef ENABLE_NLS</span> +<a id="line-3028" name="line-3028"></a><span class="w"> </span><span class="n">g_option_context_set_translation_domain</span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">GETTEXT_PACKAGE</span><span class="p">);</span> +<a id="line-3029" name="line-3029"></a><span class="cp">#endif </span><span class="cm">/* ENABLE_NLS */</span> +<a id="line-3030" name="line-3030"></a><span class="w"> </span><span class="n">gsearch_setup_goption_descriptions</span><span class="w"> </span><span class="p">();</span> +<a id="line-3031" name="line-3031"></a><span class="w"> </span><span class="n">g_option_context_add_main_entries</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">GSearchGOptionEntries</span><span class="p">,</span><span class="w"> </span><span class="n">GETTEXT_PACKAGE</span><span class="p">);</span> +<a id="line-3032" name="line-3032"></a><span class="w"> </span><span class="n">g_option_context_add_group</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_get_option_group</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">));</span> +<a id="line-3033" name="line-3033"></a><span class="w"> </span><span class="n">g_option_context_add_group</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">egg_sm_client_get_option_group</span><span class="w"> </span><span class="p">());</span> +<a id="line-3034" name="line-3034"></a><span class="w"> </span><span class="n">g_option_context_parse</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-3035" name="line-3035"></a> +<a id="line-3036" name="line-3036"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-3037" name="line-3037"></a><span class="w"> </span><span class="n">g_printerr</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Failed to parse command line arguments: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">),</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-3038" name="line-3038"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="mi">-1</span><span class="p">);</span> +<a id="line-3039" name="line-3039"></a><span class="w"> </span><span class="p">}</span> +<a id="line-3040" name="line-3040"></a> +<a id="line-3041" name="line-3041"></a><span class="w"> </span><span class="n">g_option_context_free</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-3042" name="line-3042"></a> +<a id="line-3043" name="line-3043"></a><span class="w"> </span><span class="n">g_set_application_name</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Search for Files"</span><span class="p">));</span> +<a id="line-3044" name="line-3044"></a><span class="w"> </span><span class="n">gtk_window_set_default_icon_name</span><span class="w"> </span><span class="p">(</span><span class="n">MATE_SEARCH_TOOL_ICON</span><span class="p">);</span> +<a id="line-3045" name="line-3045"></a> +<a id="line-3046" name="line-3046"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_TYPE_WINDOW</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-3047" name="line-3047"></a><span class="w"> </span><span class="n">gsearch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GSEARCH_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-3048" name="line-3048"></a> +<a id="line-3049" name="line-3049"></a><span class="w"> </span><span class="n">gtk_window_set_resizable</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-3050" name="line-3050"></a> +<a id="line-3051" name="line-3051"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"delete_event"</span><span class="p">,</span> +<a id="line-3052" name="line-3052"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">quit_cb</span><span class="p">),</span> +<a id="line-3053" name="line-3053"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-3054" name="line-3054"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"key_press_event"</span><span class="p">,</span> +<a id="line-3055" name="line-3055"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">key_press_cb</span><span class="p">),</span> +<a id="line-3056" name="line-3056"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-3057" name="line-3057"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"window_state_event"</span><span class="p">,</span> +<a id="line-3058" name="line-3058"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">window_state_event_cb</span><span class="p">),</span> +<a id="line-3059" name="line-3059"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-3060" name="line-3060"></a> +<a id="line-3061" name="line-3061"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">egg_sm_client_get</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-3062" name="line-3062"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="s">"save_state"</span><span class="p">,</span> +<a id="line-3063" name="line-3063"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">save_session_cb</span><span class="p">),</span> +<a id="line-3064" name="line-3064"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-3065" name="line-3065"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="s">"quit"</span><span class="p">,</span> +<a id="line-3066" name="line-3066"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">quit_session_cb</span><span class="p">),</span> +<a id="line-3067" name="line-3067"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-3068" name="line-3068"></a><span class="w"> </span><span class="p">}</span> +<a id="line-3069" name="line-3069"></a> +<a id="line-3070" name="line-3070"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="o">-></span><span class="n">window</span><span class="p">);</span> +<a id="line-3071" name="line-3071"></a> +<a id="line-3072" name="line-3072"></a><span class="w"> </span><span class="n">gsearchtool_setup_gsettings_notifications</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-3073" name="line-3073"></a> +<a id="line-3074" name="line-3074"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">handle_goption_args</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-3075" name="line-3075"></a><span class="w"> </span><span class="n">handle_gsettings_settings</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch</span><span class="p">);</span> +<a id="line-3076" name="line-3076"></a><span class="w"> </span><span class="p">}</span> +<a id="line-3077" name="line-3077"></a> +<a id="line-3078" name="line-3078"></a><span class="w"> </span><span class="n">gtk_main</span><span class="w"> </span><span class="p">();</span> +<a id="line-3079" name="line-3079"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-3080" name="line-3080"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/17.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/17.html new file mode 100644 index 00000000..9bf535f2 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/17.html @@ -0,0 +1,1097 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: logview/src/logview-app.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> logview-app.c</p> +<a href="17.html#line-156"> variableScope 156</a><a href="17.html#line-158"> variableScope 158</a><a href="17.html#line-158"> variableScope 158</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) 2008 Cosimo Cecchi <[email protected]></span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-4" name="line-4"></a><span class="cm"> *</span> +<a id="line-5" name="line-5"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-6" name="line-6"></a><span class="cm"> *</span> +<a id="line-7" name="line-7"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-8" name="line-8"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-9" name="line-9"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-10" name="line-10"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-11" name="line-11"></a><span class="cm"> *</span> +<a id="line-12" name="line-12"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-13" name="line-13"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-14" name="line-14"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-15" name="line-15"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-16" name="line-16"></a><span class="cm"> *</span> +<a id="line-17" name="line-17"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-18" name="line-18"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-19" name="line-19"></a><span class="cm"> */</span> +<a id="line-20" name="line-20"></a> +<a id="line-21" name="line-21"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-22" name="line-22"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-23" name="line-23"></a><span class="cp">#endif</span> +<a id="line-24" name="line-24"></a> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-app.h"</span> +<a id="line-26" name="line-26"></a> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-manager.h"</span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-window.h"</span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-prefs.h"</span> +<a id="line-30" name="line-30"></a> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-32" name="line-32"></a> +<a id="line-33" name="line-33"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_LogviewAppPrivate</span><span class="w"> </span><span class="p">{</span> +<a id="line-34" name="line-34"></a><span class="w"> </span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">;</span> +<a id="line-35" name="line-35"></a><span class="w"> </span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">;</span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-37" name="line-37"></a><span class="p">};</span> +<a id="line-38" name="line-38"></a> +<a id="line-39" name="line-39"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-40" name="line-40"></a><span class="w"> </span><span class="n">APP_QUIT</span><span class="p">,</span> +<a id="line-41" name="line-41"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-42" name="line-42"></a><span class="p">};</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-45" name="line-45"></a> +<a id="line-46" name="line-46"></a><span class="k">static</span><span class="w"> </span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app_singleton</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-47" name="line-47"></a> +<a id="line-48" name="line-48"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewApp</span><span class="p">,</span><span class="w"> </span><span class="n">logview_app</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_OBJECT</span><span class="p">);</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-51" name="line-51"></a><span class="nf">main_window_delete_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">GdkEvent</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-54" name="line-54"></a><span class="p">{</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-56" name="line-56"></a> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">APP_QUIT</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-58" name="line-58"></a> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-60" name="line-60"></a><span class="p">}</span> +<a id="line-61" name="line-61"></a> +<a id="line-62" name="line-62"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-63" name="line-63"></a><span class="nf">logview_app_set_window</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="p">)</span> +<a id="line-64" name="line-64"></a><span class="p">{</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-67" name="line-67"></a> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">logview_window_new</span><span class="w"> </span><span class="p">());</span> +<a id="line-69" name="line-69"></a> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">app</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">window</span><span class="p">;</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"delete-event"</span><span class="p">,</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">main_window_delete_cb</span><span class="p">),</span><span class="w"> </span><span class="n">app</span><span class="p">);</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="p">}</span> +<a id="line-76" name="line-76"></a> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">gtk_window_set_default_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"mate-system-log"</span><span class="p">);</span> +<a id="line-78" name="line-78"></a> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-80" name="line-80"></a><span class="p">}</span> +<a id="line-81" name="line-81"></a> +<a id="line-82" name="line-82"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="p">;</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">logs</span><span class="p">;</span> +<a id="line-85" name="line-85"></a><span class="p">}</span><span class="w"> </span><span class="n">EnumerateJob</span><span class="p">;</span> +<a id="line-86" name="line-86"></a> +<a id="line-87" name="line-87"></a><span class="cm">/* TODO: ideally we should parse configuration files in /etc/logrotate.conf</span> +<a id="line-88" name="line-88"></a><span class="cm"> * and all the files in /etc/logrotate.d/ and group all the logs referring</span> +<a id="line-89" name="line-89"></a><span class="cm"> * to the same entry under a category. Right now, we just do some</span> +<a id="line-90" name="line-90"></a><span class="cm"> * parsing instead, and fill with quasi-sensible defaults.</span> +<a id="line-91" name="line-91"></a><span class="cm"> */</span> +<a id="line-92" name="line-92"></a> +<a id="line-93" name="line-93"></a><span class="cm">/* adapted from sysklogd sources */</span> +<a id="line-94" name="line-94"></a><span class="k">static</span><span class="w"> </span><span class="n">GSList</span><span class="o">*</span> +<a id="line-95" name="line-95"></a><span class="nf">parse_syslog</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-96" name="line-96"></a><span class="p">{</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">cbuf</span><span class="p">[</span><span class="n">BUFSIZ</span><span class="p">];</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">cline</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="kt">FILE</span><span class="w"> </span><span class="o">*</span><span class="n">cf</span><span class="p">;</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">logfiles</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-101" name="line-101"></a> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">cf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">fopen</span><span class="w"> </span><span class="p">(</span><span class="s">"/etc/syslog.conf"</span><span class="p">,</span><span class="w"> </span><span class="s">"r"</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="p">}</span> +<a id="line-105" name="line-105"></a> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">cline</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cbuf</span><span class="p">;</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">fgets</span><span class="w"> </span><span class="p">(</span><span class="n">cline</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">cbuf</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="p">(</span><span class="n">cline</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">cbuf</span><span class="p">),</span><span class="w"> </span><span class="n">cf</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">list</span><span class="p">;</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-110" name="line-110"></a> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cline</span><span class="p">;</span><span class="w"> </span><span class="n">g_ascii_isspace</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">p</span><span class="p">);</span><span class="w"> </span><span class="o">++</span><span class="n">p</span><span class="p">);</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'#'</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\n'</span><span class="p">)</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-114" name="line-114"></a> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strsplit_set</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="s">", -</span><span class="se">\t</span><span class="s">()</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-116" name="line-116"></a> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">list</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">list</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'/'</span><span class="w"> </span><span class="o">&&</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">g_slist_find_custom</span><span class="w"> </span><span class="p">(</span><span class="n">logfiles</span><span class="p">,</span><span class="w"> </span><span class="n">list</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="p">(</span><span class="n">GCompareFunc</span><span class="p">)</span><span class="w"> </span><span class="n">g_ascii_strcasecmp</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="p">{</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">logfiles</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_insert</span><span class="w"> </span><span class="p">(</span><span class="n">logfiles</span><span class="p">,</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">[</span><span class="n">i</span><span class="p">]),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="p">}</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="p">}</span> +<a id="line-126" name="line-126"></a> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="p">}</span> +<a id="line-129" name="line-129"></a> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">fclose</span><span class="w"> </span><span class="p">(</span><span class="n">cf</span><span class="p">);</span> +<a id="line-131" name="line-131"></a> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">logfiles</span><span class="p">;</span> +<a id="line-133" name="line-133"></a><span class="p">}</span> +<a id="line-134" name="line-134"></a> +<a id="line-135" name="line-135"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-136" name="line-136"></a><span class="nf">enumerate_job_finish</span><span class="w"> </span><span class="p">(</span><span class="n">EnumerateJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="p">)</span> +<a id="line-137" name="line-137"></a><span class="p">{</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">files</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">logs</span><span class="p">;</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">app</span><span class="p">;</span> +<a id="line-140" name="line-140"></a> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="n">logview_manager_add_logs_from_name_list</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">files</span><span class="p">,</span><span class="w"> </span><span class="n">files</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-142" name="line-142"></a> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">g_slist_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">files</span><span class="p">,</span><span class="w"> </span><span class="n">g_free</span><span class="p">);</span> +<a id="line-144" name="line-144"></a> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">app</span><span class="p">);</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">EnumerateJob</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="p">);</span> +<a id="line-147" name="line-147"></a><span class="p">}</span> +<a id="line-148" name="line-148"></a> +<a id="line-149" name="line-149"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-150" name="line-150"></a><span class="nf">enumerate_next_files_async_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">GAsyncResult</span><span class="w"> </span><span class="o">*</span><span class="n">res</span><span class="p">,</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-153" name="line-153"></a><span class="p">{</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">EnumerateJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">enumerated_files</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-156" name="line-156"></a><span class="hll"><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">info</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'info' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'info' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">logs</span><span class="p">;</span> +<a id="line-158" name="line-158"></a><span class="hll"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">content_type</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'content_type' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'content_type' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'name' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'name' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-159" name="line-159"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">parse_string</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">container_path</span><span class="p">;</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">GFileType</span><span class="w"> </span><span class="n">type</span><span class="p">;</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">container</span><span class="p">;</span> +<a id="line-162" name="line-162"></a> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">enumerated_files</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_enumerator_next_files_finish</span><span class="w"> </span><span class="p">(</span><span class="n">G_FILE_ENUMERATOR</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">res</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">enumerated_files</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">enumerate_job_finish</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="p">);</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="p">}</span> +<a id="line-169" name="line-169"></a> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">logs</span><span class="p">;</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">container</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_enumerator_get_container</span><span class="w"> </span><span class="p">(</span><span class="n">G_FILE_ENUMERATOR</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="n">container_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">container</span><span class="p">);</span> +<a id="line-173" name="line-173"></a> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="cm">/* TODO: we don't support grouping rotated logs yet, skip gzipped files</span> +<a id="line-175" name="line-175"></a><span class="cm"> * and those which name contains a formatted date.</span> +<a id="line-176" name="line-176"></a><span class="cm"> */</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">enumerated_files</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_file_type</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">content_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_content_type</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-182" name="line-182"></a> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_file_info_get_attribute_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="s">"access::can-read"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="p">}</span> +<a id="line-187" name="line-187"></a> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(((</span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_FILE_TYPE_REGULAR</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_FILE_TYPE_SYMBOLIC_LINK</span><span class="p">))</span><span class="w"> </span><span class="o">||</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="o">!</span><span class="n">g_content_type_is_a</span><span class="w"> </span><span class="p">(</span><span class="n">content_type</span><span class="p">,</span><span class="w"> </span><span class="s">"text/plain"</span><span class="p">))</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="p">{</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="p">}</span> +<a id="line-194" name="line-194"></a> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_content_type_is_a</span><span class="w"> </span><span class="p">(</span><span class="n">content_type</span><span class="p">,</span><span class="w"> </span><span class="s">"application/x-gzip"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="p">}</span> +<a id="line-199" name="line-199"></a> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_regex_match_simple</span><span class="w"> </span><span class="p">(</span><span class="s">"</span><span class="se">\\</span><span class="s">d{8}$"</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="p">}</span> +<a id="line-204" name="line-204"></a> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">parse_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_build_filename</span><span class="w"> </span><span class="p">(</span><span class="n">container_path</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-206" name="line-206"></a> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_slist_find_custom</span><span class="w"> </span><span class="p">(</span><span class="n">logs</span><span class="p">,</span><span class="w"> </span><span class="n">parse_string</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GCompareFunc</span><span class="p">)</span><span class="w"> </span><span class="n">g_ascii_strcasecmp</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_append</span><span class="w"> </span><span class="p">(</span><span class="n">logs</span><span class="p">,</span><span class="w"> </span><span class="n">parse_string</span><span class="p">);</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">parse_string</span><span class="p">);</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="p">}</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">parse_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="p">}</span> +<a id="line-216" name="line-216"></a> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">enumerated_files</span><span class="p">);</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">container</span><span class="p">);</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">container_path</span><span class="p">);</span> +<a id="line-220" name="line-220"></a> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logs</span><span class="p">;</span> +<a id="line-222" name="line-222"></a> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">enumerate_job_finish</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="p">);</span> +<a id="line-224" name="line-224"></a><span class="p">}</span> +<a id="line-225" name="line-225"></a> +<a id="line-226" name="line-226"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-227" name="line-227"></a><span class="nf">enumerate_children_async_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">GAsyncResult</span><span class="w"> </span><span class="o">*</span><span class="n">res</span><span class="p">,</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-230" name="line-230"></a><span class="p">{</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">EnumerateJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">GFileEnumerator</span><span class="w"> </span><span class="o">*</span><span class="n">enumerator</span><span class="p">;</span> +<a id="line-233" name="line-233"></a> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">enumerator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_enumerate_children_finish</span><span class="w"> </span><span class="p">(</span><span class="n">G_FILE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">res</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">enumerator</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">enumerate_job_finish</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="p">);</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="p">}</span> +<a id="line-240" name="line-240"></a> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">g_file_enumerator_next_files_async</span><span class="w"> </span><span class="p">(</span><span class="n">enumerator</span><span class="p">,</span><span class="w"> </span><span class="n">G_MAXINT</span><span class="p">,</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">G_PRIORITY_DEFAULT</span><span class="p">,</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">enumerate_next_files_async_cb</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="p">);</span> +<a id="line-244" name="line-244"></a><span class="p">}</span> +<a id="line-245" name="line-245"></a> +<a id="line-246" name="line-246"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-247" name="line-247"></a><span class="nf">logview_app_first_time_initialize</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="p">)</span> +<a id="line-248" name="line-248"></a><span class="p">{</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">logs</span><span class="p">;</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">log_dir</span><span class="p">;</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">EnumerateJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="p">;</span> +<a id="line-252" name="line-252"></a> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="cm">/* let's add all accessible files in /var/log and those mentioned</span> +<a id="line-254" name="line-254"></a><span class="cm"> * in /etc/syslog.conf.</span> +<a id="line-255" name="line-255"></a><span class="cm"> */</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">parse_syslog</span><span class="w"> </span><span class="p">();</span> +<a id="line-258" name="line-258"></a> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">EnumerateJob</span><span class="p">);</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">app</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="p">);</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logs</span><span class="p">;</span> +<a id="line-262" name="line-262"></a> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">log_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="s">"/var/log/"</span><span class="p">);</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">g_file_enumerate_children_async</span><span class="w"> </span><span class="p">(</span><span class="n">log_dir</span><span class="p">,</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="s">"standard::*,access::can-read"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">G_PRIORITY_DEFAULT</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">enumerate_children_async_cb</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="p">);</span> +<a id="line-268" name="line-268"></a> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">log_dir</span><span class="p">);</span> +<a id="line-270" name="line-270"></a><span class="p">}</span> +<a id="line-271" name="line-271"></a> +<a id="line-272" name="line-272"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-273" name="line-273"></a><span class="nf">do_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">obj</span><span class="p">)</span> +<a id="line-274" name="line-274"></a><span class="p">{</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_APP</span><span class="w"> </span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> +<a id="line-276" name="line-276"></a> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">);</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">);</span> +<a id="line-279" name="line-279"></a> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">logview_app_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> +<a id="line-281" name="line-281"></a><span class="p">}</span> +<a id="line-282" name="line-282"></a> +<a id="line-283" name="line-283"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-284" name="line-284"></a><span class="nf">logview_app_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewAppClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-285" name="line-285"></a><span class="p">{</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">oclass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-287" name="line-287"></a> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">oclass</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">do_finalize</span><span class="p">;</span> +<a id="line-289" name="line-289"></a> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">APP_QUIT</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"app-quit"</span><span class="p">,</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">oclass</span><span class="p">),</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewAppClass</span><span class="p">,</span><span class="w"> </span><span class="n">app_quit</span><span class="p">),</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-298" name="line-298"></a><span class="p">}</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-301" name="line-301"></a><span class="nf">logview_app_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">self</span><span class="p">)</span> +<a id="line-302" name="line-302"></a><span class="p">{</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">LogviewAppPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_app_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">self</span><span class="p">);</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get</span><span class="w"> </span><span class="p">();</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_manager_get</span><span class="w"> </span><span class="p">();</span> +<a id="line-307" name="line-307"></a><span class="p">}</span> +<a id="line-308" name="line-308"></a> +<a id="line-309" name="line-309"></a><span class="n">LogviewApp</span><span class="o">*</span> +<a id="line-310" name="line-310"></a><span class="nf">logview_app_get</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-311" name="line-311"></a><span class="p">{</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">app_singleton</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">app_singleton</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_TYPE_APP</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-314" name="line-314"></a> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">logview_app_set_window</span><span class="w"> </span><span class="p">(</span><span class="n">app_singleton</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">app_singleton</span><span class="p">);</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="n">app_singleton</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="p">}</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="p">}</span> +<a id="line-320" name="line-320"></a> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">app_singleton</span><span class="p">;</span> +<a id="line-322" name="line-322"></a><span class="p">}</span> +<a id="line-323" name="line-323"></a> +<a id="line-324" name="line-324"></a><span class="kt">void</span> +<a id="line-325" name="line-325"></a><span class="nf">logview_app_initialize</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">log_files</span><span class="p">)</span> +<a id="line-326" name="line-326"></a><span class="p">{</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">LogviewAppPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-328" name="line-328"></a> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_APP</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="p">));</span> +<a id="line-330" name="line-330"></a> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">app</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-332" name="line-332"></a> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="cm">/* open regular logs and add each log passed as a parameter */</span> +<a id="line-334" name="line-334"></a> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log_files</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">active_log</span><span class="p">;</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">logs</span><span class="p">;</span> +<a id="line-338" name="line-338"></a> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">active_log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_active_logfile</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">);</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_stored_logfiles</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">);</span> +<a id="line-341" name="line-341"></a> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">logs</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="o">!</span><span class="n">logs</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span><span class="w"> </span><span class="p">{</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">logview_app_first_time_initialize</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="p">);</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">logview_manager_add_logs_from_names</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">logs</span><span class="p">,</span><span class="w"> </span><span class="n">active_log</span><span class="p">);</span> +<a id="line-347" name="line-347"></a> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">active_log</span><span class="p">);</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">logs</span><span class="p">);</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="p">}</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">logview_manager_add_logs_from_names</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">log_files</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="p">}</span> +<a id="line-354" name="line-354"></a> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">window</span><span class="p">));</span> +<a id="line-356" name="line-356"></a><span class="p">}</span> +<a id="line-357" name="line-357"></a> +<a id="line-358" name="line-358"></a><span class="kt">void</span> +<a id="line-359" name="line-359"></a><span class="nf">logview_app_add_error</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="p">,</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">file_path</span><span class="p">,</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">secondary</span><span class="p">)</span> +<a id="line-362" name="line-362"></a><span class="p">{</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">primary</span><span class="p">;</span> +<a id="line-365" name="line-365"></a> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_APP</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="p">));</span> +<a id="line-367" name="line-367"></a> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">app</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">window</span><span class="p">;</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Impossible to open the file %s"</span><span class="p">),</span><span class="w"> </span><span class="n">file_path</span><span class="p">);</span> +<a id="line-370" name="line-370"></a> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">logview_window_add_error</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="n">secondary</span><span class="p">);</span> +<a id="line-372" name="line-372"></a> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-374" name="line-374"></a><span class="p">}</span> +<a id="line-375" name="line-375"></a> +<a id="line-376" name="line-376"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-377" name="line-377"></a><span class="nf">check_error_prefs</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">,</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-379" name="line-379"></a><span class="p">{</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">strings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">strings</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span> +<a id="line-383" name="line-383"></a> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">logview_prefs_remove_stored_log</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-386" name="line-386"></a><span class="p">}</span> +<a id="line-387" name="line-387"></a> +<a id="line-388" name="line-388"></a><span class="kt">void</span> +<a id="line-389" name="line-389"></a><span class="nf">logview_app_add_errors</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewApp</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="p">,</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">errors</span><span class="p">)</span> +<a id="line-391" name="line-391"></a><span class="p">{</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-393" name="line-393"></a> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_APP</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="p">));</span> +<a id="line-395" name="line-395"></a> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">app</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">window</span><span class="p">;</span> +<a id="line-397" name="line-397"></a> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">errors</span><span class="o">-></span><span class="n">len</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="p">}</span> +<a id="line-401" name="line-401"></a> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">g_ptr_array_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">errors</span><span class="p">,</span><span class="w"> </span><span class="n">check_error_prefs</span><span class="p">,</span><span class="w"> </span><span class="n">app</span><span class="p">);</span> +<a id="line-403" name="line-403"></a> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">errors</span><span class="o">-></span><span class="n">len</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">err</span><span class="p">;</span> +<a id="line-406" name="line-406"></a> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_index</span><span class="w"> </span><span class="p">(</span><span class="n">errors</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">logview_window_add_error</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span><span class="w"> </span><span class="n">err</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="n">logview_window_add_errors</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">errors</span><span class="p">);</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="p">}</span> +<a id="line-412" name="line-412"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/18.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/18.html new file mode 100644 index 00000000..2b67768c --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/18.html @@ -0,0 +1,1349 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: logview/src/logview-filter-manager.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> logview-filter-manager.c</p> +<a href="18.html#line-169"> variableScope 169</a><a href="18.html#line-170"> variableScope 170</a><a href="18.html#line-171"> variableScope 171</a><a href="18.html#line-172"> variableScope 172</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/*-*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) Johannes Schmid 2009 <[email protected]></span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-4" name="line-4"></a><span class="cm"> *</span> +<a id="line-5" name="line-5"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-6" name="line-6"></a><span class="cm"> *</span> +<a id="line-7" name="line-7"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-8" name="line-8"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-9" name="line-9"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-10" name="line-10"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-11" name="line-11"></a><span class="cm"> *</span> +<a id="line-12" name="line-12"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-13" name="line-13"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-14" name="line-14"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-15" name="line-15"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-16" name="line-16"></a><span class="cm"> *</span> +<a id="line-17" name="line-17"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-18" name="line-18"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-19" name="line-19"></a><span class="cm"> */</span> +<a id="line-20" name="line-20"></a> +<a id="line-21" name="line-21"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-22" name="line-22"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-23" name="line-23"></a><span class="cp">#endif</span> +<a id="line-24" name="line-24"></a> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-filter-manager.h"</span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-prefs.h"</span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-30" name="line-30"></a> +<a id="line-31" name="line-31"></a><span class="cp">#define UI_RESOURCE "/org/mate/system-log/logview-filter.ui"</span> +<a id="line-32" name="line-32"></a><span class="cp">#define GET_WIDGET(x) (GTK_WIDGET (gtk_builder_get_object (builder, (x))))</span> +<a id="line-33" name="line-33"></a> +<a id="line-34" name="line-34"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_LogviewFilterManagerPrivate</span><span class="w"> </span><span class="p">{</span> +<a id="line-35" name="line-35"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">tree</span><span class="p">;</span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">add_button</span><span class="p">;</span> +<a id="line-38" name="line-38"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">remove_button</span><span class="p">;</span> +<a id="line-39" name="line-39"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">edit_button</span><span class="p">;</span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-42" name="line-42"></a><span class="w"> </span><span class="n">GtkBuilder</span><span class="o">*</span><span class="w"> </span><span class="n">builder</span><span class="p">;</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="n">LogviewPrefs</span><span class="o">*</span><span class="w"> </span><span class="n">prefs</span><span class="p">;</span> +<a id="line-45" name="line-45"></a><span class="p">};</span> +<a id="line-46" name="line-46"></a> +<a id="line-47" name="line-47"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="n">COLUMN_FILTER</span><span class="p">,</span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">N_COLUMNS</span> +<a id="line-51" name="line-51"></a><span class="p">};</span> +<a id="line-52" name="line-52"></a> +<a id="line-53" name="line-53"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFilterManager</span><span class="p">,</span><span class="w"> </span><span class="n">logview_filter_manager</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_DIALOG</span><span class="p">);</span> +<a id="line-54" name="line-54"></a> +<a id="line-55" name="line-55"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-56" name="line-56"></a><span class="nf">logview_filter_manager_update_model</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFilterManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">)</span> +<a id="line-57" name="line-57"></a><span class="p">{</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">filters</span><span class="p">;</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">filter</span><span class="p">;</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-62" name="line-62"></a> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">gtk_list_store_clear</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">));</span> +<a id="line-64" name="line-64"></a> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_filters</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">);</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">filters</span><span class="p">;</span><span class="w"> </span><span class="n">filter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">filter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_next</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="o">-></span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="s">"name"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-69" name="line-69"></a> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">,</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">COLUMN_FILTER</span><span class="p">,</span><span class="w"> </span><span class="n">filter</span><span class="o">-></span><span class="n">data</span><span class="p">,</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-76" name="line-76"></a> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="p">}</span> +<a id="line-79" name="line-79"></a> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">filters</span><span class="p">);</span> +<a id="line-81" name="line-81"></a><span class="p">}</span> +<a id="line-82" name="line-82"></a> +<a id="line-83" name="line-83"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-84" name="line-84"></a><span class="nf">check_name</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFilterManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">)</span> +<a id="line-85" name="line-85"></a><span class="p">{</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-87" name="line-87"></a> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">),</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">GTK_DIALOG_MODAL</span><span class="p">,</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Filter name is empty!"</span><span class="p">));</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-95" name="line-95"></a> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-97" name="line-97"></a> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="p">}</span> +<a id="line-100" name="line-100"></a> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="s">":"</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="p">(</span><span class="n">manager</span><span class="p">),</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">GTK_DIALOG_MODAL</span><span class="p">,</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Filter name may not contain the ':' character"</span><span class="p">));</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-108" name="line-108"></a> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-110" name="line-110"></a> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="p">}</span> +<a id="line-113" name="line-113"></a> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-115" name="line-115"></a><span class="p">}</span> +<a id="line-116" name="line-116"></a> +<a id="line-117" name="line-117"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-118" name="line-118"></a><span class="nf">check_regex</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFilterManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">regex</span><span class="p">)</span> +<a id="line-119" name="line-119"></a><span class="p">{</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">GRegex</span><span class="w"> </span><span class="o">*</span><span class="n">reg</span><span class="p">;</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">regex</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="p">(</span><span class="n">manager</span><span class="p">),</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">GTK_DIALOG_MODAL</span><span class="p">,</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Regular expression is empty!"</span><span class="p">));</span> +<a id="line-130" name="line-130"></a> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-132" name="line-132"></a> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-134" name="line-134"></a> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="p">}</span> +<a id="line-137" name="line-137"></a> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">reg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_regex_new</span><span class="w"> </span><span class="p">(</span><span class="n">regex</span><span class="p">,</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">),</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">GTK_DIALOG_MODAL</span><span class="p">,</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Regular expression is invalid: %s"</span><span class="p">),</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-148" name="line-148"></a> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-151" name="line-151"></a> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="p">}</span> +<a id="line-154" name="line-154"></a> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">g_regex_unref</span><span class="w"> </span><span class="p">(</span><span class="n">reg</span><span class="p">);</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-158" name="line-158"></a><span class="p">}</span> +<a id="line-159" name="line-159"></a> +<a id="line-160" name="line-160"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-161" name="line-161"></a><span class="nf">on_dialog_add_edit_reponse</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">response_id</span><span class="p">,</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">LogviewFilterManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">)</span> +<a id="line-163" name="line-163"></a><span class="p">{</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">entry_name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">entry_regex</span><span class="p">;</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">radio_color</span><span class="p">;</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">check_foreground</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">check_background</span><span class="p">;</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">color_foreground</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">color_background</span><span class="p">;</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">old_name</span><span class="p">;</span> +<a id="line-169" name="line-169"></a><span class="hll"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'name' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'name' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-170" name="line-170"></a><span class="hll"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">regex</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'regex' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'regex' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-171" name="line-171"></a><span class="hll"><span class="w"> </span><span class="n">LogviewFilter</span><span class="w"> </span><span class="o">*</span><span class="n">filter</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'filter' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'filter' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-172" name="line-172"></a><span class="hll"><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">tag</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'tag' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'tag' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">GtkBuilder</span><span class="w"> </span><span class="o">*</span><span class="n">builder</span><span class="p">;</span> +<a id="line-174" name="line-174"></a> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">old_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_get_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">),</span><span class="w"> </span><span class="s">"old_name"</span><span class="p">);</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">builder</span><span class="p">;</span> +<a id="line-177" name="line-177"></a> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">entry_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"entry_name"</span><span class="p">);</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">entry_regex</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"entry_regex"</span><span class="p">);</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">radio_color</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"radio_color"</span><span class="p">);</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">check_foreground</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"check_foreground"</span><span class="p">);</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">check_background</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"check_background"</span><span class="p">);</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="n">color_foreground</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"color_foreground"</span><span class="p">);</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">color_background</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"color_background"</span><span class="p">);</span> +<a id="line-185" name="line-185"></a> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response_id</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_APPLY</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry_name</span><span class="p">));</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">regex</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry_regex</span><span class="p">));</span> +<a id="line-189" name="line-189"></a> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">check_name</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="o">!</span><span class="n">check_regex</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">regex</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="p">}</span> +<a id="line-193" name="line-193"></a> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">filter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_filter_new</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">regex</span><span class="p">);</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_tag_new</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_toggle_button_get_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOGGLE_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">radio_color</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_toggle_button_get_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOGGLE_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">check_foreground</span><span class="p">))</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">gtk_toggle_button_get_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOGGLE_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">check_background</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">error_dialog</span><span class="p">;</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">error_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">),</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">GTK_DIALOG_MODAL</span><span class="p">,</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Please specify either foreground or background color!"</span><span class="p">));</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">));</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">);</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">);</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="p">}</span> +<a id="line-215" name="line-215"></a> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">GdkRGBA</span><span class="w"> </span><span class="n">foreground_color</span><span class="p">,</span><span class="w"> </span><span class="n">background_color</span><span class="p">;</span> +<a id="line-217" name="line-217"></a> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">gtk_color_chooser_get_rgba</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COLOR_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">color_foreground</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">foreground_color</span><span class="p">);</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">),</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="s">"foreground-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">foreground_color</span><span class="p">,</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="s">"foreground-set"</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_toggle_button_get_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOGGLE_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">check_foreground</span><span class="p">)),</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">gtk_color_chooser_get_rgba</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COLOR_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">color_background</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">background_color</span><span class="p">);</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="s">"paragraph-background-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">background_color</span><span class="p">,</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="s">"paragraph-background-set"</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_toggle_button_get_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOGGLE_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">check_background</span><span class="p">)),</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio_color)) */</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="p">}</span> +<a id="line-231" name="line-231"></a> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">old_name</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">g_str_equal</span><span class="w"> </span><span class="p">(</span><span class="n">old_name</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">logview_prefs_remove_filter</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">old_name</span><span class="p">);</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="p">}</span> +<a id="line-235" name="line-235"></a> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">),</span><span class="w"> </span><span class="s">"texttag"</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> +<a id="line-238" name="line-238"></a> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">logview_prefs_add_filter</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">filter</span><span class="p">);</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">);</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">logview_filter_manager_update_model</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">);</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="p">}</span> +<a id="line-244" name="line-244"></a> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-246" name="line-246"></a><span class="p">}</span> +<a id="line-247" name="line-247"></a> +<a id="line-248" name="line-248"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-249" name="line-249"></a><span class="nf">run_add_edit_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFilterManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewFilter</span><span class="w"> </span><span class="o">*</span><span class="n">filter</span><span class="p">)</span> +<a id="line-250" name="line-250"></a><span class="p">{</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">;</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">regex</span><span class="p">;</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">title</span><span class="p">;</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">entry_name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">entry_regex</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">radio_color</span><span class="p">;</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">radio_visible</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">check_foreground</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">check_background</span><span class="p">;</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">color_foreground</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">color_background</span><span class="p">;</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">foreground_set</span><span class="p">,</span><span class="w"> </span><span class="n">background_set</span><span class="p">,</span><span class="w"> </span><span class="n">invisible</span><span class="p">;</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">tag</span><span class="p">;</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">GtkBuilder</span><span class="o">*</span><span class="w"> </span><span class="n">builder</span><span class="p">;</span> +<a id="line-260" name="line-260"></a> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">builder</span><span class="p">;</span> +<a id="line-262" name="line-262"></a> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-265" name="line-265"></a> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_builder_add_from_resource</span><span class="w"> </span><span class="p">(</span><span class="n">builder</span><span class="p">,</span><span class="w"> </span><span class="n">UI_RESOURCE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Could not load filter ui: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="p">}</span> +<a id="line-271" name="line-271"></a> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"dialog_filter"</span><span class="p">);</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">entry_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"entry_name"</span><span class="p">);</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="n">entry_regex</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"entry_regex"</span><span class="p">);</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">radio_color</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"radio_color"</span><span class="p">);</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">radio_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"radio_visible"</span><span class="p">);</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">check_foreground</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"check_foreground"</span><span class="p">);</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">check_background</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"check_background"</span><span class="p">);</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">color_foreground</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"color_foreground"</span><span class="p">);</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">color_background</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"color_background"</span><span class="p">);</span> +<a id="line-281" name="line-281"></a> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Edit filter"</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Add new filter"</span><span class="p">));</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">title</span><span class="p">);</span> +<a id="line-284" name="line-284"></a> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">GdkRGBA</span><span class="w"> </span><span class="o">*</span><span class="n">foreground</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">background</span><span class="p">;</span> +<a id="line-287" name="line-287"></a> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">,</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="s">"name"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="s">"regex"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">regex</span><span class="p">,</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="s">"texttag"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">tag</span><span class="p">,</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-293" name="line-293"></a> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="s">"foreground-set"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">foreground_set</span><span class="p">,</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="s">"paragraph-background-set"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">background_set</span><span class="p">,</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">invisible</span><span class="p">,</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="p">(</span><span class="n">entry_name</span><span class="p">),</span><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="p">(</span><span class="n">entry_regex</span><span class="p">),</span><span class="w"> </span><span class="n">regex</span><span class="p">);</span> +<a id="line-302" name="line-302"></a> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">foreground_set</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="s">"foreground-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">foreground</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">gtk_color_chooser_set_rgba</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COLOR_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">color_foreground</span><span class="p">),</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">foreground</span><span class="p">);</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">gdk_rgba_free</span><span class="w"> </span><span class="p">(</span><span class="n">foreground</span><span class="p">);</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="p">}</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">gtk_toggle_button_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOGGLE_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">check_foreground</span><span class="p">),</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">foreground_set</span><span class="p">);</span> +<a id="line-311" name="line-311"></a> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">background_set</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="s">"paragraph-background-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">background</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">gtk_color_chooser_set_rgba</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COLOR_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">color_background</span><span class="p">),</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">background</span><span class="p">);</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">gdk_rgba_free</span><span class="w"> </span><span class="p">(</span><span class="n">background</span><span class="p">);</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="p">}</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">gtk_toggle_button_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOGGLE_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">check_background</span><span class="p">),</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">background_set</span><span class="p">);</span> +<a id="line-320" name="line-320"></a> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">background_set</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">foreground_set</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">gtk_toggle_button_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOGGLE_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">radio_color</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">invisible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">gtk_toggle_button_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOGGLE_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">radio_visible</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="p">}</span> +<a id="line-326" name="line-326"></a> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">regex</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="p">}</span> +<a id="line-330" name="line-330"></a> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">g_object_set_data_full</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">),</span><span class="w"> </span><span class="s">"old_name"</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">g_free</span><span class="p">);</span> +<a id="line-332" name="line-332"></a> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_dialog_add_edit_reponse</span><span class="p">),</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="n">manager</span><span class="p">);</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="n">gtk_window_set_transient_for</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="n">gtk_window_set_modal</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-340" name="line-340"></a> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-342" name="line-342"></a><span class="p">}</span> +<a id="line-343" name="line-343"></a> +<a id="line-344" name="line-344"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-345" name="line-345"></a><span class="nf">on_add_clicked</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewFilterManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">)</span> +<a id="line-346" name="line-346"></a><span class="p">{</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">run_add_edit_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-348" name="line-348"></a><span class="p">}</span> +<a id="line-349" name="line-349"></a> +<a id="line-350" name="line-350"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-351" name="line-351"></a><span class="nf">on_edit_clicked</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewFilterManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">)</span> +<a id="line-352" name="line-352"></a><span class="p">{</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">LogviewFilter</span><span class="w"> </span><span class="o">*</span><span class="n">filter</span><span class="p">;</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-357" name="line-357"></a> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">tree</span><span class="p">));</span> +<a id="line-360" name="line-360"></a> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">gtk_tree_selection_get_selected</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_FILTER</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">filter</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-363" name="line-363"></a> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">run_add_edit_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">filter</span><span class="p">);</span> +<a id="line-365" name="line-365"></a> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">);</span> +<a id="line-367" name="line-367"></a><span class="p">}</span> +<a id="line-368" name="line-368"></a> +<a id="line-369" name="line-369"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-370" name="line-370"></a><span class="nf">on_remove_clicked</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewFilterManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">)</span> +<a id="line-371" name="line-371"></a><span class="p">{</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">tree</span><span class="p">));</span> +<a id="line-379" name="line-379"></a> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="n">gtk_tree_selection_get_selected</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-382" name="line-382"></a> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">logview_prefs_remove_filter</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">logview_filter_manager_update_model</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">);</span> +<a id="line-385" name="line-385"></a> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">g_free</span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-387" name="line-387"></a><span class="p">}</span> +<a id="line-388" name="line-388"></a> +<a id="line-389" name="line-389"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-390" name="line-390"></a><span class="nf">on_tree_selection_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewFilterManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">)</span> +<a id="line-391" name="line-391"></a><span class="p">{</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">status</span><span class="p">;</span> +<a id="line-393" name="line-393"></a> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-395" name="line-395"></a> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">edit_button</span><span class="p">,</span><span class="w"> </span><span class="n">status</span><span class="p">);</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">remove_button</span><span class="p">,</span><span class="w"> </span><span class="n">status</span><span class="p">);</span> +<a id="line-398" name="line-398"></a><span class="p">}</span> +<a id="line-399" name="line-399"></a> +<a id="line-400" name="line-400"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-401" name="line-401"></a><span class="nf">logview_filter_manager_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFilterManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">)</span> +<a id="line-402" name="line-402"></a><span class="p">{</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">grid</span><span class="p">;</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">scrolled_window</span><span class="p">;</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">column</span><span class="p">;</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="n">text_renderer</span><span class="p">;</span> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">LogviewFilterManagerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-408" name="line-408"></a> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_filter_manager_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">);</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-411" name="line-411"></a> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_builder_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">builder</span><span class="p">);</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get</span><span class="w"> </span><span class="p">();</span> +<a id="line-415" name="line-415"></a> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="n">gtk_dialog_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="p">(</span><span class="n">manager</span><span class="p">),</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="s">"gtk-close"</span><span class="p">,</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="n">GTK_RESPONSE_CLOSE</span><span class="p">);</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">gtk_window_set_modal</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">),</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-421" name="line-421"></a> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_list_store_new</span><span class="w"> </span><span class="p">(</span><span class="n">N_COLUMNS</span><span class="p">,</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">G_TYPE_OBJECT</span><span class="p">));</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">logview_filter_manager_update_model</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">);</span> +<a id="line-426" name="line-426"></a> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">grid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_grid_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">gtk_grid_set_row_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">gtk_grid_set_column_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="n">scrolled_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_scrolled_window_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_policy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">scrolled_window</span><span class="p">),</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">);</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_shadow_type</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">scrolled_window</span><span class="p">),</span> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">GTK_SHADOW_ETCHED_IN</span><span class="p">);</span> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">tree</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_new_with_model</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">gtk_widget_set_size_request</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">tree</span><span class="p">,</span><span class="w"> </span><span class="mi">150</span><span class="p">,</span><span class="w"> </span><span class="mi">200</span><span class="p">);</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">gtk_tree_view_set_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">tree</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">scrolled_window</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">tree</span><span class="p">);</span> +<a id="line-439" name="line-439"></a> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">text_renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-441" name="line-441"></a> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new</span><span class="p">();</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="n">gtk_tree_view_column_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">text_renderer</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_attributes</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">text_renderer</span><span class="p">,</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">COLUMN_NAME</span><span class="p">,</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">tree</span><span class="p">),</span> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-450" name="line-450"></a> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">add_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-add"</span><span class="p">,</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-456" name="line-456"></a> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">edit_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-properties"</span><span class="p">,</span> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-462" name="line-462"></a> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">remove_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-remove"</span><span class="p">,</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-466" name="line-466"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-468" name="line-468"></a> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">),</span> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Filters"</span><span class="p">));</span> +<a id="line-471" name="line-471"></a> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">add_button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_add_clicked</span><span class="p">),</span><span class="w"> </span><span class="n">manager</span><span class="p">);</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">edit_button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_edit_clicked</span><span class="p">),</span><span class="w"> </span><span class="n">manager</span><span class="p">);</span> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">remove_button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_remove_clicked</span><span class="p">),</span><span class="w"> </span><span class="n">manager</span><span class="p">);</span> +<a id="line-478" name="line-478"></a> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">edit_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">remove_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-481" name="line-481"></a> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">tree</span><span class="p">)),</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_tree_selection_changed</span><span class="p">),</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">manager</span><span class="p">);</span> +<a id="line-485" name="line-485"></a> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="n">gtk_widget_set_hexpand</span><span class="w"> </span><span class="p">(</span><span class="n">scrolled_window</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="n">gtk_widget_set_vexpand</span><span class="w"> </span><span class="p">(</span><span class="n">scrolled_window</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">scrolled_window</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="n">gtk_widget_set_valign</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">add_button</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ALIGN_CENTER</span><span class="p">);</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">add_button</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="n">gtk_widget_set_valign</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">edit_button</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ALIGN_CENTER</span><span class="p">);</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">edit_button</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="n">gtk_widget_set_valign</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">remove_button</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ALIGN_CENTER</span><span class="p">);</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">remove_button</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">))),</span> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="n">grid</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-498" name="line-498"></a><span class="p">}</span> +<a id="line-499" name="line-499"></a> +<a id="line-500" name="line-500"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-501" name="line-501"></a><span class="nf">logview_filter_manager_dispose</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-502" name="line-502"></a><span class="p">{</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="n">LogviewFilterManager</span><span class="o">*</span><span class="w"> </span><span class="n">manager</span><span class="p">;</span> +<a id="line-504" name="line-504"></a> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="n">manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_FILTER_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-506" name="line-506"></a> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">builder</span><span class="p">);</span> +<a id="line-508" name="line-508"></a> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">logview_filter_manager_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">dispose</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-510" name="line-510"></a><span class="p">}</span> +<a id="line-511" name="line-511"></a> +<a id="line-512" name="line-512"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-513" name="line-513"></a><span class="nf">logview_filter_manager_response</span><span class="w"> </span><span class="p">(</span><span class="n">GtkDialog</span><span class="o">*</span><span class="w"> </span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response_id</span><span class="p">)</span> +<a id="line-514" name="line-514"></a><span class="p">{</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-516" name="line-516"></a><span class="p">}</span> +<a id="line-517" name="line-517"></a> +<a id="line-518" name="line-518"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-519" name="line-519"></a><span class="nf">logview_filter_manager_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFilterManagerClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-520" name="line-520"></a><span class="p">{</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">object_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="n">GtkDialogClass</span><span class="w"> </span><span class="o">*</span><span class="n">parent_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_DIALOG_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-523" name="line-523"></a> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="n">object_class</span><span class="o">-></span><span class="n">dispose</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_filter_manager_dispose</span><span class="p">;</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="n">parent_class</span><span class="o">-></span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_filter_manager_response</span><span class="p">;</span> +<a id="line-526" name="line-526"></a><span class="p">}</span> +<a id="line-527" name="line-527"></a> +<a id="line-528" name="line-528"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-529" name="line-529"></a><span class="nf">logview_filter_manager_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-530" name="line-530"></a><span class="p">{</span> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_TYPE_FILTER_MANAGER</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-532" name="line-532"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/19.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/19.html new file mode 100644 index 00000000..8c1c5057 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/19.html @@ -0,0 +1,945 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: logview/src/logview-findbar.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> logview-findbar.c</p> +<a href="19.html#line-331"> variableScope 331</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) 2005 Vincent Noel <[email protected]></span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2008 Cosimo Cecchi <[email protected]></span> +<a id="line-4" name="line-4"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-7" name="line-7"></a><span class="cm"> *</span> +<a id="line-8" name="line-8"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-9" name="line-9"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-10" name="line-10"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-11" name="line-11"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-12" name="line-12"></a><span class="cm"> *</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-14" name="line-14"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-15" name="line-15"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-16" name="line-16"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-17" name="line-17"></a><span class="cm"> *</span> +<a id="line-18" name="line-18"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-19" name="line-19"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-20" name="line-20"></a><span class="cm"> */</span> +<a id="line-21" name="line-21"></a> +<a id="line-22" name="line-22"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-23" name="line-23"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-24" name="line-24"></a><span class="cp">#endif</span> +<a id="line-25" name="line-25"></a> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkkeysyms.h></span> +<a id="line-29" name="line-29"></a> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-findbar.h"</span> +<a id="line-31" name="line-31"></a> +<a id="line-32" name="line-32"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_LogviewFindbarPrivate</span><span class="w"> </span><span class="p">{</span> +<a id="line-33" name="line-33"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">;</span> +<a id="line-34" name="line-34"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-35" name="line-35"></a> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="n">GtkToolItem</span><span class="w"> </span><span class="o">*</span><span class="n">clear_button</span><span class="p">;</span> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="n">GtkToolItem</span><span class="w"> </span><span class="o">*</span><span class="n">back_button</span><span class="p">;</span> +<a id="line-38" name="line-38"></a><span class="w"> </span><span class="n">GtkToolItem</span><span class="w"> </span><span class="o">*</span><span class="n">forward_button</span><span class="p">;</span> +<a id="line-39" name="line-39"></a><span class="w"> </span><span class="n">GtkToolItem</span><span class="w"> </span><span class="o">*</span><span class="n">status_item</span><span class="p">;</span> +<a id="line-40" name="line-40"></a><span class="w"> </span><span class="n">GtkToolItem</span><span class="w"> </span><span class="o">*</span><span class="n">separator</span><span class="p">;</span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">;</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">status_bold_id</span><span class="p">;</span> +<a id="line-45" name="line-45"></a><span class="p">};</span> +<a id="line-46" name="line-46"></a> +<a id="line-47" name="line-47"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="n">PREVIOUS</span><span class="p">,</span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="n">NEXT</span><span class="p">,</span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">CLOSE</span><span class="p">,</span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">TEXT_CHANGED</span><span class="p">,</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-53" name="line-53"></a><span class="p">};</span> +<a id="line-54" name="line-54"></a> +<a id="line-55" name="line-55"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-56" name="line-56"></a> +<a id="line-57" name="line-57"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbar</span><span class="p">,</span><span class="w"> </span><span class="n">logview_findbar</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_TOOLBAR</span><span class="p">);</span> +<a id="line-58" name="line-58"></a> +<a id="line-59" name="line-59"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-60" name="line-60"></a><span class="nf">back_button_clicked_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkToolButton</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">,</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-62" name="line-62"></a><span class="p">{</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-64" name="line-64"></a> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">PREVIOUS</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-66" name="line-66"></a><span class="p">}</span> +<a id="line-67" name="line-67"></a> +<a id="line-68" name="line-68"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-69" name="line-69"></a><span class="nf">forward_button_clicked_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkToolButton</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">,</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-71" name="line-71"></a><span class="p">{</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-73" name="line-73"></a> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">NEXT</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-75" name="line-75"></a><span class="p">}</span> +<a id="line-76" name="line-76"></a> +<a id="line-77" name="line-77"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-78" name="line-78"></a><span class="nf">clear_button_clicked_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkToolButton</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">,</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-80" name="line-80"></a><span class="p">{</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-82" name="line-82"></a> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">logview_findbar_set_message</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-85" name="line-85"></a><span class="p">}</span> +<a id="line-86" name="line-86"></a> +<a id="line-87" name="line-87"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-88" name="line-88"></a><span class="nf">entry_activate_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">,</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-90" name="line-90"></a><span class="p">{</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-92" name="line-92"></a> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">NEXT</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-94" name="line-94"></a><span class="p">}</span> +<a id="line-95" name="line-95"></a> +<a id="line-96" name="line-96"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-97" name="line-97"></a><span class="nf">entry_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkEditable</span><span class="w"> </span><span class="o">*</span><span class="n">editable</span><span class="p">,</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-99" name="line-99"></a><span class="p">{</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">;</span> +<a id="line-102" name="line-102"></a> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">editable</span><span class="p">));</span> +<a id="line-104" name="line-104"></a> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="p">}</span> +<a id="line-108" name="line-108"></a> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">string</span><span class="p">);</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-112" name="line-112"></a> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">TEXT_CHANGED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="p">}</span> +<a id="line-115" name="line-115"></a><span class="p">}</span> +<a id="line-116" name="line-116"></a> +<a id="line-117" name="line-117"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-118" name="line-118"></a><span class="nf">entry_key_press_event_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">,</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">GdkEventKey</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-121" name="line-121"></a><span class="p">{</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">keyval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_KEY_Escape</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">CLOSE</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="p">}</span> +<a id="line-128" name="line-128"></a> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-130" name="line-130"></a><span class="p">}</span> +<a id="line-131" name="line-131"></a> +<a id="line-132" name="line-132"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-133" name="line-133"></a><span class="nf">unbold_timeout_cb</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-134" name="line-134"></a><span class="p">{</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">PangoFontDescription</span><span class="w"> </span><span class="o">*</span><span class="n">desc</span><span class="p">;</span> +<a id="line-137" name="line-137"></a> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pango_font_description_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">gtk_widget_override_font</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="n">desc</span><span class="p">);</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">pango_font_description_free</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-141" name="line-141"></a> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">status_bold_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-143" name="line-143"></a> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-145" name="line-145"></a><span class="p">}</span> +<a id="line-146" name="line-146"></a> +<a id="line-147" name="line-147"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-148" name="line-148"></a><span class="nf">logview_findbar_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="p">)</span> +<a id="line-149" name="line-149"></a><span class="p">{</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">box</span><span class="p">;</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">GtkToolbar</span><span class="w"> </span><span class="o">*</span><span class="n">gtoolbar</span><span class="p">;</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">GtkToolItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">LogviewFindbarPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-154" name="line-154"></a> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_findbar_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">);</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">gtoolbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_TOOLBAR</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">);</span> +<a id="line-158" name="line-158"></a> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">gtk_toolbar_set_style</span><span class="w"> </span><span class="p">(</span><span class="n">gtoolbar</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TOOLBAR_BOTH_HORIZ</span><span class="p">);</span> +<a id="line-160" name="line-160"></a> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_bold_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-162" name="line-162"></a> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="cm">/* Find: |_______| */</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">box</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">12</span><span class="p">);</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">gtk_widget_set_halign</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ALIGN_START</span><span class="p">);</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">gtk_widget_set_margin_start</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">gtk_widget_set_margin_end</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-168" name="line-168"></a> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Find:"</span><span class="p">));</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-171" name="line-171"></a> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">gtk_entry_set_width_chars</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="mi">32</span><span class="p">);</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">entry</span><span class="p">);</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">box</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-176" name="line-176"></a> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tool_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">),</span><span class="w"> </span><span class="n">box</span><span class="p">);</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">gtk_toolbar_insert</span><span class="w"> </span><span class="p">(</span><span class="n">gtoolbar</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">));</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="cm">/* "Previous" and "Next" buttons */</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"pan-start-symbolic"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_BUTTON</span><span class="p">);</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">back_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tool_button_new</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Find Previous"</span><span class="p">));</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">gtk_tool_item_set_is_important</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">back_button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">gtk_tool_item_set_tooltip_text</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">back_button</span><span class="p">,</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Find previous occurrence of the search string"</span><span class="p">));</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">gtk_toolbar_insert</span><span class="w"> </span><span class="p">(</span><span class="n">gtoolbar</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">back_button</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">back_button</span><span class="p">));</span> +<a id="line-190" name="line-190"></a> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"pan-end-symbolic"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_BUTTON</span><span class="p">);</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">forward_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tool_button_new</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Find Next"</span><span class="p">));</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">gtk_tool_item_set_is_important</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">forward_button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">gtk_tool_item_set_tooltip_text</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">forward_button</span><span class="p">,</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Find next occurrence of the search string"</span><span class="p">));</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="n">gtk_toolbar_insert</span><span class="w"> </span><span class="p">(</span><span class="n">gtoolbar</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">forward_button</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">forward_button</span><span class="p">));</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="cm">/* clear button */</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"edit-clear-all"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_BUTTON</span><span class="p">);</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tool_button_new</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">gtk_tool_item_set_tooltip_text</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="p">,</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Clear the search string"</span><span class="p">));</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">gtk_toolbar_insert</span><span class="w"> </span><span class="p">(</span><span class="n">gtoolbar</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="p">));</span> +<a id="line-206" name="line-206"></a> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="cm">/* separator */</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">separator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_separator_tool_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="n">gtk_toolbar_insert</span><span class="w"> </span><span class="p">(</span><span class="n">gtoolbar</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">separator</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-210" name="line-210"></a> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="cm">/* message */</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tool_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">gtk_tool_item_set_expand</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_item</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">gtk_label_set_use_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">message</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">message</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">message</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_item</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">gtk_toolbar_insert</span><span class="w"> </span><span class="p">(</span><span class="n">gtoolbar</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_item</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-221" name="line-221"></a> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-223" name="line-223"></a> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="cm">/* signal handlers */</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">back_button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">back_button_clicked_cb</span><span class="p">),</span><span class="w"> </span><span class="n">findbar</span><span class="p">);</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">forward_button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">forward_button_clicked_cb</span><span class="p">),</span><span class="w"> </span><span class="n">findbar</span><span class="p">);</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">clear_button_clicked_cb</span><span class="p">),</span><span class="w"> </span><span class="n">findbar</span><span class="p">);</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">entry_activate_cb</span><span class="p">),</span><span class="w"> </span><span class="n">findbar</span><span class="p">);</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">entry_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">findbar</span><span class="p">);</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="s">"key-press-event"</span><span class="p">,</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">entry_key_press_event_cb</span><span class="p">),</span><span class="w"> </span><span class="n">findbar</span><span class="p">);</span> +<a id="line-237" name="line-237"></a><span class="p">}</span> +<a id="line-238" name="line-238"></a> +<a id="line-239" name="line-239"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-240" name="line-240"></a><span class="nf">do_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">)</span> +<a id="line-241" name="line-241"></a><span class="p">{</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-243" name="line-243"></a> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">entry</span><span class="p">);</span> +<a id="line-245" name="line-245"></a><span class="p">}</span> +<a id="line-246" name="line-246"></a> +<a id="line-247" name="line-247"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-248" name="line-248"></a><span class="nf">do_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">obj</span><span class="p">)</span> +<a id="line-249" name="line-249"></a><span class="p">{</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> +<a id="line-251" name="line-251"></a> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">string</span><span class="p">);</span> +<a id="line-253" name="line-253"></a> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">logview_findbar_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> +<a id="line-255" name="line-255"></a><span class="p">}</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-258" name="line-258"></a><span class="nf">logview_findbar_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbarClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-259" name="line-259"></a><span class="p">{</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">oclass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">GtkWidgetClass</span><span class="w"> </span><span class="o">*</span><span class="n">wclass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-262" name="line-262"></a> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">oclass</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">do_finalize</span><span class="p">;</span> +<a id="line-264" name="line-264"></a> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">wclass</span><span class="o">-></span><span class="n">grab_focus</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">do_grab_focus</span><span class="p">;</span> +<a id="line-266" name="line-266"></a> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">PREVIOUS</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"previous"</span><span class="p">,</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">oclass</span><span class="p">),</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbarClass</span><span class="p">,</span><span class="w"> </span><span class="n">previous</span><span class="p">),</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-274" name="line-274"></a> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">NEXT</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"next"</span><span class="p">,</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">oclass</span><span class="p">),</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbarClass</span><span class="p">,</span><span class="w"> </span><span class="n">next</span><span class="p">),</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-282" name="line-282"></a> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">CLOSE</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"close"</span><span class="p">,</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">oclass</span><span class="p">),</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbarClass</span><span class="p">,</span><span class="w"> </span><span class="n">close</span><span class="p">),</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-290" name="line-290"></a> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">TEXT_CHANGED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"text-changed"</span><span class="p">,</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">oclass</span><span class="p">),</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbarClass</span><span class="p">,</span><span class="w"> </span><span class="n">text_changed</span><span class="p">),</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-298" name="line-298"></a><span class="p">}</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="cm">/* public methods */</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-303" name="line-303"></a><span class="nf">logview_findbar_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-304" name="line-304"></a><span class="p">{</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">;</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_TYPE_FINDBAR</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">widget</span><span class="p">;</span> +<a id="line-308" name="line-308"></a><span class="p">}</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="kt">void</span> +<a id="line-311" name="line-311"></a><span class="nf">logview_findbar_open</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="p">)</span> +<a id="line-312" name="line-312"></a><span class="p">{</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">));</span> +<a id="line-314" name="line-314"></a> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">));</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">));</span> +<a id="line-317" name="line-317"></a><span class="p">}</span> +<a id="line-318" name="line-318"></a> +<a id="line-319" name="line-319"></a><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-320" name="line-320"></a><span class="nf">logview_findbar_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="p">)</span> +<a id="line-321" name="line-321"></a><span class="p">{</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">));</span> +<a id="line-323" name="line-323"></a> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">string</span><span class="p">;</span> +<a id="line-325" name="line-325"></a><span class="p">}</span> +<a id="line-326" name="line-326"></a> +<a id="line-327" name="line-327"></a><span class="kt">void</span> +<a id="line-328" name="line-328"></a><span class="nf">logview_findbar_set_message</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="p">,</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">)</span> +<a id="line-330" name="line-330"></a><span class="p">{</span> +<a id="line-331" name="line-331"></a><span class="hll"><span class="w"> </span><span class="n">PangoFontDescription</span><span class="w"> </span><span class="o">*</span><span class="n">desc</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'desc' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'desc' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-332" name="line-332"></a> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">));</span> +<a id="line-334" name="line-334"></a> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pango_font_description_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">pango_font_description_set_weight</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_WEIGHT_BOLD</span><span class="p">);</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="n">gtk_widget_override_font</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="n">desc</span><span class="p">);</span> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">pango_font_description_free</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-340" name="line-340"></a> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">status_bold_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add</span><span class="w"> </span><span class="p">(</span><span class="mi">600</span><span class="p">,</span><span class="w"> </span><span class="n">unbold_timeout_cb</span><span class="p">,</span><span class="w"> </span><span class="n">findbar</span><span class="p">);</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="p">}</span> +<a id="line-343" name="line-343"></a> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">gtk_label_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">message</span><span class="p">),</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">separator</span><span class="p">,</span><span class="w"> </span><span class="s">"visible"</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">status_item</span><span class="p">,</span><span class="w"> </span><span class="s">"visible"</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-348" name="line-348"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/2.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/2.html new file mode 100644 index 00000000..d2b9a1df --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/2.html @@ -0,0 +1,1721 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: baobab/src/baobab-remote-connect-dialog.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> baobab-remote-connect-dialog.c</p> +<a href="2.html#line-54"> unknownMacro 54</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span> +<span class="normal">533</span> +<span class="normal">534</span> +<span class="normal">535</span> +<span class="normal">536</span> +<span class="normal">537</span> +<span class="normal">538</span> +<span class="normal">539</span> +<span class="normal">540</span> +<span class="normal">541</span> +<span class="normal">542</span> +<span class="normal">543</span> +<span class="normal">544</span> +<span class="normal">545</span> +<span class="normal">546</span> +<span class="normal">547</span> +<span class="normal">548</span> +<span class="normal">549</span> +<span class="normal">550</span> +<span class="normal">551</span> +<span class="normal">552</span> +<span class="normal">553</span> +<span class="normal">554</span> +<span class="normal">555</span> +<span class="normal">556</span> +<span class="normal">557</span> +<span class="normal">558</span> +<span class="normal">559</span> +<span class="normal">560</span> +<span class="normal">561</span> +<span class="normal">562</span> +<span class="normal">563</span> +<span class="normal">564</span> +<span class="normal">565</span> +<span class="normal">566</span> +<span class="normal">567</span> +<span class="normal">568</span> +<span class="normal">569</span> +<span class="normal">570</span> +<span class="normal">571</span> +<span class="normal">572</span> +<span class="normal">573</span> +<span class="normal">574</span> +<span class="normal">575</span> +<span class="normal">576</span> +<span class="normal">577</span> +<span class="normal">578</span> +<span class="normal">579</span> +<span class="normal">580</span> +<span class="normal">581</span> +<span class="normal">582</span> +<span class="normal">583</span> +<span class="normal">584</span> +<span class="normal">585</span> +<span class="normal">586</span> +<span class="normal">587</span> +<span class="normal">588</span> +<span class="normal">589</span> +<span class="normal">590</span> +<span class="normal">591</span> +<span class="normal">592</span> +<span class="normal">593</span> +<span class="normal">594</span> +<span class="normal">595</span> +<span class="normal">596</span> +<span class="normal">597</span> +<span class="normal">598</span> +<span class="normal">599</span> +<span class="normal">600</span> +<span class="normal">601</span> +<span class="normal">602</span> +<span class="normal">603</span> +<span class="normal">604</span> +<span class="normal">605</span> +<span class="normal">606</span> +<span class="normal">607</span> +<span class="normal">608</span> +<span class="normal">609</span> +<span class="normal">610</span> +<span class="normal">611</span> +<span class="normal">612</span> +<span class="normal">613</span> +<span class="normal">614</span> +<span class="normal">615</span> +<span class="normal">616</span> +<span class="normal">617</span> +<span class="normal">618</span> +<span class="normal">619</span> +<span class="normal">620</span> +<span class="normal">621</span> +<span class="normal">622</span> +<span class="normal">623</span> +<span class="normal">624</span> +<span class="normal">625</span> +<span class="normal">626</span> +<span class="normal">627</span> +<span class="normal">628</span> +<span class="normal">629</span> +<span class="normal">630</span> +<span class="normal">631</span> +<span class="normal">632</span> +<span class="normal">633</span> +<span class="normal">634</span> +<span class="normal">635</span> +<span class="normal">636</span> +<span class="normal">637</span> +<span class="normal">638</span> +<span class="normal">639</span> +<span class="normal">640</span> +<span class="normal">641</span> +<span class="normal">642</span> +<span class="normal">643</span> +<span class="normal">644</span> +<span class="normal">645</span> +<span class="normal">646</span> +<span class="normal">647</span> +<span class="normal">648</span> +<span class="normal">649</span> +<span class="normal">650</span> +<span class="normal">651</span> +<span class="normal">652</span> +<span class="normal">653</span> +<span class="normal">654</span> +<span class="normal">655</span> +<span class="normal">656</span> +<span class="normal">657</span> +<span class="normal">658</span> +<span class="normal">659</span> +<span class="normal">660</span> +<span class="normal">661</span> +<span class="normal">662</span> +<span class="normal">663</span> +<span class="normal">664</span> +<span class="normal">665</span> +<span class="normal">666</span> +<span class="normal">667</span> +<span class="normal">668</span> +<span class="normal">669</span> +<span class="normal">670</span> +<span class="normal">671</span> +<span class="normal">672</span> +<span class="normal">673</span> +<span class="normal">674</span> +<span class="normal">675</span> +<span class="normal">676</span> +<span class="normal">677</span> +<span class="normal">678</span> +<span class="normal">679</span> +<span class="normal">680</span> +<span class="normal">681</span> +<span class="normal">682</span> +<span class="normal">683</span> +<span class="normal">684</span> +<span class="normal">685</span> +<span class="normal">686</span> +<span class="normal">687</span> +<span class="normal">688</span> +<span class="normal">689</span> +<span class="normal">690</span> +<span class="normal">691</span> +<span class="normal">692</span> +<span class="normal">693</span> +<span class="normal">694</span> +<span class="normal">695</span> +<span class="normal">696</span> +<span class="normal">697</span> +<span class="normal">698</span> +<span class="normal">699</span> +<span class="normal">700</span> +<span class="normal">701</span> +<span class="normal">702</span> +<span class="normal">703</span> +<span class="normal">704</span> +<span class="normal">705</span> +<span class="normal">706</span> +<span class="normal">707</span> +<span class="normal">708</span> +<span class="normal">709</span> +<span class="normal">710</span> +<span class="normal">711</span> +<span class="normal">712</span> +<span class="normal">713</span> +<span class="normal">714</span> +<span class="normal">715</span> +<span class="normal">716</span> +<span class="normal">717</span> +<span class="normal">718</span> +<span class="normal">719</span> +<span class="normal">720</span> +<span class="normal">721</span> +<span class="normal">722</span> +<span class="normal">723</span> +<span class="normal">724</span> +<span class="normal">725</span> +<span class="normal">726</span> +<span class="normal">727</span> +<span class="normal">728</span> +<span class="normal">729</span> +<span class="normal">730</span> +<span class="normal">731</span> +<span class="normal">732</span> +<span class="normal">733</span> +<span class="normal">734</span> +<span class="normal">735</span> +<span class="normal">736</span> +<span class="normal">737</span> +<span class="normal">738</span> +<span class="normal">739</span> +<span class="normal">740</span> +<span class="normal">741</span> +<span class="normal">742</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2005 Fabio Marzocca</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * Modified module from caja-connect-server-dialog.c.</span> +<a id="line-5" name="line-5"></a><span class="cm"> * Released under same licence.</span> +<a id="line-6" name="line-6"></a><span class="cm"> * Copyright (C) 2003 Red Hat, Inc.</span> +<a id="line-7" name="line-7"></a><span class="cm"> *</span> +<a id="line-8" name="line-8"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-9" name="line-9"></a><span class="cm"> *</span> +<a id="line-10" name="line-10"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-11" name="line-11"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-12" name="line-12"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-13" name="line-13"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-14" name="line-14"></a><span class="cm"> *</span> +<a id="line-15" name="line-15"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-16" name="line-16"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-17" name="line-17"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-18" name="line-18"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-19" name="line-19"></a><span class="cm"> *</span> +<a id="line-20" name="line-20"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-21" name="line-21"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-22" name="line-22"></a><span class="cm"> */</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-26" name="line-26"></a><span class="cp">#endif</span> +<a id="line-27" name="line-27"></a> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-remote-connect-dialog.h"</span> +<a id="line-29" name="line-29"></a> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-34" name="line-34"></a> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab.h"</span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="cm">/* Translators: all the strings in this file are meant to map the</span> +<a id="line-38" name="line-38"></a><span class="cm"> similar strings inside caja-connect-server and should be</span> +<a id="line-39" name="line-39"></a><span class="cm"> translated the same way</span> +<a id="line-40" name="line-40"></a><span class="cm">*/</span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_BaobabRemoteConnectDialogDetails</span><span class="w"> </span><span class="p">{</span> +<a id="line-43" name="line-43"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">grid</span><span class="p">;</span> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">type_combo</span><span class="p">;</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">uri_entry</span><span class="p">;</span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">server_entry</span><span class="p">;</span> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">share_entry</span><span class="p">;</span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">port_entry</span><span class="p">;</span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">folder_entry</span><span class="p">;</span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">domain_entry</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">user_entry</span><span class="p">;</span> +<a id="line-52" name="line-52"></a><span class="p">};</span> +<a id="line-53" name="line-53"></a> +<a id="line-54" name="line-54"></a><span class="hll"><span class="n">G_DEFINE_TYPE</span><span class="p">(</span><span class="n">BaobabRemoteConnectDialog</span><span class="p">,</span><span class="w"> </span><span class="n">baobab_remote_connect_dialog</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_DIALOG</span><span class="p">)</span><span class="error2"><--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.</span> +</span><a id="line-55" name="line-55"></a> +<a id="line-56" name="line-56"></a><span class="cp">#define RESPONSE_CONNECT GTK_RESPONSE_OK</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-59" name="line-59"></a><span class="n">display_error_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">,</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">location</span><span class="p">,</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">)</span> +<a id="line-62" name="line-62"></a><span class="p">{</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dlg</span><span class="p">;</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">parse_name</span><span class="p">;</span> +<a id="line-65" name="line-65"></a> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">parse_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_parse_name</span><span class="w"> </span><span class="p">(</span><span class="n">location</span><span class="p">);</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">dlg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Cannot scan location </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">"</span><span class="p">),</span><span class="w"> </span><span class="n">parse_name</span><span class="p">);</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">parse_name</span><span class="p">);</span> +<a id="line-73" name="line-73"></a> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dlg</span><span class="p">),</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-76" name="line-76"></a> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dlg</span><span class="p">));</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dlg</span><span class="p">);</span> +<a id="line-79" name="line-79"></a><span class="p">}</span> +<a id="line-80" name="line-80"></a> +<a id="line-81" name="line-81"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-82" name="line-82"></a><span class="n">mount_enclosing_ready_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">location</span><span class="p">,</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">GAsyncResult</span><span class="w"> </span><span class="o">*</span><span class="n">res</span><span class="p">,</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="p">)</span> +<a id="line-85" name="line-85"></a><span class="p">{</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">success</span><span class="p">;</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-88" name="line-88"></a> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">success</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_mount_enclosing_volume_finish</span><span class="w"> </span><span class="p">(</span><span class="n">location</span><span class="p">,</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">res</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-91" name="line-91"></a> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">success</span><span class="w"> </span><span class="o">||</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">g_error_matches</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_ERROR</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_ERROR_ALREADY_MOUNTED</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">baobab_scan_location</span><span class="w"> </span><span class="p">(</span><span class="n">location</span><span class="p">);</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="p">}</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">display_error_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">,</span><span class="w"> </span><span class="n">app</span><span class="p">);</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="p">}</span> +<a id="line-99" name="line-99"></a> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-102" name="line-102"></a> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">location</span><span class="p">)</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">location</span><span class="p">);</span> +<a id="line-105" name="line-105"></a><span class="p">}</span> +<a id="line-106" name="line-106"></a> +<a id="line-107" name="line-107"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-108" name="line-108"></a><span class="n">connect_server_dialog_present_uri</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="p">,</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">location</span><span class="p">,</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">)</span> +<a id="line-111" name="line-111"></a><span class="p">{</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">GMountOperation</span><span class="w"> </span><span class="o">*</span><span class="n">op</span><span class="p">;</span> +<a id="line-113" name="line-113"></a> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">op</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_mount_operation_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-115" name="line-115"></a> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="n">g_file_mount_enclosing_volume</span><span class="w"> </span><span class="p">(</span><span class="n">location</span><span class="p">,</span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">op</span><span class="p">,</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="p">(</span><span class="n">GAsyncReadyCallback</span><span class="p">)</span><span class="w"> </span><span class="n">mount_enclosing_ready_cb</span><span class="p">,</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">app</span><span class="p">);</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">op</span><span class="p">);</span> +<a id="line-122" name="line-122"></a><span class="p">}</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="k">struct</span><span class="w"> </span><span class="nc">MethodInfo</span><span class="w"> </span><span class="p">{</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">scheme</span><span class="p">;</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">flags</span><span class="p">;</span> +<a id="line-127" name="line-127"></a><span class="p">};</span> +<a id="line-128" name="line-128"></a> +<a id="line-129" name="line-129"></a><span class="cm">/* A collection of flags for MethodInfo.flags */</span> +<a id="line-130" name="line-130"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">DEFAULT_METHOD</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mh">0x00000001</span><span class="p">,</span> +<a id="line-132" name="line-132"></a> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="cm">/* Widgets to display in setup_for_type */</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">SHOW_SHARE</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mh">0x00000010</span><span class="p">,</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">SHOW_PORT</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mh">0x00000020</span><span class="p">,</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">SHOW_USER</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mh">0x00000040</span><span class="p">,</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">SHOW_DOMAIN</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mh">0x00000080</span><span class="p">,</span> +<a id="line-138" name="line-138"></a> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">IS_ANONYMOUS</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mh">0x00001000</span> +<a id="line-140" name="line-140"></a><span class="p">};</span> +<a id="line-141" name="line-141"></a> +<a id="line-142" name="line-142"></a><span class="cm">/* Remember to fill in descriptions below */</span> +<a id="line-143" name="line-143"></a><span class="k">static</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">MethodInfo</span><span class="w"> </span><span class="n">methods</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="cm">/* FIXME: we need to alias ssh to sftp */</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"sftp"</span><span class="p">,</span><span class="w"> </span><span class="n">SHOW_PORT</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">SHOW_USER</span><span class="w"> </span><span class="p">},</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ftp"</span><span class="p">,</span><span class="w"> </span><span class="n">SHOW_PORT</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">SHOW_USER</span><span class="w"> </span><span class="p">},</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ftp"</span><span class="p">,</span><span class="w"> </span><span class="n">DEFAULT_METHOD</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">IS_ANONYMOUS</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">SHOW_PORT</span><span class="p">},</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"smb"</span><span class="p">,</span><span class="w"> </span><span class="n">SHOW_SHARE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">SHOW_USER</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">SHOW_DOMAIN</span><span class="w"> </span><span class="p">},</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"dav"</span><span class="p">,</span><span class="w"> </span><span class="n">SHOW_PORT</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">SHOW_USER</span><span class="w"> </span><span class="p">},</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="cm">/* FIXME: hrm, shouldn't it work? */</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"davs"</span><span class="p">,</span><span class="w"> </span><span class="n">SHOW_PORT</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">SHOW_USER</span><span class="w"> </span><span class="p">},</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">},</span><span class="w"> </span><span class="cm">/* Custom URI method */</span> +<a id="line-153" name="line-153"></a><span class="p">};</span> +<a id="line-154" name="line-154"></a> +<a id="line-155" name="line-155"></a><span class="cm">/* To get around non constant gettext strings */</span> +<a id="line-156" name="line-156"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="o">*</span> +<a id="line-157" name="line-157"></a><span class="nf">get_method_description</span><span class="w"> </span><span class="p">(</span><span class="k">struct</span><span class="w"> </span><span class="nc">MethodInfo</span><span class="w"> </span><span class="o">*</span><span class="n">meth</span><span class="p">)</span> +<a id="line-158" name="line-158"></a><span class="p">{</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Custom Location"</span><span class="p">);</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="p">,</span><span class="w"> </span><span class="s">"sftp"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"SSH"</span><span class="p">);</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="p">,</span><span class="w"> </span><span class="s">"ftp"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">IS_ANONYMOUS</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Public FTP"</span><span class="p">);</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"FTP (with login)"</span><span class="p">);</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="p">}</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="p">,</span><span class="w"> </span><span class="s">"smb"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Windows share"</span><span class="p">);</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="p">,</span><span class="w"> </span><span class="s">"dav"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"WebDAV (HTTP)"</span><span class="p">);</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="p">,</span><span class="w"> </span><span class="s">"davs"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Secure WebDAV (HTTPS)"</span><span class="p">);</span> +<a id="line-175" name="line-175"></a> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="cm">/* No descriptive text */</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="p">;</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="p">}</span> +<a id="line-180" name="line-180"></a><span class="p">}</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-183" name="line-183"></a><span class="nf">baobab_remote_connect_dialog_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-184" name="line-184"></a><span class="p">{</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">BaobabRemoteConnectDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-186" name="line-186"></a> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_REMOTE_CONNECT_DIALOG</span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-188" name="line-188"></a> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="p">);</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="p">);</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="p">);</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">);</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="p">);</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="p">);</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">);</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="p">);</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_remote_connect_dialog_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-200" name="line-200"></a><span class="p">}</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-203" name="line-203"></a><span class="nf">connect_to_server</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRemoteConnectDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="p">)</span> +<a id="line-204" name="line-204"></a><span class="p">{</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">MethodInfo</span><span class="w"> </span><span class="o">*</span><span class="n">meth</span><span class="p">;</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">uri</span><span class="p">;</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">location</span><span class="p">;</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">index</span><span class="p">;</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-210" name="line-210"></a> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="cm">/* Get our method info */</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">gtk_combo_box_get_active_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">type_combo</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_combo_box_get_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">type_combo</span><span class="p">)),</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">index</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">index</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">methods</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">index</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">meth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&</span><span class="p">(</span><span class="n">methods</span><span class="p">[</span><span class="n">index</span><span class="p">]);</span> +<a id="line-217" name="line-217"></a> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_editable_get_chars</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="cm">/* FIXME: we should validate it in some way? */</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">user</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">port</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">initial_path</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">server</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">folder</span><span class="w"> </span><span class="p">,</span><span class="o">*</span><span class="n">domain</span><span class="w"> </span><span class="p">;</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">join</span><span class="p">;</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">free_initial_path</span><span class="p">,</span><span class="w"> </span><span class="n">free_user</span><span class="p">,</span><span class="w"> </span><span class="n">free_domain</span><span class="p">,</span><span class="w"> </span><span class="n">free_port</span><span class="p">;</span> +<a id="line-225" name="line-225"></a> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">server</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_editable_get_chars</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">server</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dlg</span><span class="p">;</span> +<a id="line-229" name="line-229"></a> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">dlg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Cannot Connect to Server. You must enter a name for the server."</span><span class="p">));</span> +<a id="line-235" name="line-235"></a> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dlg</span><span class="p">),</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Please enter a name and try again."</span><span class="p">));</span> +<a id="line-238" name="line-238"></a> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dlg</span><span class="p">));</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dlg</span><span class="p">);</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">server</span><span class="p">);</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="p">}</span> +<a id="line-245" name="line-245"></a> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">user</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">initial_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">domain</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">free_initial_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">free_user</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">free_domain</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">free_port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-254" name="line-254"></a> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="cm">/* FTP special case */</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">IS_ANONYMOUS</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">user</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"anonymous"</span><span class="p">;</span> +<a id="line-258" name="line-258"></a> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="cm">/* SMB special case */</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="p">,</span><span class="w"> </span><span class="s">"smb"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_editable_get_chars</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">initial_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="s">"/"</span><span class="p">,</span><span class="w"> </span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">free_initial_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">t</span><span class="p">);</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="p">}</span> +<a id="line-266" name="line-266"></a> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">free_port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_editable_get_chars</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="p">}</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">folder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_editable_get_chars</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">free_user</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-274" name="line-274"></a> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_editable_get_chars</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-276" name="line-276"></a> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">user</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_uri_escape_string</span><span class="w"> </span><span class="p">(</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-278" name="line-278"></a> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">t</span><span class="p">);</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="p">}</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">free_domain</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-283" name="line-283"></a> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">domain</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_editable_get_chars</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-285" name="line-285"></a> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">domain</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user</span><span class="p">;</span> +<a id="line-288" name="line-288"></a> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">user</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">domain</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="s">";"</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-290" name="line-290"></a> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">free_user</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">t</span><span class="p">);</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="p">}</span> +<a id="line-294" name="line-294"></a> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="n">free_user</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="p">}</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="p">}</span> +<a id="line-298" name="line-298"></a> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">folder</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">&&</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">folder</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'/'</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">join</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"/"</span><span class="p">;</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">join</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="p">;</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="p">}</span> +<a id="line-305" name="line-305"></a> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">folder</span><span class="p">;</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">folder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="n">initial_path</span><span class="p">,</span><span class="w"> </span><span class="n">join</span><span class="p">,</span><span class="w"> </span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">t</span><span class="p">);</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">folder</span><span class="p">;</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">folder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_uri_escape_string</span><span class="w"> </span><span class="p">(</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="n">G_URI_RESERVED_CHARS_ALLOWED_IN_PATH</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">t</span><span class="p">);</span> +<a id="line-313" name="line-313"></a> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s://%s%s%s%s%s%s"</span><span class="p">,</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="p">,</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">user</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">user</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"@"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">""</span><span class="p">,</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="n">server</span><span class="p">,</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="p">(</span><span class="n">port</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">":"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">port</span><span class="p">,</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">folder</span><span class="p">);</span> +<a id="line-320" name="line-320"></a> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">free_initial_path</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">initial_path</span><span class="p">);</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="p">}</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">server</span><span class="p">);</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">free_port</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">port</span><span class="p">);</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="p">}</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">folder</span><span class="p">);</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">free_user</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">user</span><span class="p">);</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="p">}</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">free_domain</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">domain</span><span class="p">);</span> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="p">}</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="p">}</span> +<a id="line-336" name="line-336"></a> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-338" name="line-338"></a> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">location</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_uri</span><span class="w"> </span><span class="p">(</span><span class="n">uri</span><span class="p">);</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">uri</span><span class="p">);</span> +<a id="line-341" name="line-341"></a> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">connect_server_dialog_present_uri</span><span class="w"> </span><span class="p">(</span><span class="n">app</span><span class="p">,</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">location</span><span class="p">,</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-345" name="line-345"></a><span class="p">}</span> +<a id="line-346" name="line-346"></a> +<a id="line-347" name="line-347"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-348" name="line-348"></a><span class="nf">response_callback</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRemoteConnectDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">,</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">response_id</span><span class="p">,</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">app</span><span class="p">)</span> +<a id="line-351" name="line-351"></a><span class="p">{</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">response_id</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">RESPONSE_CONNECT</span><span class="p">:</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">connect_to_server</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="n">app</span><span class="p">);</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GTK_RESPONSE_NONE</span><span class="p">:</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GTK_RESPONSE_DELETE_EVENT</span><span class="p">:</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GTK_RESPONSE_CANCEL</span><span class="p">:</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="k">default</span><span class="w"> </span><span class="o">:</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="p">}</span> +<a id="line-363" name="line-363"></a><span class="p">}</span> +<a id="line-364" name="line-364"></a> +<a id="line-365" name="line-365"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-366" name="line-366"></a><span class="nf">baobab_remote_connect_dialog_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRemoteConnectDialogClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">)</span> +<a id="line-367" name="line-367"></a><span class="p">{</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">gobject_class</span><span class="p">;</span> +<a id="line-369" name="line-369"></a> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">gobject_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="p">);</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_remote_connect_dialog_finalize</span><span class="p">;</span> +<a id="line-372" name="line-372"></a><span class="p">}</span> +<a id="line-373" name="line-373"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-374" name="line-374"></a><span class="nf">destroy_label</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-376" name="line-376"></a><span class="p">{</span> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-378" name="line-378"></a><span class="p">}</span> +<a id="line-379" name="line-379"></a> +<a id="line-380" name="line-380"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-381" name="line-381"></a><span class="nf">setup_for_type</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRemoteConnectDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-382" name="line-382"></a><span class="p">{</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">MethodInfo</span><span class="w"> </span><span class="o">*</span><span class="n">meth</span><span class="p">;</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">index</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">grid</span><span class="p">;</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-387" name="line-387"></a> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="cm">/* Get our method info */</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">gtk_combo_box_get_active_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">type_combo</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_combo_box_get_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">type_combo</span><span class="p">)),</span> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">index</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">index</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">methods</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">index</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">meth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&</span><span class="p">(</span><span class="n">methods</span><span class="p">[</span><span class="n">index</span><span class="p">]);</span> +<a id="line-394" name="line-394"></a> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">gtk_container_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">grid</span><span class="p">),</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="p">);</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="p">}</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">gtk_container_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">grid</span><span class="p">),</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="p">);</span> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="p">}</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">gtk_container_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">grid</span><span class="p">),</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="p">);</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="p">}</span> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">gtk_container_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">grid</span><span class="p">),</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">);</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="p">}</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">gtk_container_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">grid</span><span class="p">),</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="p">);</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="p">}</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="n">gtk_container_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">grid</span><span class="p">),</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">);</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="p">}</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="n">gtk_container_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">grid</span><span class="p">),</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="p">);</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="p">}</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="cm">/* Destroy all labels */</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">gtk_container_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">grid</span><span class="p">),</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">destroy_label</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-426" name="line-426"></a> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">grid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">grid</span><span class="p">;</span> +<a id="line-429" name="line-429"></a> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">scheme</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Location (URI):"</span><span class="p">));</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-436" name="line-436"></a> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="p">);</span> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="n">gtk_widget_set_hexpand</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="p">);</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-441" name="line-441"></a> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-443" name="line-443"></a> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="p">}</span> +<a id="line-446" name="line-446"></a> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Server:"</span><span class="p">));</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-452" name="line-452"></a> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="p">);</span> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="n">gtk_widget_set_hexpand</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="p">);</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-457" name="line-457"></a> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Optional information:"</span><span class="p">));</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-465" name="line-465"></a> +<a id="line-466" name="line-466"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-467" name="line-467"></a> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">SHOW_SHARE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Share:"</span><span class="p">));</span> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-474" name="line-474"></a> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="p">);</span> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="n">gtk_widget_set_hexpand</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="p">);</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-479" name="line-479"></a> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-481" name="line-481"></a><span class="w"> </span><span class="p">}</span> +<a id="line-482" name="line-482"></a> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">SHOW_PORT</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Port:"</span><span class="p">));</span> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-489" name="line-489"></a> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">);</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="n">gtk_widget_set_hexpand</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">);</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-494" name="line-494"></a> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="p">}</span> +<a id="line-497" name="line-497"></a> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Folder:"</span><span class="p">));</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-503" name="line-503"></a> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="p">);</span> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="n">gtk_widget_set_hexpand</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="p">);</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-508" name="line-508"></a> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-510" name="line-510"></a> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">SHOW_USER</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_User Name:"</span><span class="p">));</span> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-517" name="line-517"></a> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">);</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="n">gtk_widget_set_hexpand</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">);</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-522" name="line-522"></a> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="p">}</span> +<a id="line-525" name="line-525"></a> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">meth</span><span class="o">-></span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">SHOW_DOMAIN</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Domain Name:"</span><span class="p">));</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-532" name="line-532"></a> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="p">);</span> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="n">gtk_widget_set_hexpand</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-535" name="line-535"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="p">);</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-537" name="line-537"></a> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-539" name="line-539"></a><span class="w"> </span><span class="p">}</span> +<a id="line-540" name="line-540"></a><span class="p">}</span> +<a id="line-541" name="line-541"></a> +<a id="line-542" name="line-542"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-543" name="line-543"></a><span class="nf">combo_changed_callback</span><span class="w"> </span><span class="p">(</span><span class="n">GtkComboBox</span><span class="w"> </span><span class="o">*</span><span class="n">combo_box</span><span class="p">,</span> +<a id="line-544" name="line-544"></a><span class="w"> </span><span class="n">BaobabRemoteConnectDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-545" name="line-545"></a><span class="p">{</span> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="n">setup_for_type</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-547" name="line-547"></a><span class="p">}</span> +<a id="line-548" name="line-548"></a> +<a id="line-549" name="line-549"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-550" name="line-550"></a><span class="nf">port_insert_text</span><span class="w"> </span><span class="p">(</span><span class="n">GtkEditable</span><span class="w"> </span><span class="o">*</span><span class="n">editable</span><span class="p">,</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">new_text</span><span class="p">,</span> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">new_text_length</span><span class="p">,</span> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="o">*</span><span class="n">position</span><span class="p">)</span> +<a id="line-554" name="line-554"></a><span class="p">{</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">pos</span><span class="p">;</span> +<a id="line-556" name="line-556"></a> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="cm">/* Only allow digits to be inserted as port number */</span> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">pos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">pos</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">new_text_length</span><span class="p">;</span><span class="w"> </span><span class="n">pos</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_ascii_isdigit</span><span class="w"> </span><span class="p">(</span><span class="n">new_text</span><span class="p">[</span><span class="n">pos</span><span class="p">]))</span><span class="w"> </span><span class="p">{</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">toplevel</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_toplevel</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">editable</span><span class="p">));</span> +<a id="line-561" name="line-561"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">toplevel</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">gdk_window_beep</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">toplevel</span><span class="p">));</span> +<a id="line-563" name="line-563"></a><span class="w"> </span><span class="p">}</span> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="n">g_signal_stop_emission_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">editable</span><span class="p">,</span><span class="w"> </span><span class="s">"insert_text"</span><span class="p">);</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-566" name="line-566"></a><span class="w"> </span><span class="p">}</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="p">}</span> +<a id="line-568" name="line-568"></a><span class="p">}</span> +<a id="line-569" name="line-569"></a> +<a id="line-570" name="line-570"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-571" name="line-571"></a><span class="nf">baobab_remote_connect_dialog_init</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRemoteConnectDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-572" name="line-572"></a><span class="p">{</span> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="p">;</span> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">grid</span><span class="p">;</span> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">combo</span><span class="p">;</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hbox</span><span class="p">;</span> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">vbox</span><span class="p">;</span> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">;</span> +<a id="line-579" name="line-579"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="n">renderer</span><span class="p">;</span> +<a id="line-580" name="line-580"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-581" name="line-581"></a> +<a id="line-582" name="line-582"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new0</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRemoteConnectDialogDetails</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-583" name="line-583"></a> +<a id="line-584" name="line-584"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Connect to Server"</span><span class="p">));</span> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-587" name="line-587"></a><span class="w"> </span><span class="n">gtk_window_set_resizable</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-588" name="line-588"></a> +<a id="line-589" name="line-589"></a><span class="w"> </span><span class="n">vbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-590" name="line-590"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-591" name="line-591"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="n">vbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-593" name="line-593"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">);</span> +<a id="line-594" name="line-594"></a> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-596" name="line-596"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">);</span> +<a id="line-599" name="line-599"></a> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Service _type:"</span><span class="p">));</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-602" name="line-602"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-606" name="line-606"></a> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">type_combo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">combo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_combo_box_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-608" name="line-608"></a> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="cm">/* each row contains: method index, textual description */</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_list_store_new</span><span class="w"> </span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_INT</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">);</span> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="n">gtk_combo_box_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">combo</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">));</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">));</span> +<a id="line-613" name="line-613"></a> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="n">gtk_cell_layout_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CELL_LAYOUT</span><span class="w"> </span><span class="p">(</span><span class="n">combo</span><span class="p">),</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="n">gtk_cell_layout_add_attribute</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CELL_LAYOUT</span><span class="w"> </span><span class="p">(</span><span class="n">combo</span><span class="p">),</span><span class="w"> </span><span class="n">renderer</span><span class="p">,</span><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-617" name="line-617"></a> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">methods</span><span class="p">);</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="o">*</span><span class="n">supported</span><span class="p">;</span> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">j</span><span class="p">;</span> +<a id="line-622" name="line-622"></a> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="cm">/* skip methods that don't have corresponding MateVFSMethods */</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="n">supported</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_vfs_get_supported_uri_schemes</span><span class="w"> </span><span class="p">(</span><span class="n">g_vfs_get_default</span><span class="w"> </span><span class="p">());</span> +<a id="line-625" name="line-625"></a> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">methods</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">scheme</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">found</span><span class="p">;</span> +<a id="line-628" name="line-628"></a> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">j</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">supported</span><span class="p">[</span><span class="n">j</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">j</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">methods</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">scheme</span><span class="p">,</span><span class="w"> </span><span class="n">supported</span><span class="p">[</span><span class="n">j</span><span class="p">])</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="p">}</span> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="p">}</span> +<a id="line-636" name="line-636"></a> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">found</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="p">}</span> +<a id="line-640" name="line-640"></a><span class="w"> </span><span class="p">}</span> +<a id="line-641" name="line-641"></a> +<a id="line-642" name="line-642"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">get_method_description</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="p">(</span><span class="n">methods</span><span class="p">[</span><span class="n">i</span><span class="p">])),</span> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-647" name="line-647"></a> +<a id="line-648" name="line-648"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">methods</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">DEFAULT_METHOD</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="n">gtk_combo_box_set_active_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">combo</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="p">}</span> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="p">}</span> +<a id="line-652" name="line-652"></a> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_combo_box_get_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">combo</span><span class="p">))</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="cm">/* default method not available, use any other */</span> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="n">gtk_combo_box_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">combo</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="p">}</span> +<a id="line-657" name="line-657"></a> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">combo</span><span class="p">);</span> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">combo</span><span class="p">);</span> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="n">combo</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">combo</span><span class="p">,</span><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">combo_changed_callback</span><span class="p">),</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-665" name="line-665"></a> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">);</span> +<a id="line-670" name="line-670"></a> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="s">" "</span><span class="p">);</span> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-675" name="line-675"></a> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">grid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">grid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_grid_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="n">gtk_grid_set_row_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="n">gtk_grid_set_column_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"> </span><span class="mi">12</span><span class="p">);</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">);</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="n">grid</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-682" name="line-682"></a> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="p">();</span> +<a id="line-684" name="line-684"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">,</span><span class="w"> </span><span class="s">"insert_text"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">port_insert_text</span><span class="p">),</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-692" name="line-692"></a> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="n">gtk_entry_set_activates_default</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-694" name="line-694"></a><span class="w"> </span><span class="n">gtk_entry_set_activates_default</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-695" name="line-695"></a><span class="w"> </span><span class="n">gtk_entry_set_activates_default</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="n">gtk_entry_set_activates_default</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-697" name="line-697"></a><span class="w"> </span><span class="n">gtk_entry_set_activates_default</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="n">gtk_entry_set_activates_default</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="n">gtk_entry_set_activates_default</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-700" name="line-700"></a> +<a id="line-701" name="line-701"></a><span class="w"> </span><span class="cm">/* We need an extra ref so we can remove them from the table */</span> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">uri_entry</span><span class="p">);</span> +<a id="line-703" name="line-703"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">server_entry</span><span class="p">);</span> +<a id="line-704" name="line-704"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">share_entry</span><span class="p">);</span> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">port_entry</span><span class="p">);</span> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">folder_entry</span><span class="p">);</span> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">domain_entry</span><span class="p">);</span> +<a id="line-708" name="line-708"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">details</span><span class="o">-></span><span class="n">user_entry</span><span class="p">);</span> +<a id="line-709" name="line-709"></a> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="n">setup_for_type</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-711" name="line-711"></a> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="n">gtk_dialog_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="s">"gtk-cancel"</span><span class="p">,</span> +<a id="line-714" name="line-714"></a><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">);</span> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="n">gtk_dialog_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-716" name="line-716"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Scan"</span><span class="p">),</span> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="n">RESPONSE_CONNECT</span><span class="p">);</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="n">gtk_dialog_set_default_response</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="n">RESPONSE_CONNECT</span><span class="p">);</span> +<a id="line-720" name="line-720"></a><span class="p">}</span> +<a id="line-721" name="line-721"></a> +<a id="line-722" name="line-722"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-723" name="line-723"></a><span class="nf">baobab_remote_connect_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">location</span><span class="p">)</span> +<a id="line-724" name="line-724"></a><span class="p">{</span> +<a id="line-725" name="line-725"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-726" name="line-726"></a> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_new</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_TYPE_REMOTE_CONNECT_DIALOG</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-728" name="line-728"></a> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="n">gtk_window_set_transient_for</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-730" name="line-730"></a> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">response_callback</span><span class="p">),</span> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-734" name="line-734"></a> +<a id="line-735" name="line-735"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="n">gtk_window_set_screen</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="n">gtk_window_get_screen</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">)));</span> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="p">}</span> +<a id="line-739" name="line-739"></a> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-741" name="line-741"></a><span class="p">}</span> +<a id="line-742" name="line-742"></a> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/20.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/20.html new file mode 100644 index 00000000..0c6f8f06 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/20.html @@ -0,0 +1,2139 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: logview/src/logview-log.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> logview-log.c</p> +<a href="20.html#line-80"> unusedStructMember 80</a><a href="20.html#line-81"> unusedStructMember 81</a><a href="20.html#line-82"> unusedStructMember 82</a><a href="20.html#line-85"> unusedStructMember 85</a><a href="20.html#line-95"> variableScope 95</a><a href="20.html#line-199"> variableScope 199</a><a href="20.html#line-200"> variableScope 200</a><a href="20.html#line-535"> variableScope 535</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span> +<span class="normal">533</span> +<span class="normal">534</span> +<span class="normal">535</span> +<span class="normal">536</span> +<span class="normal">537</span> +<span class="normal">538</span> +<span class="normal">539</span> +<span class="normal">540</span> +<span class="normal">541</span> +<span class="normal">542</span> +<span class="normal">543</span> +<span class="normal">544</span> +<span class="normal">545</span> +<span class="normal">546</span> +<span class="normal">547</span> +<span class="normal">548</span> +<span class="normal">549</span> +<span class="normal">550</span> +<span class="normal">551</span> +<span class="normal">552</span> +<span class="normal">553</span> +<span class="normal">554</span> +<span class="normal">555</span> +<span class="normal">556</span> +<span class="normal">557</span> +<span class="normal">558</span> +<span class="normal">559</span> +<span class="normal">560</span> +<span class="normal">561</span> +<span class="normal">562</span> +<span class="normal">563</span> +<span class="normal">564</span> +<span class="normal">565</span> +<span class="normal">566</span> +<span class="normal">567</span> +<span class="normal">568</span> +<span class="normal">569</span> +<span class="normal">570</span> +<span class="normal">571</span> +<span class="normal">572</span> +<span class="normal">573</span> +<span class="normal">574</span> +<span class="normal">575</span> +<span class="normal">576</span> +<span class="normal">577</span> +<span class="normal">578</span> +<span class="normal">579</span> +<span class="normal">580</span> +<span class="normal">581</span> +<span class="normal">582</span> +<span class="normal">583</span> +<span class="normal">584</span> +<span class="normal">585</span> +<span class="normal">586</span> +<span class="normal">587</span> +<span class="normal">588</span> +<span class="normal">589</span> +<span class="normal">590</span> +<span class="normal">591</span> +<span class="normal">592</span> +<span class="normal">593</span> +<span class="normal">594</span> +<span class="normal">595</span> +<span class="normal">596</span> +<span class="normal">597</span> +<span class="normal">598</span> +<span class="normal">599</span> +<span class="normal">600</span> +<span class="normal">601</span> +<span class="normal">602</span> +<span class="normal">603</span> +<span class="normal">604</span> +<span class="normal">605</span> +<span class="normal">606</span> +<span class="normal">607</span> +<span class="normal">608</span> +<span class="normal">609</span> +<span class="normal">610</span> +<span class="normal">611</span> +<span class="normal">612</span> +<span class="normal">613</span> +<span class="normal">614</span> +<span class="normal">615</span> +<span class="normal">616</span> +<span class="normal">617</span> +<span class="normal">618</span> +<span class="normal">619</span> +<span class="normal">620</span> +<span class="normal">621</span> +<span class="normal">622</span> +<span class="normal">623</span> +<span class="normal">624</span> +<span class="normal">625</span> +<span class="normal">626</span> +<span class="normal">627</span> +<span class="normal">628</span> +<span class="normal">629</span> +<span class="normal">630</span> +<span class="normal">631</span> +<span class="normal">632</span> +<span class="normal">633</span> +<span class="normal">634</span> +<span class="normal">635</span> +<span class="normal">636</span> +<span class="normal">637</span> +<span class="normal">638</span> +<span class="normal">639</span> +<span class="normal">640</span> +<span class="normal">641</span> +<span class="normal">642</span> +<span class="normal">643</span> +<span class="normal">644</span> +<span class="normal">645</span> +<span class="normal">646</span> +<span class="normal">647</span> +<span class="normal">648</span> +<span class="normal">649</span> +<span class="normal">650</span> +<span class="normal">651</span> +<span class="normal">652</span> +<span class="normal">653</span> +<span class="normal">654</span> +<span class="normal">655</span> +<span class="normal">656</span> +<span class="normal">657</span> +<span class="normal">658</span> +<span class="normal">659</span> +<span class="normal">660</span> +<span class="normal">661</span> +<span class="normal">662</span> +<span class="normal">663</span> +<span class="normal">664</span> +<span class="normal">665</span> +<span class="normal">666</span> +<span class="normal">667</span> +<span class="normal">668</span> +<span class="normal">669</span> +<span class="normal">670</span> +<span class="normal">671</span> +<span class="normal">672</span> +<span class="normal">673</span> +<span class="normal">674</span> +<span class="normal">675</span> +<span class="normal">676</span> +<span class="normal">677</span> +<span class="normal">678</span> +<span class="normal">679</span> +<span class="normal">680</span> +<span class="normal">681</span> +<span class="normal">682</span> +<span class="normal">683</span> +<span class="normal">684</span> +<span class="normal">685</span> +<span class="normal">686</span> +<span class="normal">687</span> +<span class="normal">688</span> +<span class="normal">689</span> +<span class="normal">690</span> +<span class="normal">691</span> +<span class="normal">692</span> +<span class="normal">693</span> +<span class="normal">694</span> +<span class="normal">695</span> +<span class="normal">696</span> +<span class="normal">697</span> +<span class="normal">698</span> +<span class="normal">699</span> +<span class="normal">700</span> +<span class="normal">701</span> +<span class="normal">702</span> +<span class="normal">703</span> +<span class="normal">704</span> +<span class="normal">705</span> +<span class="normal">706</span> +<span class="normal">707</span> +<span class="normal">708</span> +<span class="normal">709</span> +<span class="normal">710</span> +<span class="normal">711</span> +<span class="normal">712</span> +<span class="normal">713</span> +<span class="normal">714</span> +<span class="normal">715</span> +<span class="normal">716</span> +<span class="normal">717</span> +<span class="normal">718</span> +<span class="normal">719</span> +<span class="normal">720</span> +<span class="normal">721</span> +<span class="normal">722</span> +<span class="normal">723</span> +<span class="normal">724</span> +<span class="normal">725</span> +<span class="normal">726</span> +<span class="normal">727</span> +<span class="normal">728</span> +<span class="normal">729</span> +<span class="normal">730</span> +<span class="normal">731</span> +<span class="normal">732</span> +<span class="normal">733</span> +<span class="normal">734</span> +<span class="normal">735</span> +<span class="normal">736</span> +<span class="normal">737</span> +<span class="normal">738</span> +<span class="normal">739</span> +<span class="normal">740</span> +<span class="normal">741</span> +<span class="normal">742</span> +<span class="normal">743</span> +<span class="normal">744</span> +<span class="normal">745</span> +<span class="normal">746</span> +<span class="normal">747</span> +<span class="normal">748</span> +<span class="normal">749</span> +<span class="normal">750</span> +<span class="normal">751</span> +<span class="normal">752</span> +<span class="normal">753</span> +<span class="normal">754</span> +<span class="normal">755</span> +<span class="normal">756</span> +<span class="normal">757</span> +<span class="normal">758</span> +<span class="normal">759</span> +<span class="normal">760</span> +<span class="normal">761</span> +<span class="normal">762</span> +<span class="normal">763</span> +<span class="normal">764</span> +<span class="normal">765</span> +<span class="normal">766</span> +<span class="normal">767</span> +<span class="normal">768</span> +<span class="normal">769</span> +<span class="normal">770</span> +<span class="normal">771</span> +<span class="normal">772</span> +<span class="normal">773</span> +<span class="normal">774</span> +<span class="normal">775</span> +<span class="normal">776</span> +<span class="normal">777</span> +<span class="normal">778</span> +<span class="normal">779</span> +<span class="normal">780</span> +<span class="normal">781</span> +<span class="normal">782</span> +<span class="normal">783</span> +<span class="normal">784</span> +<span class="normal">785</span> +<span class="normal">786</span> +<span class="normal">787</span> +<span class="normal">788</span> +<span class="normal">789</span> +<span class="normal">790</span> +<span class="normal">791</span> +<span class="normal">792</span> +<span class="normal">793</span> +<span class="normal">794</span> +<span class="normal">795</span> +<span class="normal">796</span> +<span class="normal">797</span> +<span class="normal">798</span> +<span class="normal">799</span> +<span class="normal">800</span> +<span class="normal">801</span> +<span class="normal">802</span> +<span class="normal">803</span> +<span class="normal">804</span> +<span class="normal">805</span> +<span class="normal">806</span> +<span class="normal">807</span> +<span class="normal">808</span> +<span class="normal">809</span> +<span class="normal">810</span> +<span class="normal">811</span> +<span class="normal">812</span> +<span class="normal">813</span> +<span class="normal">814</span> +<span class="normal">815</span> +<span class="normal">816</span> +<span class="normal">817</span> +<span class="normal">818</span> +<span class="normal">819</span> +<span class="normal">820</span> +<span class="normal">821</span> +<span class="normal">822</span> +<span class="normal">823</span> +<span class="normal">824</span> +<span class="normal">825</span> +<span class="normal">826</span> +<span class="normal">827</span> +<span class="normal">828</span> +<span class="normal">829</span> +<span class="normal">830</span> +<span class="normal">831</span> +<span class="normal">832</span> +<span class="normal">833</span> +<span class="normal">834</span> +<span class="normal">835</span> +<span class="normal">836</span> +<span class="normal">837</span> +<span class="normal">838</span> +<span class="normal">839</span> +<span class="normal">840</span> +<span class="normal">841</span> +<span class="normal">842</span> +<span class="normal">843</span> +<span class="normal">844</span> +<span class="normal">845</span> +<span class="normal">846</span> +<span class="normal">847</span> +<span class="normal">848</span> +<span class="normal">849</span> +<span class="normal">850</span> +<span class="normal">851</span> +<span class="normal">852</span> +<span class="normal">853</span> +<span class="normal">854</span> +<span class="normal">855</span> +<span class="normal">856</span> +<span class="normal">857</span> +<span class="normal">858</span> +<span class="normal">859</span> +<span class="normal">860</span> +<span class="normal">861</span> +<span class="normal">862</span> +<span class="normal">863</span> +<span class="normal">864</span> +<span class="normal">865</span> +<span class="normal">866</span> +<span class="normal">867</span> +<span class="normal">868</span> +<span class="normal">869</span> +<span class="normal">870</span> +<span class="normal">871</span> +<span class="normal">872</span> +<span class="normal">873</span> +<span class="normal">874</span> +<span class="normal">875</span> +<span class="normal">876</span> +<span class="normal">877</span> +<span class="normal">878</span> +<span class="normal">879</span> +<span class="normal">880</span> +<span class="normal">881</span> +<span class="normal">882</span> +<span class="normal">883</span> +<span class="normal">884</span> +<span class="normal">885</span> +<span class="normal">886</span> +<span class="normal">887</span> +<span class="normal">888</span> +<span class="normal">889</span> +<span class="normal">890</span> +<span class="normal">891</span> +<span class="normal">892</span> +<span class="normal">893</span> +<span class="normal">894</span> +<span class="normal">895</span> +<span class="normal">896</span> +<span class="normal">897</span> +<span class="normal">898</span> +<span class="normal">899</span> +<span class="normal">900</span> +<span class="normal">901</span> +<span class="normal">902</span> +<span class="normal">903</span> +<span class="normal">904</span> +<span class="normal">905</span> +<span class="normal">906</span> +<span class="normal">907</span> +<span class="normal">908</span> +<span class="normal">909</span> +<span class="normal">910</span> +<span class="normal">911</span> +<span class="normal">912</span> +<span class="normal">913</span> +<span class="normal">914</span> +<span class="normal">915</span> +<span class="normal">916</span> +<span class="normal">917</span> +<span class="normal">918</span> +<span class="normal">919</span> +<span class="normal">920</span> +<span class="normal">921</span> +<span class="normal">922</span> +<span class="normal">923</span> +<span class="normal">924</span> +<span class="normal">925</span> +<span class="normal">926</span> +<span class="normal">927</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) 1998 Cesar Miquel <[email protected]></span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2008 Cosimo Cecchi <[email protected]></span> +<a id="line-4" name="line-4"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-7" name="line-7"></a><span class="cm"> *</span> +<a id="line-8" name="line-8"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-9" name="line-9"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-10" name="line-10"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-11" name="line-11"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-12" name="line-12"></a><span class="cm"> *</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-14" name="line-14"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-15" name="line-15"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-16" name="line-16"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-17" name="line-17"></a><span class="cm"> *</span> +<a id="line-18" name="line-18"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-19" name="line-19"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-20" name="line-20"></a><span class="cm"> */</span> +<a id="line-21" name="line-21"></a> +<a id="line-22" name="line-22"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-23" name="line-23"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-24" name="line-24"></a><span class="cp">#endif</span> +<a id="line-25" name="line-25"></a> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-29" name="line-29"></a> +<a id="line-30" name="line-30"></a><span class="cp">#ifdef HAVE_ZLIB</span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><zlib.h></span> +<a id="line-32" name="line-32"></a><span class="cp">#endif</span> +<a id="line-33" name="line-33"></a> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-log.h"</span> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-utils.h"</span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-38" name="line-38"></a><span class="w"> </span><span class="n">LOG_CHANGED</span><span class="p">,</span> +<a id="line-39" name="line-39"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-40" name="line-40"></a><span class="p">};</span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">signals</span><span class="w"> </span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_LogviewLogPrivate</span><span class="w"> </span><span class="p">{</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="cm">/* file and monitor */</span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="n">GFileMonitor</span><span class="w"> </span><span class="o">*</span><span class="n">mon</span><span class="p">;</span> +<a id="line-48" name="line-48"></a> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="cm">/* stats about the file */</span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="kt">time_t</span><span class="w"> </span><span class="n">file_time</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">goffset</span><span class="w"> </span><span class="n">file_size</span><span class="p">;</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">display_name</span><span class="p">;</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">has_days</span><span class="p">;</span> +<a id="line-54" name="line-54"></a> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="cm">/* lines and relative days */</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">days</span><span class="p">;</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">lines</span><span class="p">;</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">lines_no</span><span class="p">;</span> +<a id="line-59" name="line-59"></a> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="cm">/* stream poiting to the log */</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">GDataInputStream</span><span class="w"> </span><span class="o">*</span><span class="n">stream</span><span class="p">;</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">has_new_lines</span><span class="p">;</span> +<a id="line-63" name="line-63"></a><span class="p">};</span> +<a id="line-64" name="line-64"></a> +<a id="line-65" name="line-65"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">;</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">LogviewCreateCallback</span><span class="w"> </span><span class="n">callback</span><span class="p">;</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-69" name="line-69"></a><span class="p">}</span><span class="w"> </span><span class="n">LoadJob</span><span class="p">;</span> +<a id="line-70" name="line-70"></a> +<a id="line-71" name="line-71"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">;</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="p">;</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">new_days</span><span class="p">;</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">LogviewNewLinesCallback</span><span class="w"> </span><span class="n">callback</span><span class="p">;</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-77" name="line-77"></a><span class="p">}</span><span class="w"> </span><span class="n">NewLinesJob</span><span class="p">;</span> +<a id="line-78" name="line-78"></a> +<a id="line-79" name="line-79"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-80" name="line-80"></a><span class="hll"><span class="w"> </span><span class="n">GInputStream</span><span class="w"> </span><span class="o">*</span><span class="n">parent_str</span><span class="p">;</span><span class="error2"><--- struct member 'GZHandle::parent_str' is never used.</span> +</span><a id="line-81" name="line-81"></a><span class="hll"><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">buffer</span><span class="p">;</span><span class="error2"><--- struct member 'GZHandle::buffer' is never used.</span> +</span><a id="line-82" name="line-82"></a><span class="hll"><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span><span class="error2"><--- struct member 'GZHandle::file' is never used.</span> +</span><a id="line-83" name="line-83"></a> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">last_str_result</span><span class="p">;</span> +<a id="line-85" name="line-85"></a><span class="hll"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">last_z_result</span><span class="p">;</span><span class="error2"><--- struct member 'GZHandle::last_z_result' is never used.</span> +</span><a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">z_stream</span><span class="w"> </span><span class="n">zstream</span><span class="p">;</span> +<a id="line-87" name="line-87"></a><span class="p">}</span><span class="w"> </span><span class="n">GZHandle</span><span class="p">;</span> +<a id="line-88" name="line-88"></a> +<a id="line-89" name="line-89"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="p">,</span><span class="w"> </span><span class="n">logview_log</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_OBJECT</span><span class="p">);</span> +<a id="line-90" name="line-90"></a> +<a id="line-91" name="line-91"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-92" name="line-92"></a><span class="nf">do_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">obj</span><span class="p">)</span> +<a id="line-93" name="line-93"></a><span class="p">{</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> +<a id="line-95" name="line-95"></a><span class="hll"><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">lines</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'lines' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'lines' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-96" name="line-96"></a> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">stream</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">stream</span><span class="p">);</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">stream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="p">}</span> +<a id="line-101" name="line-101"></a> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file</span><span class="p">);</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="p">}</span> +<a id="line-106" name="line-106"></a> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">mon</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">mon</span><span class="p">);</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">mon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="p">}</span> +<a id="line-111" name="line-111"></a> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">days</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">g_slist_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">days</span><span class="p">,</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">logview_utils_day_free</span><span class="p">);</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="p">}</span> +<a id="line-117" name="line-117"></a> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="p">);</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="p">}</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">logview_log_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> +<a id="line-125" name="line-125"></a><span class="p">}</span> +<a id="line-126" name="line-126"></a> +<a id="line-127" name="line-127"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-128" name="line-128"></a><span class="nf">logview_log_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLogClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-129" name="line-129"></a><span class="p">{</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">object_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-131" name="line-131"></a> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="n">object_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">do_finalize</span><span class="p">;</span> +<a id="line-133" name="line-133"></a> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LOG_CHANGED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"log-changed"</span><span class="p">,</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">),</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLogClass</span><span class="p">,</span><span class="w"> </span><span class="n">log_changed</span><span class="p">),</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-141" name="line-141"></a><span class="p">}</span> +<a id="line-142" name="line-142"></a> +<a id="line-143" name="line-143"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-144" name="line-144"></a><span class="nf">logview_log_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">self</span><span class="p">)</span> +<a id="line-145" name="line-145"></a><span class="p">{</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_log_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">self</span><span class="p">);</span> +<a id="line-147" name="line-147"></a> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines_no</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">mon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_new_lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-155" name="line-155"></a><span class="p">}</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-158" name="line-158"></a><span class="nf">monitor_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GFileMonitor</span><span class="w"> </span><span class="o">*</span><span class="n">monitor</span><span class="p">,</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">,</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">unused</span><span class="p">,</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">GFileMonitorEvent</span><span class="w"> </span><span class="n">event</span><span class="p">,</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-163" name="line-163"></a><span class="p">{</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-165" name="line-165"></a> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_FILE_MONITOR_EVENT_CHANGED</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_new_lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LOG_CHANGED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="p">}</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="cm">/* TODO: handle the case where the log is deleted? */</span> +<a id="line-171" name="line-171"></a><span class="p">}</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-174" name="line-174"></a><span class="nf">setup_file_monitor</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-175" name="line-175"></a><span class="p">{</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-177" name="line-177"></a> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">mon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_monitor</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file</span><span class="p">,</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="cm">/* it'd be strange to get this error at this point but whatever */</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Impossible to monitor the log file: the changes won't be notified"</span><span class="p">);</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">);</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="p">}</span> +<a id="line-186" name="line-186"></a> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="cm">/* set the rate to 1sec, as I guess it's not unusual to have more than</span> +<a id="line-188" name="line-188"></a><span class="cm"> * one line written consequently or in a short time, being a log file.</span> +<a id="line-189" name="line-189"></a><span class="cm"> */</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">g_file_monitor_set_rate_limit</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">mon</span><span class="p">,</span><span class="w"> </span><span class="mi">1000</span><span class="p">);</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">mon</span><span class="p">,</span><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">monitor_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-193" name="line-193"></a><span class="p">}</span> +<a id="line-194" name="line-194"></a> +<a id="line-195" name="line-195"></a><span class="k">static</span><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span> +<a id="line-196" name="line-196"></a><span class="nf">add_new_days_to_cache</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">new_lines</span><span class="p">,</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">lines_offset</span><span class="p">)</span> +<a id="line-197" name="line-197"></a><span class="p">{</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">new_days</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">last_cached</span><span class="p">;</span> +<a id="line-199" name="line-199"></a><span class="hll"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">res</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'res' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'res' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-200" name="line-200"></a><span class="hll"><span class="w"> </span><span class="n">Day</span><span class="w"> </span><span class="o">*</span><span class="n">day</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">last</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'day' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'day' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">new_days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">log_read_dates</span><span class="w"> </span><span class="p">(</span><span class="n">new_lines</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file_time</span><span class="p">);</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="cm">/* the days are stored in chronological order, so we compare the last cached</span> +<a id="line-205" name="line-205"></a><span class="cm"> * one with the new we got.</span> +<a id="line-206" name="line-206"></a><span class="cm"> */</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">last_cached</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_last</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">days</span><span class="p">);</span> +<a id="line-208" name="line-208"></a> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">last_cached</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="cm">/* this means the day list is empty (i.e. we're on the first read */</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_utils_day_list_copy</span><span class="w"> </span><span class="p">(</span><span class="n">new_days</span><span class="p">);</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">new_days</span><span class="p">;</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="p">}</span> +<a id="line-214" name="line-214"></a> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">new_days</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">days_compare</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="n">last_cached</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">day</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-218" name="line-218"></a> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="cm">/* this day in the list is newer than the last one, append to</span> +<a id="line-221" name="line-221"></a><span class="cm"> * the cache.</span> +<a id="line-222" name="line-222"></a><span class="cm"> */</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">day</span><span class="o">-></span><span class="n">first_line</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">lines_offset</span><span class="p">;</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">day</span><span class="o">-></span><span class="n">last_line</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">lines_offset</span><span class="p">;</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_append</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">days</span><span class="p">,</span><span class="w"> </span><span class="n">logview_utils_day_copy</span><span class="w"> </span><span class="p">(</span><span class="n">day</span><span class="p">));</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">last</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">last_cached</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-228" name="line-228"></a> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="cm">/* update the lines number */</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">last</span><span class="o">-></span><span class="n">last_line</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">day</span><span class="o">-></span><span class="n">last_line</span><span class="p">;</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="p">}</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="p">}</span> +<a id="line-233" name="line-233"></a> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">new_days</span><span class="p">;</span> +<a id="line-235" name="line-235"></a><span class="p">}</span> +<a id="line-236" name="line-236"></a> +<a id="line-237" name="line-237"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-238" name="line-238"></a><span class="nf">new_lines_job_done</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">source_object</span><span class="p">,</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">GAsyncResult</span><span class="w"> </span><span class="o">*</span><span class="n">res</span><span class="p">,</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-241" name="line-241"></a><span class="p">{</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">NewLinesJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">g_autoptr</span><span class="p">(</span><span class="n">GError</span><span class="p">)</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-245" name="line-245"></a> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_task_propagate_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">G_TASK</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">ret</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">callback</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">user_data</span><span class="p">);</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">callback</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">new_days</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">user_data</span><span class="p">);</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="p">}</span> +<a id="line-252" name="line-252"></a> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">g_slist_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">new_days</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">logview_utils_day_free</span><span class="p">);</span> +<a id="line-254" name="line-254"></a> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="cm">/* drop the reference we acquired before */</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">log</span><span class="p">);</span> +<a id="line-257" name="line-257"></a> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">NewLinesJob</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="p">);</span> +<a id="line-259" name="line-259"></a><span class="p">}</span> +<a id="line-260" name="line-260"></a> +<a id="line-261" name="line-261"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-262" name="line-262"></a><span class="nf">do_read_new_lines</span><span class="w"> </span><span class="p">(</span><span class="n">GTask</span><span class="w"> </span><span class="o">*</span><span class="n">task</span><span class="p">,</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">source_object</span><span class="p">,</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">,</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">GCancellable</span><span class="w"> </span><span class="o">*</span><span class="n">cancellable</span><span class="p">)</span> +<a id="line-266" name="line-266"></a><span class="p">{</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="cm">/* this runs in a separate thread */</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">NewLinesJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">log</span><span class="p">;</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">line</span><span class="p">;</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">lines</span><span class="p">;</span> +<a id="line-273" name="line-273"></a> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">stream</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-276" name="line-276"></a> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="p">}</span> +<a id="line-281" name="line-281"></a> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines</span><span class="p">;</span> +<a id="line-283" name="line-283"></a> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="cm">/* remove the NULL-terminator */</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">g_ptr_array_remove_index</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="n">lines</span><span class="o">-></span><span class="n">len</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-286" name="line-286"></a> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_data_input_stream_read_line</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">stream</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">cancellable</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">))</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="p">{</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">line</span><span class="p">);</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="p">}</span> +<a id="line-292" name="line-292"></a> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="cm">/* NULL-terminate the array again */</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-295" name="line-295"></a> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">g_task_return_error</span><span class="w"> </span><span class="p">(</span><span class="n">task</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="p">);</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="p">}</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_new_lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="cm">/* we'll return only the new lines in the callback */</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">lines</span><span class="o">-></span><span class="n">pdata</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines_no</span><span class="p">;</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="cm">/* save the new number of days and lines */</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">new_days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">add_new_days_to_cache</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines_no</span><span class="p">);</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines_no</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="o">-></span><span class="n">len</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-308" name="line-308"></a> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">g_task_return_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">task</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-310" name="line-310"></a><span class="p">}</span> +<a id="line-311" name="line-311"></a> +<a id="line-312" name="line-312"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-313" name="line-313"></a><span class="nf">log_load_done</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">source_object</span><span class="p">,</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">GAsyncResult</span><span class="w"> </span><span class="o">*</span><span class="n">res</span><span class="p">,</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-316" name="line-316"></a><span class="p">{</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="n">LoadJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">g_autoptr</span><span class="p">(</span><span class="n">GError</span><span class="p">)</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-320" name="line-320"></a> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_task_propagate_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">G_TASK</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-322" name="line-322"></a> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">ret</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">log</span><span class="p">);</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">callback</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">user_data</span><span class="p">);</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">callback</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">user_data</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">setup_file_monitor</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">log</span><span class="p">);</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="p">}</span> +<a id="line-330" name="line-330"></a> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">LoadJob</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="p">);</span> +<a id="line-332" name="line-332"></a> +<a id="line-333" name="line-333"></a><span class="p">}</span> +<a id="line-334" name="line-334"></a> +<a id="line-335" name="line-335"></a><span class="cp">#ifdef HAVE_ZLIB</span> +<a id="line-336" name="line-336"></a> +<a id="line-337" name="line-337"></a><span class="cm">/* GZip functions adapted for GIO from mate-vfs/gzip-method.c */</span> +<a id="line-338" name="line-338"></a> +<a id="line-339" name="line-339"></a><span class="cp">#define Z_BUFSIZE 16384</span> +<a id="line-340" name="line-340"></a> +<a id="line-341" name="line-341"></a><span class="cp">#define GZIP_HEADER_SIZE 10</span> +<a id="line-342" name="line-342"></a><span class="cp">#define GZIP_MAGIC_1 0x1f</span> +<a id="line-343" name="line-343"></a><span class="cp">#define GZIP_MAGIC_2 0x8b</span> +<a id="line-344" name="line-344"></a><span class="cp">#define GZIP_FLAG_ASCII 0x01 </span><span class="cm">/* bit 0 set: file probably ascii text */</span> +<a id="line-345" name="line-345"></a><span class="cp">#define GZIP_FLAG_HEAD_CRC 0x02 </span><span class="cm">/* bit 1 set: header CRC present */</span> +<a id="line-346" name="line-346"></a><span class="cp">#define GZIP_FLAG_EXTRA_FIELD 0x04 </span><span class="cm">/* bit 2 set: extra field present */</span> +<a id="line-347" name="line-347"></a><span class="cp">#define GZIP_FLAG_ORIG_NAME 0x08 </span><span class="cm">/* bit 3 set: original file name present */</span> +<a id="line-348" name="line-348"></a><span class="cp">#define GZIP_FLAG_COMMENT 0x10 </span><span class="cm">/* bit 4 set: file comment present */</span> +<a id="line-349" name="line-349"></a><span class="cp">#define GZIP_FLAG_RESERVED 0xE0 </span><span class="cm">/* bits 5..7: reserved */</span> +<a id="line-350" name="line-350"></a> +<a id="line-351" name="line-351"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-352" name="line-352"></a><span class="nf">skip_string</span><span class="w"> </span><span class="p">(</span><span class="n">GInputStream</span><span class="w"> </span><span class="o">*</span><span class="n">is</span><span class="p">)</span> +<a id="line-353" name="line-353"></a><span class="p">{</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="n">c</span><span class="p">;</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">gssize</span><span class="w"> </span><span class="n">bytes_read</span><span class="p">;</span> +<a id="line-356" name="line-356"></a> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">{</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">bytes_read</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_input_stream_read</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">c</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-359" name="line-359"></a> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">bytes_read</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="p">}</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">c</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-364" name="line-364"></a> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-366" name="line-366"></a><span class="p">}</span> +<a id="line-367" name="line-367"></a> +<a id="line-368" name="line-368"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-369" name="line-369"></a><span class="nf">read_gzip_header</span><span class="w"> </span><span class="p">(</span><span class="n">GInputStream</span><span class="w"> </span><span class="o">*</span><span class="n">is</span><span class="p">,</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="kt">time_t</span><span class="w"> </span><span class="o">*</span><span class="n">modification_time</span><span class="p">)</span> +<a id="line-371" name="line-371"></a><span class="p">{</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="n">buffer</span><span class="p">[</span><span class="n">GZIP_HEADER_SIZE</span><span class="p">];</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">gssize</span><span class="w"> </span><span class="n">bytes</span><span class="p">,</span><span class="w"> </span><span class="n">to_skip</span><span class="p">;</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">mode</span><span class="p">;</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">flags</span><span class="p">;</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">bytes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_input_stream_read</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">GZIP_HEADER_SIZE</span><span class="p">,</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">bytes</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="p">}</span> +<a id="line-382" name="line-382"></a> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">bytes</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">GZIP_HEADER_SIZE</span><span class="p">)</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-385" name="line-385"></a> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">GZIP_MAGIC_1</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">buffer</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">GZIP_MAGIC_2</span><span class="p">)</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-388" name="line-388"></a> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">mode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">buffer</span><span class="p">[</span><span class="mi">2</span><span class="p">];</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">mode</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">8</span><span class="p">)</span><span class="w"> </span><span class="cm">/* Mode: deflate */</span> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-392" name="line-392"></a> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">buffer</span><span class="p">[</span><span class="mi">3</span><span class="p">];</span> +<a id="line-394" name="line-394"></a> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GZIP_FLAG_RESERVED</span><span class="p">)</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-397" name="line-397"></a> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GZIP_FLAG_EXTRA_FIELD</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="n">tmp</span><span class="p">[</span><span class="mi">2</span><span class="p">];</span> +<a id="line-400" name="line-400"></a> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">bytes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_input_stream_read</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">,</span><span class="w"> </span><span class="n">tmp</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-402" name="line-402"></a> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">bytes</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="p">}</span> +<a id="line-406" name="line-406"></a> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">to_skip</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tmp</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="mi">8</span><span class="p">);</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">bytes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_input_stream_skip</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">,</span><span class="w"> </span><span class="n">to_skip</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">bytes</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">to_skip</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="p">}</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="p">}</span> +<a id="line-413" name="line-413"></a> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GZIP_FLAG_ORIG_NAME</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">skip_string</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="p">}</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="p">}</span> +<a id="line-419" name="line-419"></a> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GZIP_FLAG_COMMENT</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">skip_string</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="p">}</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="p">}</span> +<a id="line-425" name="line-425"></a> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">flags</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GZIP_FLAG_HEAD_CRC</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">bytes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_input_stream_skip</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">bytes</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="p">}</span> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="p">}</span> +<a id="line-432" name="line-432"></a> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="o">*</span><span class="n">modification_time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="mi">8</span><span class="p">)</span> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="mi">16</span><span class="p">)</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="mi">24</span><span class="p">));</span> +<a id="line-435" name="line-435"></a> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-437" name="line-437"></a><span class="p">}</span> +<a id="line-438" name="line-438"></a> +<a id="line-439" name="line-439"></a><span class="k">static</span><span class="w"> </span><span class="n">GZHandle</span><span class="w"> </span><span class="o">*</span> +<a id="line-440" name="line-440"></a><span class="nf">gz_handle_new</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">,</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">GInputStream</span><span class="w"> </span><span class="o">*</span><span class="n">parent_stream</span><span class="p">)</span> +<a id="line-442" name="line-442"></a><span class="p">{</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="n">GZHandle</span><span class="w"> </span><span class="o">*</span><span class="n">ret</span><span class="p">;</span> +<a id="line-444" name="line-444"></a> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">GZHandle</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="n">ret</span><span class="o">-></span><span class="n">parent_str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">parent_stream</span><span class="p">);</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">ret</span><span class="o">-></span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">ret</span><span class="o">-></span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-449" name="line-449"></a> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-451" name="line-451"></a><span class="p">}</span> +<a id="line-452" name="line-452"></a> +<a id="line-453" name="line-453"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-454" name="line-454"></a><span class="nf">gz_handle_init</span><span class="w"> </span><span class="p">(</span><span class="n">GZHandle</span><span class="w"> </span><span class="o">*</span><span class="n">gz</span><span class="p">)</span> +<a id="line-455" name="line-455"></a><span class="p">{</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">zstream</span><span class="p">.</span><span class="n">zalloc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">zstream</span><span class="p">.</span><span class="n">zfree</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">zstream</span><span class="p">.</span><span class="n">opaque</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">buffer</span><span class="p">);</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_malloc</span><span class="w"> </span><span class="p">(</span><span class="n">Z_BUFSIZE</span><span class="p">);</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">zstream</span><span class="p">.</span><span class="n">next_in</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">buffer</span><span class="p">;</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">zstream</span><span class="p">.</span><span class="n">avail_in</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-464" name="line-464"></a> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">inflateInit2</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">gz</span><span class="o">-></span><span class="n">zstream</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="n">MAX_WBITS</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">Z_OK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-466" name="line-466"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="p">}</span> +<a id="line-468" name="line-468"></a> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">last_z_result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Z_OK</span><span class="p">;</span> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">last_str_result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-471" name="line-471"></a> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-473" name="line-473"></a><span class="p">}</span> +<a id="line-474" name="line-474"></a> +<a id="line-475" name="line-475"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-476" name="line-476"></a><span class="nf">gz_handle_free</span><span class="w"> </span><span class="p">(</span><span class="n">GZHandle</span><span class="w"> </span><span class="o">*</span><span class="n">gz</span><span class="p">)</span> +<a id="line-477" name="line-477"></a><span class="p">{</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">parent_str</span><span class="p">);</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">file</span><span class="p">);</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">buffer</span><span class="p">);</span> +<a id="line-481" name="line-481"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="p">);</span> +<a id="line-482" name="line-482"></a><span class="p">}</span> +<a id="line-483" name="line-483"></a> +<a id="line-484" name="line-484"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-485" name="line-485"></a><span class="nf">fill_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GZHandle</span><span class="w"> </span><span class="o">*</span><span class="n">gz</span><span class="p">,</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">num_bytes</span><span class="p">)</span> +<a id="line-487" name="line-487"></a><span class="p">{</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">count</span><span class="p">;</span> +<a id="line-489" name="line-489"></a> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">z_stream</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">zstream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&</span><span class="n">gz</span><span class="o">-></span><span class="n">zstream</span><span class="p">;</span> +<a id="line-491" name="line-491"></a> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">zstream</span><span class="o">-></span><span class="n">avail_in</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="p">}</span> +<a id="line-495" name="line-495"></a> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_input_stream_read</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">parent_str</span><span class="p">,</span> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="n">Z_BUFSIZE</span><span class="p">,</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">zstream</span><span class="o">-></span><span class="n">avail_out</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">num_bytes</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="p">}</span> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">last_str_result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="n">zstream</span><span class="o">-></span><span class="n">next_in</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">buffer</span><span class="p">;</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">zstream</span><span class="o">-></span><span class="n">avail_in</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">count</span><span class="p">;</span> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="p">}</span> +<a id="line-509" name="line-509"></a> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-511" name="line-511"></a><span class="p">}</span> +<a id="line-512" name="line-512"></a> +<a id="line-513" name="line-513"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-514" name="line-514"></a><span class="nf">result_from_z_result</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">z_result</span><span class="p">)</span> +<a id="line-515" name="line-515"></a><span class="p">{</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">z_result</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">Z_OK</span><span class="p">:</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">Z_STREAM_END</span><span class="p">:</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">Z_DATA_ERROR</span><span class="p">:</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="p">}</span> +<a id="line-525" name="line-525"></a><span class="p">}</span> +<a id="line-526" name="line-526"></a> +<a id="line-527" name="line-527"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-528" name="line-528"></a><span class="nf">gz_handle_read</span><span class="w"> </span><span class="p">(</span><span class="n">GZHandle</span><span class="w"> </span><span class="o">*</span><span class="n">gz</span><span class="p">,</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">,</span> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">num_bytes</span><span class="p">,</span> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">bytes_read</span><span class="p">)</span> +<a id="line-532" name="line-532"></a><span class="p">{</span> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="n">z_stream</span><span class="w"> </span><span class="o">*</span><span class="n">zstream</span><span class="p">;</span> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-535" name="line-535"></a><span class="hll"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">z_result</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'z_result' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'z_result' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-536" name="line-536"></a> +<a id="line-537" name="line-537"></a><span class="w"> </span><span class="o">*</span><span class="n">bytes_read</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="n">zstream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&</span><span class="n">gz</span><span class="o">-></span><span class="n">zstream</span><span class="p">;</span> +<a id="line-539" name="line-539"></a> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">last_z_result</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">Z_OK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-541" name="line-541"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">last_z_result</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">Z_STREAM_END</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="o">*</span><span class="n">bytes_read</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-544" name="line-544"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-545" name="line-545"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result_from_z_result</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">last_z_result</span><span class="p">);</span> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="p">}</span> +<a id="line-547" name="line-547"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">last_str_result</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="p">}</span> +<a id="line-550" name="line-550"></a> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="n">zstream</span><span class="o">-></span><span class="n">next_out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">buffer</span><span class="p">;</span> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="n">zstream</span><span class="o">-></span><span class="n">avail_out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">num_bytes</span><span class="p">;</span> +<a id="line-553" name="line-553"></a> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">zstream</span><span class="o">-></span><span class="n">avail_out</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">fill_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="p">,</span><span class="w"> </span><span class="n">num_bytes</span><span class="p">);</span> +<a id="line-556" name="line-556"></a> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="p">}</span> +<a id="line-560" name="line-560"></a> +<a id="line-561" name="line-561"></a><span class="w"> </span><span class="n">z_result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">inflate</span><span class="w"> </span><span class="p">(</span><span class="n">zstream</span><span class="p">,</span><span class="w"> </span><span class="n">Z_NO_FLUSH</span><span class="p">);</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">z_result</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">Z_STREAM_END</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-563" name="line-563"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">last_z_result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">z_result</span><span class="p">;</span> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">z_result</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">Z_OK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-566" name="line-566"></a><span class="w"> </span><span class="n">gz</span><span class="o">-></span><span class="n">last_z_result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">z_result</span><span class="p">;</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="p">}</span> +<a id="line-568" name="line-568"></a> +<a id="line-569" name="line-569"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">last_z_result</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">Z_OK</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">zstream</span><span class="o">-></span><span class="n">avail_out</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">num_bytes</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result_from_z_result</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="o">-></span><span class="n">last_z_result</span><span class="p">);</span> +<a id="line-571" name="line-571"></a><span class="w"> </span><span class="p">}</span> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="p">}</span> +<a id="line-573" name="line-573"></a> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="o">*</span><span class="n">bytes_read</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">num_bytes</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">zstream</span><span class="o">-></span><span class="n">avail_out</span><span class="p">;</span> +<a id="line-575" name="line-575"></a> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-577" name="line-577"></a><span class="p">}</span> +<a id="line-578" name="line-578"></a> +<a id="line-579" name="line-579"></a><span class="k">static</span><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span> +<a id="line-580" name="line-580"></a><span class="nf">create_zlib_error</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-581" name="line-581"></a><span class="p">{</span> +<a id="line-582" name="line-582"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="p">;</span> +<a id="line-583" name="line-583"></a> +<a id="line-584" name="line-584"></a><span class="w"> </span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_error_new_literal</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_ERROR_QUARK</span><span class="p">,</span><span class="w"> </span><span class="n">LOGVIEW_ERROR_ZLIB</span><span class="p">,</span> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Error while uncompressing the GZipped log. The file "</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="s">"might be corrupt."</span><span class="p">));</span> +<a id="line-587" name="line-587"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">err</span><span class="p">;</span> +<a id="line-588" name="line-588"></a><span class="p">}</span> +<a id="line-589" name="line-589"></a> +<a id="line-590" name="line-590"></a><span class="cp">#endif </span><span class="cm">/* HAVE_ZLIB */</span> +<a id="line-591" name="line-591"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-592" name="line-592"></a><span class="nf">log_load</span><span class="w"> </span><span class="p">(</span><span class="n">GTask</span><span class="w"> </span><span class="o">*</span><span class="n">task</span><span class="p">,</span> +<a id="line-593" name="line-593"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">source_object</span><span class="p">,</span> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">,</span> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="n">GCancellable</span><span class="w"> </span><span class="o">*</span><span class="n">cancellable</span><span class="p">)</span> +<a id="line-596" name="line-596"></a><span class="p">{</span> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="cm">/* this runs in a separate i/o thread */</span> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="n">LoadJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">log</span><span class="p">;</span> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">f</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file</span><span class="p">;</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">info</span><span class="p">;</span> +<a id="line-602" name="line-602"></a><span class="w"> </span><span class="n">GInputStream</span><span class="w"> </span><span class="o">*</span><span class="n">is</span><span class="p">;</span> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">peeked_buffer</span><span class="p">;</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">parse_data</span><span class="p">[</span><span class="mi">2</span><span class="p">];</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">days</span><span class="p">;</span> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">content_type</span><span class="p">;</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">GFileType</span><span class="w"> </span><span class="n">type</span><span class="p">;</span> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_archive</span><span class="p">,</span><span class="w"> </span><span class="n">can_read</span><span class="p">;</span> +<a id="line-610" name="line-610"></a> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="n">info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_info</span><span class="w"> </span><span class="p">(</span><span class="n">f</span><span class="p">,</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_ACCESS_CAN_READ</span><span class="w"> </span><span class="s">","</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</span><span class="w"> </span><span class="s">","</span> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</span><span class="w"> </span><span class="s">","</span> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_TYPE</span><span class="w"> </span><span class="s">","</span> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_SIZE</span><span class="w"> </span><span class="s">","</span> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_TIME_MODIFIED</span><span class="w"> </span><span class="s">","</span><span class="p">,</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="o">-></span><span class="n">code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_ERROR_PERMISSION_DENIED</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="cm">/* TODO: PolicyKit integration */</span> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="p">}</span> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="p">}</span> +<a id="line-625" name="line-625"></a> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="n">can_read</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_attribute_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_ACCESS_CAN_READ</span><span class="p">);</span> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">can_read</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="cm">/* TODO: PolicyKit integration */</span> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_error_new_literal</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_ERROR_QUARK</span><span class="p">,</span><span class="w"> </span><span class="n">LOGVIEW_ERROR_PERMISSION_DENIED</span><span class="p">,</span> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"You don't have enough permissions to read the file."</span><span class="p">));</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-633" name="line-633"></a> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="p">}</span> +<a id="line-636" name="line-636"></a> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_file_type</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="n">content_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_content_type</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-639" name="line-639"></a> +<a id="line-640" name="line-640"></a><span class="w"> </span><span class="n">is_archive</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_content_type_equals</span><span class="w"> </span><span class="p">(</span><span class="n">content_type</span><span class="p">,</span><span class="w"> </span><span class="s">"application/x-gzip"</span><span class="p">);</span> +<a id="line-641" name="line-641"></a> +<a id="line-642" name="line-642"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(((</span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_FILE_TYPE_REGULAR</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_FILE_TYPE_SYMBOLIC_LINK</span><span class="p">))</span><span class="w"> </span><span class="o">||</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_content_type_is_a</span><span class="w"> </span><span class="p">(</span><span class="n">content_type</span><span class="p">,</span><span class="w"> </span><span class="s">"text/plain"</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">is_archive</span><span class="p">))</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="p">{</span> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_error_new_literal</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_ERROR_QUARK</span><span class="p">,</span><span class="w"> </span><span class="n">LOGVIEW_ERROR_NOT_A_LOG</span><span class="p">,</span> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The file is not a regular file or is not a text file."</span><span class="p">));</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-648" name="line-648"></a> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="p">}</span> +<a id="line-651" name="line-651"></a> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_size</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-653" name="line-653"></a><span class="cp">#if GLIB_CHECK_VERSION(2,61,2)</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="n">GDateTime</span><span class="w"> </span><span class="o">*</span><span class="n">file_dt</span><span class="p">;</span> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="n">gint64</span><span class="w"> </span><span class="n">t</span><span class="p">;</span> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="n">file_dt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_modification_date_time</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_date_time_to_unix</span><span class="w"> </span><span class="p">(</span><span class="n">file_dt</span><span class="p">);</span> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="n">g_date_time_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file_dt</span><span class="p">);</span> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file_time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">t</span><span class="p">;</span> +<a id="line-660" name="line-660"></a><span class="cp">#else</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="n">GTimeVal</span><span class="w"> </span><span class="n">time_val</span><span class="p">;</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="n">g_file_info_get_modification_time</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">time_val</span><span class="p">);</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file_time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">time_val</span><span class="p">.</span><span class="n">tv_sec</span><span class="p">;</span> +<a id="line-664" name="line-664"></a><span class="cp">#endif</span> +<a id="line-665" name="line-665"></a> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">display_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_get_display_name</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">));</span> +<a id="line-667" name="line-667"></a> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-669" name="line-669"></a> +<a id="line-670" name="line-670"></a><span class="w"> </span><span class="cm">/* initialize the stream */</span> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">is</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_INPUT_STREAM</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_read</span><span class="w"> </span><span class="p">(</span><span class="n">f</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">));</span> +<a id="line-672" name="line-672"></a> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="o">-></span><span class="n">code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_ERROR_PERMISSION_DENIED</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-675" name="line-675"></a><span class="w"> </span><span class="cm">/* TODO: PolicyKit integration */</span> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="p">}</span> +<a id="line-677" name="line-677"></a> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="p">}</span> +<a id="line-680" name="line-680"></a> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">is_archive</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-682" name="line-682"></a><span class="cp">#ifdef HAVE_ZLIB</span> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">GZHandle</span><span class="w"> </span><span class="o">*</span><span class="n">gz</span><span class="p">;</span> +<a id="line-684" name="line-684"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">buffer</span><span class="p">;</span> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">bytes_read</span><span class="p">;</span> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="n">GInputStream</span><span class="w"> </span><span class="o">*</span><span class="n">real_is</span><span class="p">;</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="kt">time_t</span><span class="w"> </span><span class="n">mtime</span><span class="p">;</span><span class="w"> </span><span class="cm">/* seconds */</span> +<a id="line-689" name="line-689"></a> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="cm">/* this also skips the header from |is| */</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">read_gzip_header</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">mtime</span><span class="p">);</span> +<a id="line-692" name="line-692"></a> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-694" name="line-694"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">);</span> +<a id="line-695" name="line-695"></a> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">create_zlib_error</span><span class="w"> </span><span class="p">();</span> +<a id="line-697" name="line-697"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="p">}</span> +<a id="line-699" name="line-699"></a> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file_time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mtime</span><span class="p">;</span> +<a id="line-701" name="line-701"></a> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="n">gz</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gz_handle_new</span><span class="w"> </span><span class="p">(</span><span class="n">f</span><span class="p">,</span><span class="w"> </span><span class="n">is</span><span class="p">);</span> +<a id="line-703" name="line-703"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gz_handle_init</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="p">);</span> +<a id="line-704" name="line-704"></a> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">);</span> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="n">gz_handle_free</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="p">);</span> +<a id="line-708" name="line-708"></a> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">create_zlib_error</span><span class="w"> </span><span class="p">();</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-711" name="line-711"></a><span class="w"> </span><span class="p">}</span> +<a id="line-712" name="line-712"></a> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="n">real_is</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_memory_input_stream_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-714" name="line-714"></a> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">{</span> +<a id="line-716" name="line-716"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_malloc</span><span class="w"> </span><span class="p">(</span><span class="mi">1024</span><span class="p">);</span> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gz_handle_read</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="mi">1024</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">bytes_read</span><span class="p">);</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="n">g_memory_input_stream_add_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_MEMORY_INPUT_STREAM</span><span class="w"> </span><span class="p">(</span><span class="n">real_is</span><span class="p">),</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">bytes_read</span><span class="p">,</span><span class="w"> </span><span class="n">g_free</span><span class="p">);</span> +<a id="line-720" name="line-720"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">bytes_read</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-721" name="line-721"></a> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-723" name="line-723"></a><span class="w"> </span><span class="n">gz_handle_free</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="p">);</span> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">real_is</span><span class="p">);</span> +<a id="line-725" name="line-725"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">);</span> +<a id="line-726" name="line-726"></a> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">create_zlib_error</span><span class="w"> </span><span class="p">();</span> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="p">}</span> +<a id="line-730" name="line-730"></a> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">);</span> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="n">is</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">real_is</span><span class="p">;</span> +<a id="line-733" name="line-733"></a> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="n">gz_handle_free</span><span class="w"> </span><span class="p">(</span><span class="n">gz</span><span class="p">);</span> +<a id="line-735" name="line-735"></a><span class="cp">#else </span><span class="cm">/* HAVE_ZLIB */</span> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">);</span> +<a id="line-737" name="line-737"></a> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_error_new_literal</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_ERROR_QUARK</span><span class="p">,</span><span class="w"> </span><span class="n">LOGVIEW_ERROR_NOT_SUPPORTED</span><span class="p">,</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"This version of System Log does not support GZipped logs."</span><span class="p">));</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-741" name="line-741"></a><span class="cp">#endif </span><span class="cm">/* HAVE_ZLIB */</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="p">}</span> +<a id="line-743" name="line-743"></a> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">stream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_data_input_stream_new</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">);</span> +<a id="line-745" name="line-745"></a> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="cm">/* sniff into the stream for a timestamped line */</span> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="n">g_buffered_input_stream_fill</span><span class="w"> </span><span class="p">(</span><span class="n">G_BUFFERED_INPUT_STREAM</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">stream</span><span class="p">),</span> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="p">(</span><span class="n">gssize</span><span class="p">)</span><span class="w"> </span><span class="n">g_buffered_input_stream_get_buffer_size</span><span class="w"> </span><span class="p">(</span><span class="n">G_BUFFERED_INPUT_STREAM</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">stream</span><span class="p">)),</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-751" name="line-751"></a><span class="w"> </span><span class="n">peeked_buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_buffered_input_stream_peek_buffer</span> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="p">(</span><span class="n">G_BUFFERED_INPUT_STREAM</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">stream</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">parse_data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">peeked_buffer</span><span class="p">;</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="n">parse_data</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-755" name="line-755"></a> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">log_read_dates</span><span class="w"> </span><span class="p">(</span><span class="n">parse_data</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">)))</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-758" name="line-758"></a><span class="w"> </span><span class="n">g_slist_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">days</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">logview_utils_day_free</span><span class="p">);</span> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-761" name="line-761"></a><span class="w"> </span><span class="p">}</span> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="p">}</span> +<a id="line-766" name="line-766"></a> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">is</span><span class="p">);</span> +<a id="line-768" name="line-768"></a> +<a id="line-769" name="line-769"></a><span class="nl">out</span><span class="p">:</span> +<a id="line-770" name="line-770"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="n">g_task_return_error</span><span class="w"> </span><span class="p">(</span><span class="n">task</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="p">);</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="p">}</span> +<a id="line-773" name="line-773"></a> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="n">g_task_return_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">task</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-775" name="line-775"></a><span class="p">}</span> +<a id="line-776" name="line-776"></a> +<a id="line-777" name="line-777"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-778" name="line-778"></a><span class="nf">log_setup_load</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewCreateCallback</span><span class="w"> </span><span class="n">callback</span><span class="p">,</span> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-780" name="line-780"></a><span class="p">{</span> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="n">LoadJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="p">;</span> +<a id="line-782" name="line-782"></a><span class="w"> </span><span class="n">GTask</span><span class="w"> </span><span class="o">*</span><span class="n">task</span><span class="p">;</span> +<a id="line-783" name="line-783"></a> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">LoadJob</span><span class="p">);</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">callback</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">callback</span><span class="p">;</span> +<a id="line-786" name="line-786"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">user_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">log</span><span class="p">;</span> +<a id="line-788" name="line-788"></a> +<a id="line-789" name="line-789"></a><span class="w"> </span><span class="n">task</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_task_new</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">log_load_done</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="p">);</span> +<a id="line-790" name="line-790"></a><span class="w"> </span><span class="n">g_task_set_task_data</span><span class="w"> </span><span class="p">(</span><span class="n">task</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-791" name="line-791"></a><span class="w"> </span><span class="n">g_task_run_in_thread</span><span class="w"> </span><span class="p">(</span><span class="n">task</span><span class="p">,</span><span class="w"> </span><span class="n">log_load</span><span class="p">);</span> +<a id="line-792" name="line-792"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">task</span><span class="p">);</span> +<a id="line-793" name="line-793"></a><span class="p">}</span> +<a id="line-794" name="line-794"></a> +<a id="line-795" name="line-795"></a><span class="cm">/* public methods */</span> +<a id="line-796" name="line-796"></a> +<a id="line-797" name="line-797"></a><span class="kt">void</span> +<a id="line-798" name="line-798"></a><span class="nf">logview_log_read_new_lines</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-799" name="line-799"></a><span class="w"> </span><span class="n">GCancellable</span><span class="w"> </span><span class="o">*</span><span class="n">cancellable</span><span class="p">,</span> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="n">LogviewNewLinesCallback</span><span class="w"> </span><span class="n">callback</span><span class="p">,</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-802" name="line-802"></a><span class="p">{</span> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="n">NewLinesJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="p">;</span> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="n">GTask</span><span class="w"> </span><span class="o">*</span><span class="n">task</span><span class="p">;</span> +<a id="line-805" name="line-805"></a> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="cm">/* initialize the job struct with sensible values */</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">NewLinesJob</span><span class="p">);</span> +<a id="line-808" name="line-808"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">callback</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">callback</span><span class="p">;</span> +<a id="line-809" name="line-809"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">user_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-811" name="line-811"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">new_days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-813" name="line-813"></a> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="n">task</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_task_new</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">cancellable</span><span class="p">,</span><span class="w"> </span><span class="n">new_lines_job_done</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="p">);</span> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="n">g_task_set_task_data</span><span class="w"> </span><span class="p">(</span><span class="n">task</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-816" name="line-816"></a><span class="w"> </span><span class="n">g_task_run_in_thread</span><span class="w"> </span><span class="p">(</span><span class="n">task</span><span class="p">,</span><span class="w"> </span><span class="n">do_read_new_lines</span><span class="p">);</span> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">task</span><span class="p">);</span> +<a id="line-818" name="line-818"></a><span class="p">}</span> +<a id="line-819" name="line-819"></a> +<a id="line-820" name="line-820"></a><span class="kt">void</span> +<a id="line-821" name="line-821"></a><span class="nf">logview_log_create</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">filename</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewCreateCallback</span><span class="w"> </span><span class="n">callback</span><span class="p">,</span> +<a id="line-822" name="line-822"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-823" name="line-823"></a><span class="p">{</span> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_TYPE_LOG</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-825" name="line-825"></a> +<a id="line-826" name="line-826"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">);</span> +<a id="line-827" name="line-827"></a> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="n">log_setup_load</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">callback</span><span class="p">,</span><span class="w"> </span><span class="n">user_data</span><span class="p">);</span> +<a id="line-829" name="line-829"></a><span class="p">}</span> +<a id="line-830" name="line-830"></a> +<a id="line-831" name="line-831"></a><span class="kt">void</span> +<a id="line-832" name="line-832"></a><span class="nf">logview_log_create_from_gfile</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewCreateCallback</span><span class="w"> </span><span class="n">callback</span><span class="p">,</span> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-834" name="line-834"></a><span class="p">{</span> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_TYPE_LOG</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-836" name="line-836"></a> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-838" name="line-838"></a> +<a id="line-839" name="line-839"></a><span class="w"> </span><span class="n">log_setup_load</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">callback</span><span class="p">,</span><span class="w"> </span><span class="n">user_data</span><span class="p">);</span> +<a id="line-840" name="line-840"></a><span class="p">}</span> +<a id="line-841" name="line-841"></a> +<a id="line-842" name="line-842"></a><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-843" name="line-843"></a><span class="nf">logview_log_get_display_name</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-844" name="line-844"></a><span class="p">{</span> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-846" name="line-846"></a> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">display_name</span><span class="p">;</span> +<a id="line-848" name="line-848"></a><span class="p">}</span> +<a id="line-849" name="line-849"></a> +<a id="line-850" name="line-850"></a><span class="kt">time_t</span> +<a id="line-851" name="line-851"></a><span class="nf">logview_log_get_timestamp</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-852" name="line-852"></a><span class="p">{</span> +<a id="line-853" name="line-853"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-854" name="line-854"></a> +<a id="line-855" name="line-855"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file_time</span><span class="p">;</span> +<a id="line-856" name="line-856"></a><span class="p">}</span> +<a id="line-857" name="line-857"></a> +<a id="line-858" name="line-858"></a><span class="n">goffset</span> +<a id="line-859" name="line-859"></a><span class="nf">logview_log_get_file_size</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-860" name="line-860"></a><span class="p">{</span> +<a id="line-861" name="line-861"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-862" name="line-862"></a> +<a id="line-863" name="line-863"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file_size</span><span class="p">;</span> +<a id="line-864" name="line-864"></a><span class="p">}</span> +<a id="line-865" name="line-865"></a> +<a id="line-866" name="line-866"></a><span class="n">guint</span> +<a id="line-867" name="line-867"></a><span class="nf">logview_log_get_cached_lines_number</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-868" name="line-868"></a><span class="p">{</span> +<a id="line-869" name="line-869"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-870" name="line-870"></a> +<a id="line-871" name="line-871"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines_no</span><span class="p">;</span> +<a id="line-872" name="line-872"></a><span class="p">}</span> +<a id="line-873" name="line-873"></a> +<a id="line-874" name="line-874"></a><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span> +<a id="line-875" name="line-875"></a><span class="nf">logview_log_get_cached_lines</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-876" name="line-876"></a><span class="p">{</span> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-878" name="line-878"></a> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-880" name="line-880"></a> +<a id="line-881" name="line-881"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">lines</span><span class="o">-></span><span class="n">pdata</span><span class="p">;</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="p">}</span> +<a id="line-884" name="line-884"></a> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">lines</span><span class="p">;</span> +<a id="line-886" name="line-886"></a><span class="p">}</span> +<a id="line-887" name="line-887"></a> +<a id="line-888" name="line-888"></a><span class="n">GSList</span><span class="w"> </span><span class="o">*</span> +<a id="line-889" name="line-889"></a><span class="nf">logview_log_get_days_for_cached_lines</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-890" name="line-890"></a><span class="p">{</span> +<a id="line-891" name="line-891"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-892" name="line-892"></a> +<a id="line-893" name="line-893"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">days</span><span class="p">;</span> +<a id="line-894" name="line-894"></a><span class="p">}</span> +<a id="line-895" name="line-895"></a> +<a id="line-896" name="line-896"></a><span class="n">gboolean</span> +<a id="line-897" name="line-897"></a><span class="nf">logview_log_has_new_lines</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-898" name="line-898"></a><span class="p">{</span> +<a id="line-899" name="line-899"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-900" name="line-900"></a> +<a id="line-901" name="line-901"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_new_lines</span><span class="p">;</span> +<a id="line-902" name="line-902"></a><span class="p">}</span> +<a id="line-903" name="line-903"></a> +<a id="line-904" name="line-904"></a><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-905" name="line-905"></a><span class="nf">logview_log_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-906" name="line-906"></a><span class="p">{</span> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-908" name="line-908"></a> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_file_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file</span><span class="p">);</span> +<a id="line-910" name="line-910"></a><span class="p">}</span> +<a id="line-911" name="line-911"></a> +<a id="line-912" name="line-912"></a><span class="n">GFile</span><span class="w"> </span><span class="o">*</span> +<a id="line-913" name="line-913"></a><span class="nf">logview_log_get_gfile</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-914" name="line-914"></a><span class="p">{</span> +<a id="line-915" name="line-915"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-916" name="line-916"></a> +<a id="line-917" name="line-917"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">file</span><span class="p">);</span> +<a id="line-918" name="line-918"></a><span class="p">}</span> +<a id="line-919" name="line-919"></a> +<a id="line-920" name="line-920"></a><span class="n">gboolean</span> +<a id="line-921" name="line-921"></a><span class="nf">logview_log_get_has_days</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-922" name="line-922"></a><span class="p">{</span> +<a id="line-923" name="line-923"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-924" name="line-924"></a> +<a id="line-925" name="line-925"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">log</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_days</span><span class="p">;</span> +<a id="line-926" name="line-926"></a><span class="p">}</span> +<a id="line-927" name="line-927"></a> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/21.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/21.html new file mode 100644 index 00000000..c27721a0 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/21.html @@ -0,0 +1,1251 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: logview/src/logview-loglist.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> logview-loglist.c</p> +<a href="21.html#line-80"> variableScope 80</a><a href="21.html#line-481"> variableScope 481</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) 2005 Vincent Noel <[email protected]></span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2008 Cosimo Cecchi <[email protected]></span> +<a id="line-4" name="line-4"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-7" name="line-7"></a><span class="cm"> *</span> +<a id="line-8" name="line-8"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-9" name="line-9"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-10" name="line-10"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-11" name="line-11"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-12" name="line-12"></a><span class="cm"> *</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-14" name="line-14"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-15" name="line-15"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-16" name="line-16"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-17" name="line-17"></a><span class="cm"> *</span> +<a id="line-18" name="line-18"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-19" name="line-19"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-20" name="line-20"></a><span class="cm"> */</span> +<a id="line-21" name="line-21"></a> +<a id="line-22" name="line-22"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-23" name="line-23"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-24" name="line-24"></a><span class="cp">#endif</span> +<a id="line-25" name="line-25"></a> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-28" name="line-28"></a> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-manager.h"</span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-log.h"</span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-utils.h"</span> +<a id="line-32" name="line-32"></a> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-loglist.h"</span> +<a id="line-34" name="line-34"></a> +<a id="line-35" name="line-35"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_LogviewLoglistPrivate</span><span class="w"> </span><span class="p">{</span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="n">GtkTreeStore</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">;</span> +<a id="line-38" name="line-38"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-39" name="line-39"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">has_day_selection</span><span class="p">;</span> +<a id="line-40" name="line-40"></a><span class="p">};</span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglist</span><span class="p">,</span><span class="w"> </span><span class="n">logview_loglist</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_TREE_VIEW</span><span class="p">);</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="n">LOG_OBJECT</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="n">LOG_NAME</span><span class="p">,</span> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="n">LOG_WEIGHT</span><span class="p">,</span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="n">LOG_WEIGHT_SET</span><span class="p">,</span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="n">LOG_DAY</span> +<a id="line-50" name="line-50"></a><span class="p">};</span> +<a id="line-51" name="line-51"></a> +<a id="line-52" name="line-52"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="n">DAY_SELECTED</span><span class="p">,</span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">DAY_CLEARED</span><span class="p">,</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-56" name="line-56"></a><span class="p">};</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-59" name="line-59"></a> +<a id="line-60" name="line-60"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-61" name="line-61"></a><span class="nf">save_day_selection</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">loglist</span><span class="p">,</span><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">)</span> +<a id="line-62" name="line-62"></a><span class="p">{</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="p">);</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="p">}</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_path</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-69" name="line-69"></a><span class="p">}</span> +<a id="line-70" name="line-70"></a> +<a id="line-71" name="line-71"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-72" name="line-72"></a><span class="nf">update_days_and_lines_for_log</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">loglist</span><span class="p">,</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">days</span><span class="p">)</span> +<a id="line-74" name="line-74"></a><span class="p">{</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">dummy</span><span class="p">;</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">date</span><span class="p">[</span><span class="mi">200</span><span class="p">];</span> +<a id="line-80" name="line-80"></a><span class="hll"><span class="w"> </span><span class="n">Day</span><span class="w"> </span><span class="o">*</span><span class="n">day</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'day' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'day' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-81" name="line-81"></a> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="cm">/* if we have some days, we can't remove all the items immediately, otherwise,</span> +<a id="line-83" name="line-83"></a><span class="cm"> * if the row is expanded, it will be collapsed because there are no items,</span> +<a id="line-84" name="line-84"></a><span class="cm"> * so we create a dummy entry, remove all the others and then remove the</span> +<a id="line-85" name="line-85"></a><span class="cm"> * dummy one.</span> +<a id="line-86" name="line-86"></a><span class="cm"> */</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_iter_children</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">gtk_tree_store_insert_before</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">dummy</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">dummy</span><span class="p">,</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="n">LOG_NAME</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">{</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">gtk_tree_store_remove</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_store_iter_is_valid</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">));</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="p">}</span> +<a id="line-97" name="line-97"></a> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">days</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="cm">/* now insert all the days */</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">day</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-101" name="line-101"></a> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="cm">/* TRANSLATORS: "strftime format options, see the man page for strftime(3) for further information." */</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">g_date_strftime</span><span class="w"> </span><span class="p">(</span><span class="n">date</span><span class="p">,</span><span class="w"> </span><span class="mi">200</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"%A, %e %b"</span><span class="p">),</span><span class="w"> </span><span class="n">day</span><span class="o">-></span><span class="n">date</span><span class="p">);</span> +<a id="line-104" name="line-104"></a> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">gtk_tree_store_insert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">date</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_DAY</span><span class="p">,</span><span class="w"> </span><span class="n">day</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="p">}</span> +<a id="line-111" name="line-111"></a> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">gtk_tree_store_remove</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">dummy</span><span class="p">);</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="p">}</span> +<a id="line-115" name="line-115"></a><span class="p">}</span> +<a id="line-116" name="line-116"></a> +<a id="line-117" name="line-117"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span> +<a id="line-118" name="line-118"></a><span class="nf">logview_loglist_find_log</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-119" name="line-119"></a><span class="p">{</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">current</span><span class="p">;</span> +<a id="line-124" name="line-124"></a> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-126" name="line-126"></a> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_tree_model_get_iter_first</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="p">}</span> +<a id="line-130" name="line-130"></a> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">{</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_OBJECT</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">current</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">current</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">log</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_iter_copy</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="p">}</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">current</span><span class="p">)</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">current</span><span class="p">);</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_model_iter_next</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FALSE</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-139" name="line-139"></a> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-141" name="line-141"></a><span class="p">}</span> +<a id="line-142" name="line-142"></a> +<a id="line-143" name="line-143"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-144" name="line-144"></a><span class="nf">log_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-146" name="line-146"></a><span class="p">{</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">active</span><span class="p">;</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-150" name="line-150"></a> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">active</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_manager_get_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">);</span> +<a id="line-152" name="line-152"></a> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">active</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="p">);</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="p">}</span> +<a id="line-157" name="line-157"></a> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_loglist_find_log</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-159" name="line-159"></a> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">iter</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="p">}</span> +<a id="line-163" name="line-163"></a> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="cm">/* make the log bold in the list */</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">LOG_WEIGHT</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_WEIGHT_BOLD</span><span class="p">,</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">LOG_WEIGHT_SET</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-168" name="line-168"></a> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">gtk_tree_iter_free</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">);</span> +<a id="line-170" name="line-170"></a><span class="p">}</span> +<a id="line-171" name="line-171"></a> +<a id="line-172" name="line-172"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-173" name="line-173"></a><span class="nf">tree_selection_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">,</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-175" name="line-175"></a><span class="p">{</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">parent</span><span class="p">;</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">;</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_bold</span><span class="p">,</span><span class="w"> </span><span class="n">is_active</span><span class="p">;</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">Day</span><span class="w"> </span><span class="o">*</span><span class="n">day</span><span class="p">;</span> +<a id="line-182" name="line-182"></a> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_tree_selection_get_selected</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="p">}</span> +<a id="line-186" name="line-186"></a> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_OBJECT</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">log</span><span class="p">,</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">LOG_WEIGHT_SET</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">is_bold</span><span class="p">,</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">LOG_DAY</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">day</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">is_active</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_manager_log_is_active</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-192" name="line-192"></a> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">is_active</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_day_selection</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_day_selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">DAY_CLEARED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">is_active</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">logview_manager_set_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="p">}</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">day</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_day_selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">gtk_tree_model_iter_parent</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_OBJECT</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">logview_manager_log_is_active</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">save_day_selection</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">logview_manager_set_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">DAY_SELECTED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">day</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="p">}</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="p">}</span> +<a id="line-211" name="line-211"></a> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">is_bold</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">LOG_WEIGHT_SET</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="p">}</span> +<a id="line-216" name="line-216"></a> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="p">}</span> +<a id="line-220" name="line-220"></a><span class="p">}</span> +<a id="line-221" name="line-221"></a> +<a id="line-222" name="line-222"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-223" name="line-223"></a><span class="nf">manager_active_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">old_log</span><span class="p">,</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-227" name="line-227"></a><span class="p">{</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">sel_iter</span><span class="p">;</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">selection</span><span class="p">;</span> +<a id="line-231" name="line-231"></a> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="w"> </span><span class="o">&&</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="o">&</span><span class="n">sel_iter</span><span class="p">,</span><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="p">))</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="p">{</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">Day</span><span class="w"> </span><span class="o">*</span><span class="n">day</span><span class="p">;</span> +<a id="line-237" name="line-237"></a> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_iter_copy</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">sel_iter</span><span class="p">);</span> +<a id="line-239" name="line-239"></a> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">LOG_DAY</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">day</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-242" name="line-242"></a> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">day</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">DAY_SELECTED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">day</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="p">}</span> +<a id="line-246" name="line-246"></a> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="p">);</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_loglist_find_log</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="p">}</span> +<a id="line-252" name="line-252"></a> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">iter</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="p">}</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">));</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">g_signal_handlers_block_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">tree_selection_changed_cb</span><span class="p">,</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> +<a id="line-259" name="line-259"></a> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">gtk_tree_selection_select_iter</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-261" name="line-261"></a> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">g_signal_handlers_unblock_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">tree_selection_changed_cb</span><span class="p">,</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">gtk_tree_iter_free</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">);</span> +<a id="line-264" name="line-264"></a><span class="p">}</span> +<a id="line-265" name="line-265"></a> +<a id="line-266" name="line-266"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-267" name="line-267"></a><span class="nf">manager_log_closed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-270" name="line-270"></a><span class="p">{</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-274" name="line-274"></a> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_loglist_find_log</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-276" name="line-276"></a> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">iter</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="p">}</span> +<a id="line-280" name="line-280"></a> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">log_changed_cb</span><span class="p">,</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> +<a id="line-282" name="line-282"></a> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_store_remove</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-286" name="line-286"></a> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="cm">/* iter now points to the next valid row */</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">));</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">gtk_tree_selection_select_iter</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="cm">/* FIXME: what shall we do here? */</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="p">}</span> +<a id="line-293" name="line-293"></a> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">gtk_tree_iter_free</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">);</span> +<a id="line-295" name="line-295"></a><span class="p">}</span> +<a id="line-296" name="line-296"></a> +<a id="line-297" name="line-297"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-298" name="line-298"></a><span class="nf">manager_log_added_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-301" name="line-301"></a><span class="p">{</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">child</span><span class="p">;</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">gtk_tree_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">LOG_OBJECT</span><span class="p">,</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">),</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">LOG_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">logview_log_get_display_name</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">),</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">logview_log_get_has_days</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">gtk_tree_store_insert</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="o">&</span><span class="n">child</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">child</span><span class="p">,</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">LOG_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Loading..."</span><span class="p">),</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="p">}</span> +<a id="line-315" name="line-315"></a> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="s">"log-changed"</span><span class="p">,</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">log_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> +<a id="line-318" name="line-318"></a><span class="p">}</span> +<a id="line-319" name="line-319"></a> +<a id="line-320" name="line-320"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-321" name="line-321"></a><span class="nf">row_expanded_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="n">view</span><span class="p">,</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-325" name="line-325"></a><span class="p">{</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">;</span> +<a id="line-328" name="line-328"></a> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">LOG_OBJECT</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">logview_manager_log_is_active</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">logview_manager_set_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="p">}</span> +<a id="line-334" name="line-334"></a> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-336" name="line-336"></a><span class="p">}</span> +<a id="line-337" name="line-337"></a> +<a id="line-338" name="line-338"></a><span class="k">static</span><span class="w"> </span><span class="kt">int</span> +<a id="line-339" name="line-339"></a><span class="nf">loglist_sort_func</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">a</span><span class="p">,</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">b</span><span class="p">,</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-343" name="line-343"></a><span class="p">{</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name_a</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">name_b</span><span class="p">;</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">Day</span><span class="w"> </span><span class="o">*</span><span class="n">day_a</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">day_b</span><span class="p">;</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-347" name="line-347"></a> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_store_iter_depth</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="n">a</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">0</span><span class="p">:</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name_a</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name_b</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_collate</span><span class="w"> </span><span class="p">(</span><span class="n">name_a</span><span class="p">,</span><span class="w"> </span><span class="n">name_b</span><span class="p">);</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name_a</span><span class="p">);</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name_b</span><span class="p">);</span> +<a id="line-355" name="line-355"></a> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">1</span><span class="p">:</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_DAY</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">day_a</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_DAY</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">day_b</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">day_a</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">day_b</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">days_compare</span><span class="w"> </span><span class="p">(</span><span class="n">day_a</span><span class="p">,</span><span class="w"> </span><span class="n">day_b</span><span class="p">);</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="p">}</span> +<a id="line-365" name="line-365"></a> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-369" name="line-369"></a> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="p">}</span> +<a id="line-372" name="line-372"></a> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-374" name="line-374"></a><span class="p">}</span> +<a id="line-375" name="line-375"></a> +<a id="line-376" name="line-376"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-377" name="line-377"></a><span class="nf">do_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">obj</span><span class="p">)</span> +<a id="line-378" name="line-378"></a><span class="p">{</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_LOGLIST</span><span class="w"> </span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> +<a id="line-380" name="line-380"></a> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">);</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-383" name="line-383"></a> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="p">);</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="p">}</span> +<a id="line-388" name="line-388"></a> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">logview_loglist_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> +<a id="line-390" name="line-390"></a><span class="p">}</span> +<a id="line-391" name="line-391"></a> +<a id="line-392" name="line-392"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-393" name="line-393"></a><span class="nf">logview_loglist_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="p">)</span> +<a id="line-394" name="line-394"></a><span class="p">{</span> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">GtkTreeStore</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">column</span><span class="p">;</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="n">cell</span><span class="p">;</span> +<a id="line-399" name="line-399"></a> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_loglist_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">has_day_selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-403" name="line-403"></a> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_store_new</span><span class="w"> </span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="n">LOGVIEW_TYPE_LOG</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_INT</span><span class="p">,</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">G_TYPE_BOOLEAN</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_POINTER</span><span class="p">);</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="n">gtk_tree_view_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">));</span> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">model</span><span class="p">;</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">gtk_tree_view_set_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-409" name="line-409"></a> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">));</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">gtk_tree_selection_set_mode</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_SELECTION_BROWSE</span><span class="p">);</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">tree_selection_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> +<a id="line-414" name="line-414"></a> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="n">cell</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="n">gtk_tree_view_column_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">cell</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="n">gtk_tree_view_column_set_attributes</span><span class="w"> </span><span class="p">(</span><span class="n">column</span><span class="p">,</span><span class="w"> </span><span class="n">cell</span><span class="p">,</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_NAME</span><span class="p">,</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="s">"weight-set"</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_WEIGHT_SET</span><span class="p">,</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="s">"weight"</span><span class="p">,</span><span class="w"> </span><span class="n">LOG_WEIGHT</span><span class="p">,</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-423" name="line-423"></a> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">gtk_tree_sortable_set_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SORTABLE</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="n">LOG_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_SORT_ASCENDING</span><span class="p">);</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">gtk_tree_sortable_set_sort_func</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SORTABLE</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">model</span><span class="p">),</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">LOG_NAME</span><span class="p">,</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeIterCompareFunc</span><span class="p">)</span><span class="w"> </span><span class="n">loglist_sort_func</span><span class="p">,</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">),</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="n">gtk_tree_view_set_search_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">),</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-431" name="line-431"></a> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_manager_get</span><span class="w"> </span><span class="p">();</span> +<a id="line-433" name="line-433"></a> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="s">"log-added"</span><span class="p">,</span> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">manager_log_added_cb</span><span class="p">),</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="s">"log-closed"</span><span class="p">,</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">manager_log_closed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="n">g_signal_connect_after</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="s">"active-changed"</span><span class="p">,</span> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">manager_active_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="s">"row-expanded"</span><span class="p">,</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">row_expanded_cb</span><span class="p">),</span><span class="w"> </span><span class="n">list</span><span class="p">);</span> +<a id="line-442" name="line-442"></a><span class="p">}</span> +<a id="line-443" name="line-443"></a> +<a id="line-444" name="line-444"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-445" name="line-445"></a><span class="nf">logview_loglist_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglistClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-446" name="line-446"></a><span class="p">{</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">oclass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">oclass</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">do_finalize</span><span class="p">;</span> +<a id="line-449" name="line-449"></a> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">DAY_SELECTED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"day-selected"</span><span class="p">,</span> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">oclass</span><span class="p">),</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglistClass</span><span class="p">,</span><span class="w"> </span><span class="n">day_selected</span><span class="p">),</span> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__POINTER</span><span class="p">,</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="n">G_TYPE_POINTER</span><span class="p">);</span> +<a id="line-458" name="line-458"></a> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">DAY_CLEARED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"day-cleared"</span><span class="p">,</span> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">oclass</span><span class="p">),</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglistClass</span><span class="p">,</span><span class="w"> </span><span class="n">day_cleared</span><span class="p">),</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-466" name="line-466"></a><span class="p">}</span> +<a id="line-467" name="line-467"></a> +<a id="line-468" name="line-468"></a><span class="cm">/* public methods */</span> +<a id="line-469" name="line-469"></a> +<a id="line-470" name="line-470"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-471" name="line-471"></a><span class="nf">logview_loglist_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-472" name="line-472"></a><span class="p">{</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">;</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="n">widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_TYPE_LOGLIST</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">widget</span><span class="p">;</span> +<a id="line-476" name="line-476"></a><span class="p">}</span> +<a id="line-477" name="line-477"></a> +<a id="line-478" name="line-478"></a><span class="kt">void</span> +<a id="line-479" name="line-479"></a><span class="nf">logview_loglist_update_lines</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">loglist</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-480" name="line-480"></a><span class="p">{</span> +<a id="line-481" name="line-481"></a><span class="hll"><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">days</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'days' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'days' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">;</span> +<a id="line-483" name="line-483"></a> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOGLIST</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="p">));</span> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_LOG</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-486" name="line-486"></a> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_loglist_find_log</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-488" name="line-488"></a> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_log_get_days_for_cached_lines</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="n">update_days_and_lines_for_log</span><span class="w"> </span><span class="p">(</span><span class="n">loglist</span><span class="p">,</span><span class="w"> </span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="n">days</span><span class="p">);</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="n">gtk_tree_iter_free</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">);</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="p">}</span> +<a id="line-494" name="line-494"></a><span class="p">}</span> +<a id="line-495" name="line-495"></a> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/22.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/22.html new file mode 100644 index 00000000..340d911e --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/22.html @@ -0,0 +1,1095 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: logview/src/logview-manager.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> logview-manager.c</p> +<a href="22.html#line-220"> variableScope 220</a><a href="22.html#line-418"> constParameter 418</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) 2008 Cosimo Cecchi <[email protected]></span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-4" name="line-4"></a><span class="cm"> *</span> +<a id="line-5" name="line-5"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-6" name="line-6"></a><span class="cm"> *</span> +<a id="line-7" name="line-7"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-8" name="line-8"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-9" name="line-9"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-10" name="line-10"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-11" name="line-11"></a><span class="cm"> *</span> +<a id="line-12" name="line-12"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-13" name="line-13"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-14" name="line-14"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-15" name="line-15"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-16" name="line-16"></a><span class="cm"> *</span> +<a id="line-17" name="line-17"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-18" name="line-18"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-19" name="line-19"></a><span class="cm"> */</span> +<a id="line-20" name="line-20"></a> +<a id="line-21" name="line-21"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-22" name="line-22"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-23" name="line-23"></a><span class="cp">#endif</span> +<a id="line-24" name="line-24"></a> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-manager.h"</span> +<a id="line-26" name="line-26"></a> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-28" name="line-28"></a> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-prefs.h"</span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-marshal.h"</span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-app.h"</span> +<a id="line-32" name="line-32"></a> +<a id="line-33" name="line-33"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-34" name="line-34"></a><span class="w"> </span><span class="n">LOG_ADDED</span><span class="p">,</span> +<a id="line-35" name="line-35"></a><span class="w"> </span><span class="n">LOG_CLOSED</span><span class="p">,</span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="n">ACTIVE_CHANGED</span><span class="p">,</span> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-38" name="line-38"></a><span class="p">};</span> +<a id="line-39" name="line-39"></a> +<a id="line-40" name="line-40"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-41" name="line-41"></a><span class="w"> </span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">;</span> +<a id="line-42" name="line-42"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">set_active</span><span class="p">;</span> +<a id="line-43" name="line-43"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_multiple</span><span class="p">;</span> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-45" name="line-45"></a><span class="p">}</span><span class="w"> </span><span class="n">CreateCBData</span><span class="p">;</span> +<a id="line-46" name="line-46"></a> +<a id="line-47" name="line-47"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">total</span><span class="p">;</span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">current</span><span class="p">;</span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">errors</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="p">}</span><span class="w"> </span><span class="n">MultipleCreation</span><span class="p">;</span> +<a id="line-52" name="line-52"></a> +<a id="line-53" name="line-53"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_LogviewManagerPrivate</span><span class="w"> </span><span class="p">{</span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">GHashTable</span><span class="w"> </span><span class="o">*</span><span class="n">logs</span><span class="p">;</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">active_log</span><span class="p">;</span> +<a id="line-56" name="line-56"></a><span class="p">};</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="k">static</span><span class="w"> </span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">singleton</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-59" name="line-59"></a><span class="k">static</span><span class="w"> </span><span class="n">MultipleCreation</span><span class="w"> </span><span class="o">*</span><span class="n">op</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-60" name="line-60"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-61" name="line-61"></a> +<a id="line-62" name="line-62"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="p">,</span><span class="w"> </span><span class="n">logview_manager</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_OBJECT</span><span class="p">);</span> +<a id="line-63" name="line-63"></a> +<a id="line-64" name="line-64"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-65" name="line-65"></a><span class="nf">logview_manager_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-66" name="line-66"></a><span class="p">{</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">;</span> +<a id="line-68" name="line-68"></a> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-70" name="line-70"></a> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_log</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_log</span><span class="p">);</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="p">}</span> +<a id="line-74" name="line-74"></a> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">g_hash_table_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logs</span><span class="p">);</span> +<a id="line-76" name="line-76"></a> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">logview_manager_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-78" name="line-78"></a><span class="p">}</span> +<a id="line-79" name="line-79"></a> +<a id="line-80" name="line-80"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-81" name="line-81"></a><span class="nf">logview_manager_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManagerClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-82" name="line-82"></a><span class="p">{</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">object_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-84" name="line-84"></a> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">object_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_manager_finalize</span><span class="p">;</span> +<a id="line-86" name="line-86"></a> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LOG_ADDED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"log-added"</span><span class="p">,</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">),</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManagerClass</span><span class="p">,</span><span class="w"> </span><span class="n">log_added</span><span class="p">),</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__OBJECT</span><span class="p">,</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">LOGVIEW_TYPE_LOG</span><span class="p">);</span> +<a id="line-95" name="line-95"></a> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LOG_CLOSED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"log-closed"</span><span class="p">,</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">),</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManagerClass</span><span class="p">,</span><span class="w"> </span><span class="n">log_closed</span><span class="p">),</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__OBJECT</span><span class="p">,</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">LOGVIEW_TYPE_LOG</span><span class="p">);</span> +<a id="line-104" name="line-104"></a> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">ACTIVE_CHANGED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"active-changed"</span><span class="p">,</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">),</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManagerClass</span><span class="p">,</span><span class="w"> </span><span class="n">active_changed</span><span class="p">),</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">logview_marshal_VOID__OBJECT_OBJECT</span><span class="p">,</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">LOGVIEW_TYPE_LOG</span><span class="p">,</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">LOGVIEW_TYPE_LOG</span><span class="p">);</span> +<a id="line-114" name="line-114"></a><span class="p">}</span> +<a id="line-115" name="line-115"></a> +<a id="line-116" name="line-116"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-117" name="line-117"></a><span class="nf">logview_manager_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">self</span><span class="p">)</span> +<a id="line-118" name="line-118"></a><span class="p">{</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">LogviewManagerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_manager_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">self</span><span class="p">);</span> +<a id="line-120" name="line-120"></a> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">active_log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_hash_table_new_full</span><span class="w"> </span><span class="p">(</span><span class="n">g_str_hash</span><span class="p">,</span><span class="w"> </span><span class="n">g_str_equal</span><span class="p">,</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">g_free</span><span class="p">,</span><span class="w"> </span><span class="n">g_object_unref</span><span class="p">);</span> +<a id="line-124" name="line-124"></a><span class="p">}</span> +<a id="line-125" name="line-125"></a> +<a id="line-126" name="line-126"></a><span class="k">static</span><span class="w"> </span><span class="n">MultipleCreation</span><span class="w"> </span><span class="o">*</span> +<a id="line-127" name="line-127"></a><span class="nf">multiple_creation_op_new</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">total</span><span class="p">)</span> +<a id="line-128" name="line-128"></a><span class="p">{</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="n">MultipleCreation</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-130" name="line-130"></a> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">MultipleCreation</span><span class="p">);</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="n">retval</span><span class="o">-></span><span class="n">total</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">total</span><span class="p">;</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">retval</span><span class="o">-></span><span class="n">current</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">retval</span><span class="o">-></span><span class="n">errors</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-135" name="line-135"></a> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-137" name="line-137"></a><span class="p">}</span> +<a id="line-138" name="line-138"></a> +<a id="line-139" name="line-139"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-140" name="line-140"></a><span class="nf">multiple_creation_op_free</span><span class="w"> </span><span class="p">(</span><span class="n">MultipleCreation</span><span class="w"> </span><span class="o">*</span><span class="n">mc</span><span class="p">)</span> +<a id="line-141" name="line-141"></a><span class="p">{</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">g_ptr_array_set_free_func</span><span class="w"> </span><span class="p">(</span><span class="n">mc</span><span class="o">-></span><span class="n">errors</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">g_strfreev</span><span class="p">);</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">mc</span><span class="o">-></span><span class="n">errors</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">MultipleCreation</span><span class="p">,</span><span class="w"> </span><span class="n">mc</span><span class="p">);</span> +<a id="line-145" name="line-145"></a><span class="p">}</span> +<a id="line-146" name="line-146"></a> +<a id="line-147" name="line-147"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-148" name="line-148"></a><span class="nf">create_log_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">,</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-151" name="line-151"></a><span class="p">{</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">CreateCBData</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-153" name="line-153"></a> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">log_uri</span><span class="p">;</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">;</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-158" name="line-158"></a> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">log_uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_log_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-160" name="line-160"></a> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="cm">/* creation went well, store the log and notify */</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">g_hash_table_insert</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logs</span><span class="p">,</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">log_uri</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-164" name="line-164"></a> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">prefs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get</span><span class="w"> </span><span class="p">();</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_log_get_gfile</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">logview_prefs_store_log</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-168" name="line-168"></a> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-170" name="line-170"></a> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LOG_ADDED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">set_active</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">logview_manager_set_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="p">}</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">;</span> +<a id="line-178" name="line-178"></a> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="cm">/* notify the error */</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">file</span><span class="p">);</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">data</span><span class="o">-></span><span class="n">is_multiple</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="n">logview_app_add_error</span><span class="w"> </span><span class="p">(</span><span class="n">logview_app_get</span><span class="w"> </span><span class="p">(),</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">error_arr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new0</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span> +<a id="line-187" name="line-187"></a> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">error_arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">error_arr</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">error_arr</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">op</span><span class="o">-></span><span class="n">errors</span><span class="p">,</span><span class="w"> </span><span class="n">error_arr</span><span class="p">);</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="p">}</span> +<a id="line-194" name="line-194"></a> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="p">}</span> +<a id="line-197" name="line-197"></a> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">is_multiple</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">op</span><span class="o">-></span><span class="n">current</span><span class="o">++</span><span class="p">;</span> +<a id="line-200" name="line-200"></a> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">op</span><span class="o">-></span><span class="n">total</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">op</span><span class="o">-></span><span class="n">current</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">logview_app_add_errors</span><span class="w"> </span><span class="p">(</span><span class="n">logview_app_get</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">op</span><span class="o">-></span><span class="n">errors</span><span class="p">);</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">multiple_creation_op_free</span><span class="w"> </span><span class="p">(</span><span class="n">op</span><span class="p">);</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">op</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="p">}</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="p">}</span> +<a id="line-207" name="line-207"></a> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">file</span><span class="p">);</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">CreateCBData</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-210" name="line-210"></a><span class="p">}</span> +<a id="line-211" name="line-211"></a> +<a id="line-212" name="line-212"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-213" name="line-213"></a><span class="nf">add_log_from_gfile_internal</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">,</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">set_active</span><span class="p">,</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_multiple</span><span class="p">)</span> +<a id="line-217" name="line-217"></a><span class="p">{</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">file_uri</span><span class="p">;</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">;</span> +<a id="line-220" name="line-220"></a><span class="hll"><span class="w"> </span><span class="n">CreateCBData</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'data' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'data' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-221" name="line-221"></a> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">file_uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-223" name="line-223"></a> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">set_active</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="cm">/* if it's the first log being added, set it as active anyway */</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">set_active</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logs</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="p">}</span> +<a id="line-228" name="line-228"></a> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_hash_table_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logs</span><span class="p">,</span><span class="w"> </span><span class="n">file_uri</span><span class="p">))</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="cm">/* log already exists, don't load it */</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">set_active</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">logview_manager_set_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="p">}</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">CreateCBData</span><span class="p">);</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">manager</span><span class="p">;</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">set_active</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">set_active</span><span class="p">;</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">is_multiple</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">is_multiple</span><span class="p">;</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-240" name="line-240"></a> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">logview_log_create_from_gfile</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">create_log_cb</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="p">}</span> +<a id="line-243" name="line-243"></a> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file_uri</span><span class="p">);</span> +<a id="line-245" name="line-245"></a><span class="p">}</span> +<a id="line-246" name="line-246"></a> +<a id="line-247" name="line-247"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-248" name="line-248"></a><span class="nf">logview_manager_add_log_from_name</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">filename</span><span class="p">,</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">set_active</span><span class="p">,</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_multiple</span><span class="p">)</span> +<a id="line-251" name="line-251"></a><span class="p">{</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-253" name="line-253"></a> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">);</span> +<a id="line-255" name="line-255"></a> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">add_log_from_gfile_internal</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">set_active</span><span class="p">,</span><span class="w"> </span><span class="n">is_multiple</span><span class="p">);</span> +<a id="line-257" name="line-257"></a> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-259" name="line-259"></a><span class="p">}</span> +<a id="line-260" name="line-260"></a> +<a id="line-261" name="line-261"></a><span class="cm">/* public methods */</span> +<a id="line-262" name="line-262"></a> +<a id="line-263" name="line-263"></a><span class="n">LogviewManager</span><span class="o">*</span> +<a id="line-264" name="line-264"></a><span class="nf">logview_manager_get</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-265" name="line-265"></a><span class="p">{</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">singleton</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">singleton</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_TYPE_MANAGER</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="p">}</span> +<a id="line-269" name="line-269"></a> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">singleton</span><span class="p">;</span> +<a id="line-271" name="line-271"></a><span class="p">}</span> +<a id="line-272" name="line-272"></a> +<a id="line-273" name="line-273"></a><span class="kt">void</span> +<a id="line-274" name="line-274"></a><span class="nf">logview_manager_set_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-276" name="line-276"></a><span class="p">{</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">old_log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">;</span> +<a id="line-280" name="line-280"></a> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-282" name="line-282"></a> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_log</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">old_log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_log</span><span class="p">;</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="p">}</span> +<a id="line-286" name="line-286"></a> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-288" name="line-288"></a> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_log_get_gfile</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">logview_prefs_store_active_logfile</span><span class="w"> </span><span class="p">(</span><span class="n">logview_prefs_get</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-294" name="line-294"></a> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">ACTIVE_CHANGED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="n">old_log</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-296" name="line-296"></a> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">old_log</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">old_log</span><span class="p">);</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="p">}</span> +<a id="line-300" name="line-300"></a><span class="p">}</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span> +<a id="line-303" name="line-303"></a><span class="nf">logview_manager_get_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">)</span> +<a id="line-304" name="line-304"></a><span class="p">{</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-306" name="line-306"></a> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_log</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">?</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_log</span><span class="p">)</span><span class="w"> </span><span class="o">:</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-310" name="line-310"></a><span class="p">}</span> +<a id="line-311" name="line-311"></a> +<a id="line-312" name="line-312"></a><span class="kt">void</span> +<a id="line-313" name="line-313"></a><span class="nf">logview_manager_add_log_from_gfile</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">,</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">set_active</span><span class="p">)</span> +<a id="line-316" name="line-316"></a><span class="p">{</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-318" name="line-318"></a> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">add_log_from_gfile_internal</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">set_active</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-320" name="line-320"></a><span class="p">}</span> +<a id="line-321" name="line-321"></a> +<a id="line-322" name="line-322"></a><span class="kt">void</span> +<a id="line-323" name="line-323"></a><span class="nf">logview_manager_add_logs_from_name_list</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">names</span><span class="p">,</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">active</span><span class="p">)</span> +<a id="line-326" name="line-326"></a><span class="p">{</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-328" name="line-328"></a> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">op</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-331" name="line-331"></a> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">op</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">multiple_creation_op_new</span><span class="w"> </span><span class="p">(</span><span class="n">g_slist_length</span><span class="w"> </span><span class="p">(</span><span class="n">names</span><span class="p">));</span> +<a id="line-333" name="line-333"></a> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">names</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="n">logview_manager_add_log_from_name</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">,</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="p">(</span><span class="n">g_ascii_strcasecmp</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="p">,</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">),</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="p">}</span> +<a id="line-339" name="line-339"></a><span class="p">}</span> +<a id="line-340" name="line-340"></a> +<a id="line-341" name="line-341"></a><span class="kt">void</span> +<a id="line-342" name="line-342"></a><span class="nf">logview_manager_add_logs_from_names</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">names</span><span class="p">,</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">active</span><span class="p">)</span> +<a id="line-345" name="line-345"></a><span class="p">{</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">set_active</span><span class="p">;</span> +<a id="line-348" name="line-348"></a> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">op</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-351" name="line-351"></a> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">op</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">multiple_creation_op_new</span><span class="w"> </span><span class="p">(</span><span class="n">g_strv_length</span><span class="w"> </span><span class="p">(</span><span class="n">names</span><span class="p">));</span> +<a id="line-353" name="line-353"></a> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">names</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">set_active</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_ascii_strcasecmp</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="p">,</span><span class="w"> </span><span class="n">names</span><span class="p">[</span><span class="n">i</span><span class="p">]));</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="n">logview_manager_add_log_from_name</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">names</span><span class="p">[</span><span class="n">i</span><span class="p">],</span><span class="w"> </span><span class="n">set_active</span><span class="p">,</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="p">}</span> +<a id="line-359" name="line-359"></a><span class="p">}</span> +<a id="line-360" name="line-360"></a> +<a id="line-361" name="line-361"></a><span class="kt">int</span> +<a id="line-362" name="line-362"></a><span class="nf">logview_manager_get_log_count</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">)</span> +<a id="line-363" name="line-363"></a><span class="p">{</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-365" name="line-365"></a> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_hash_table_size</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logs</span><span class="p">);</span> +<a id="line-367" name="line-367"></a><span class="p">}</span> +<a id="line-368" name="line-368"></a> +<a id="line-369" name="line-369"></a><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span> +<a id="line-370" name="line-370"></a><span class="nf">logview_manager_get_if_loaded</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">uri</span><span class="p">)</span> +<a id="line-371" name="line-371"></a><span class="p">{</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">;</span> +<a id="line-373" name="line-373"></a> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-375" name="line-375"></a> +<a id="line-376" name="line-376"></a><span class="w"> </span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_hash_table_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logs</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span> +<a id="line-377" name="line-377"></a> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="p">}</span> +<a id="line-381" name="line-381"></a> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-383" name="line-383"></a><span class="p">}</span> +<a id="line-384" name="line-384"></a> +<a id="line-385" name="line-385"></a><span class="kt">void</span> +<a id="line-386" name="line-386"></a><span class="nf">logview_manager_close_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">)</span> +<a id="line-387" name="line-387"></a><span class="p">{</span> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">active_log</span><span class="p">;</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">log_uri</span><span class="p">;</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-391" name="line-391"></a> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-393" name="line-393"></a> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">active_log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_log</span><span class="p">;</span> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">active_log</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="p">}</span> +<a id="line-398" name="line-398"></a> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">log_uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_log_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">active_log</span><span class="p">);</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_log_get_gfile</span><span class="w"> </span><span class="p">(</span><span class="n">active_log</span><span class="p">);</span> +<a id="line-401" name="line-401"></a> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LOG_CLOSED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">active_log</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-403" name="line-403"></a> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">logview_prefs_remove_stored_log</span><span class="w"> </span><span class="p">(</span><span class="n">logview_prefs_get</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">file</span><span class="p">);</span> +<a id="line-405" name="line-405"></a> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-407" name="line-407"></a> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="cm">/* drop the hash table ref */</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">g_hash_table_remove</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logs</span><span class="p">,</span><span class="w"> </span><span class="n">log_uri</span><span class="p">);</span> +<a id="line-410" name="line-410"></a> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">log_uri</span><span class="p">);</span> +<a id="line-412" name="line-412"></a> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="cm">/* someone else will take care of setting the next active log to us */</span> +<a id="line-414" name="line-414"></a><span class="p">}</span> +<a id="line-415" name="line-415"></a> +<a id="line-416" name="line-416"></a><span class="n">gboolean</span> +<a id="line-417" name="line-417"></a><span class="nf">logview_manager_log_is_active</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-418" name="line-418"></a><span class="hll"><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span><span class="error2"><--- Parameter 'log' can be declared as pointer to const</span> +</span><a id="line-419" name="line-419"></a><span class="p">{</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_MANAGER</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-421" name="line-421"></a> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_log</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-423" name="line-423"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/23.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/23.html new file mode 100644 index 00000000..0d7a59ab --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/23.html @@ -0,0 +1,1389 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: logview/src/logview-prefs.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> logview-prefs.c</p> +<a href="23.html#line-148"> variableScope 148</a><a href="23.html#line-149"> variableScope 149</a><a href="23.html#line-150"> variableScope 150</a><a href="23.html#line-151"> variableScope 151</a><a href="23.html#line-385"> variableScope 385</a><a href="23.html#line-425"> variableScope 425</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span> +<span class="normal">533</span> +<span class="normal">534</span> +<span class="normal">535</span> +<span class="normal">536</span> +<span class="normal">537</span> +<span class="normal">538</span> +<span class="normal">539</span> +<span class="normal">540</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) 1998 Cesar Miquel <[email protected]></span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2004 Vincent Noel</span> +<a id="line-4" name="line-4"></a><span class="cm"> * Copyright (C) 2006 Emmanuele Bassi</span> +<a id="line-5" name="line-5"></a><span class="cm"> * Copyright (C) 2008 Cosimo Cecchi <[email protected]></span> +<a id="line-6" name="line-6"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-7" name="line-7"></a><span class="cm"> *</span> +<a id="line-8" name="line-8"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-9" name="line-9"></a><span class="cm"> *</span> +<a id="line-10" name="line-10"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-11" name="line-11"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-12" name="line-12"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-13" name="line-13"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-14" name="line-14"></a><span class="cm"> *</span> +<a id="line-15" name="line-15"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-16" name="line-16"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-17" name="line-17"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-18" name="line-18"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-19" name="line-19"></a><span class="cm"> *</span> +<a id="line-20" name="line-20"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-21" name="line-21"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-22" name="line-22"></a><span class="cm"> */</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-26" name="line-26"></a><span class="cp">#endif</span> +<a id="line-27" name="line-27"></a> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><sys/stat.h></span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-31" name="line-31"></a> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-prefs.h"</span> +<a id="line-33" name="line-33"></a> +<a id="line-34" name="line-34"></a><span class="cp">#define LOGVIEW_DEFAULT_HEIGHT 400</span> +<a id="line-35" name="line-35"></a><span class="cp">#define LOGVIEW_DEFAULT_WIDTH 600</span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="cm">/* logview settings */</span> +<a id="line-38" name="line-38"></a><span class="cp">#define LOGVIEW_SCHEMA "org.mate.system-log"</span> +<a id="line-39" name="line-39"></a><span class="cp">#define PREF_WIDTH "width"</span> +<a id="line-40" name="line-40"></a><span class="cp">#define PREF_HEIGHT "height"</span> +<a id="line-41" name="line-41"></a><span class="cp">#define PREF_LOGFILE "logfile"</span> +<a id="line-42" name="line-42"></a><span class="cp">#define PREF_LOGFILES "logfiles"</span> +<a id="line-43" name="line-43"></a><span class="cp">#define PREF_FONTSIZE "fontsize"</span> +<a id="line-44" name="line-44"></a><span class="cp">#define PREF_FILTERS "filters"</span> +<a id="line-45" name="line-45"></a> +<a id="line-46" name="line-46"></a><span class="cm">/* desktop-wide settings */</span> +<a id="line-47" name="line-47"></a><span class="cp">#define MATE_MONOSPACE_FONT_NAME "monospace-font-name"</span> +<a id="line-48" name="line-48"></a><span class="cp">#define MATE_MENUS_HAVE_TEAROFF "menus-have-tearoff"</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="k">static</span><span class="w"> </span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">singleton</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-51" name="line-51"></a> +<a id="line-52" name="line-52"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="n">SYSTEM_FONT_CHANGED</span><span class="p">,</span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">HAVE_TEAROFF_CHANGED</span><span class="p">,</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-56" name="line-56"></a><span class="p">};</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">FILTER_NAME</span><span class="p">,</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">FILTER_INVISIBLE</span><span class="p">,</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">FILTER_FOREGROUND</span><span class="p">,</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="n">FILTER_BACKGROUND</span><span class="p">,</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">FILTER_REGEX</span><span class="p">,</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">MAX_TOKENS</span> +<a id="line-65" name="line-65"></a><span class="p">};</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-68" name="line-68"></a> +<a id="line-69" name="line-69"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_LogviewPrefsPrivate</span><span class="w"> </span><span class="p">{</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="n">logview_prefs</span><span class="p">;</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="n">interface_prefs</span><span class="p">;</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">GHashTable</span><span class="w"> </span><span class="o">*</span><span class="n">filters</span><span class="p">;</span> +<a id="line-74" name="line-74"></a><span class="p">};</span> +<a id="line-75" name="line-75"></a> +<a id="line-76" name="line-76"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="p">,</span><span class="w"> </span><span class="n">logview_prefs</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_OBJECT</span><span class="p">);</span> +<a id="line-77" name="line-77"></a> +<a id="line-78" name="line-78"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-79" name="line-79"></a><span class="nf">do_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">obj</span><span class="p">)</span> +<a id="line-80" name="line-80"></a><span class="p">{</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> +<a id="line-82" name="line-82"></a> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">g_hash_table_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">filters</span><span class="p">);</span> +<a id="line-84" name="line-84"></a> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">);</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">interface_prefs</span><span class="p">);</span> +<a id="line-87" name="line-87"></a> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">logview_prefs_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> +<a id="line-89" name="line-89"></a><span class="p">}</span> +<a id="line-90" name="line-90"></a> +<a id="line-91" name="line-91"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-92" name="line-92"></a><span class="nf">logview_prefs_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefsClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-93" name="line-93"></a><span class="p">{</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">oclass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-95" name="line-95"></a> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">oclass</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">do_finalize</span><span class="p">;</span> +<a id="line-97" name="line-97"></a> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">SYSTEM_FONT_CHANGED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"system-font-changed"</span><span class="p">,</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">oclass</span><span class="p">),</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefsClass</span><span class="p">,</span><span class="w"> </span><span class="n">system_font_changed</span><span class="p">),</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__STRING</span><span class="p">,</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">);</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">HAVE_TEAROFF_CHANGED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"have-tearoff-changed"</span><span class="p">,</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">oclass</span><span class="p">),</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefsClass</span><span class="p">,</span><span class="w"> </span><span class="n">have_tearoff_changed</span><span class="p">),</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__BOOLEAN</span><span class="p">,</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">G_TYPE_BOOLEAN</span><span class="p">);</span> +<a id="line-114" name="line-114"></a><span class="p">}</span> +<a id="line-115" name="line-115"></a> +<a id="line-116" name="line-116"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-117" name="line-117"></a><span class="nf">have_tearoff_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="n">settings</span><span class="p">,</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-120" name="line-120"></a><span class="p">{</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">add_tearoffs</span><span class="p">;</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">add_tearoffs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">);</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">HAVE_TEAROFF_CHANGED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">add_tearoffs</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-126" name="line-126"></a><span class="p">}</span> +<a id="line-127" name="line-127"></a> +<a id="line-128" name="line-128"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-129" name="line-129"></a><span class="nf">monospace_font_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="n">settings</span><span class="p">,</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-132" name="line-132"></a><span class="p">{</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">monospace_font_name</span><span class="p">;</span> +<a id="line-135" name="line-135"></a> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">monospace_font_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">);</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">signals</span><span class="p">[</span><span class="n">SYSTEM_FONT_CHANGED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">monospace_font_name</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-138" name="line-138"></a> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">monospace_font_name</span><span class="p">);</span> +<a id="line-140" name="line-140"></a><span class="p">}</span> +<a id="line-141" name="line-141"></a> +<a id="line-142" name="line-142"></a><span class="cp">#define DELIMITER ":"</span> +<a id="line-143" name="line-143"></a> +<a id="line-144" name="line-144"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-145" name="line-145"></a><span class="nf">load_filters</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">)</span> +<a id="line-146" name="line-146"></a><span class="p">{</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">filters</span><span class="p">;</span> +<a id="line-148" name="line-148"></a><span class="hll"><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">tokens</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'tokens' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'tokens' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-149" name="line-149"></a><span class="hll"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'str' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'str' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-150" name="line-150"></a><span class="hll"><span class="w"> </span><span class="n">LogviewFilter</span><span class="w"> </span><span class="o">*</span><span class="n">filter</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'filter' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'filter' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-151" name="line-151"></a><span class="hll"><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">tag</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'tag' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'tag' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">GdkRGBA</span><span class="w"> </span><span class="n">color</span><span class="p">;</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-154" name="line-154"></a> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_strv</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="n">PREF_FILTERS</span><span class="p">);</span> +<a id="line-157" name="line-157"></a> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_hash_table_new_full</span><span class="w"> </span><span class="p">(</span><span class="n">g_str_hash</span><span class="p">,</span><span class="w"> </span><span class="n">g_str_equal</span><span class="p">,</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">g_free</span><span class="p">,</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="p">);</span> +<a id="line-161" name="line-161"></a> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">filters</span><span class="p">[</span><span class="n">idx</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">filters</span><span class="p">[</span><span class="n">idx</span><span class="p">];</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">tokens</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strsplit</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">DELIMITER</span><span class="p">,</span><span class="w"> </span><span class="n">MAX_TOKENS</span><span class="p">);</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">filter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_filter_new</span><span class="w"> </span><span class="p">(</span><span class="n">tokens</span><span class="p">[</span><span class="n">FILTER_NAME</span><span class="p">],</span><span class="w"> </span><span class="n">tokens</span><span class="p">[</span><span class="n">FILTER_REGEX</span><span class="p">]);</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_tag_new</span><span class="w"> </span><span class="p">(</span><span class="n">tokens</span><span class="p">[</span><span class="n">FILTER_NAME</span><span class="p">]);</span> +<a id="line-167" name="line-167"></a> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">g_str_equal</span><span class="w"> </span><span class="p">(</span><span class="n">tokens</span><span class="p">[</span><span class="n">FILTER_INVISIBLE</span><span class="p">],</span><span class="w"> </span><span class="s">"1"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-170" name="line-170"></a> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">tokens</span><span class="p">[</span><span class="n">FILTER_FOREGROUND</span><span class="p">]))</span><span class="w"> </span><span class="p">{</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="n">gdk_rgba_parse</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">color</span><span class="p">,</span><span class="w"> </span><span class="n">tokens</span><span class="p">[</span><span class="n">FILTER_FOREGROUND</span><span class="p">]);</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="s">"foreground-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">color</span><span class="p">,</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="s">"foreground-set"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="p">}</span> +<a id="line-176" name="line-176"></a> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">tokens</span><span class="p">[</span><span class="n">FILTER_BACKGROUND</span><span class="p">]))</span><span class="w"> </span><span class="p">{</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">gdk_rgba_parse</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">color</span><span class="p">,</span><span class="w"> </span><span class="n">tokens</span><span class="p">[</span><span class="n">FILTER_BACKGROUND</span><span class="p">]);</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="s">"paragraph-background-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">color</span><span class="p">,</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="s">"paragraph-background-set"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="p">}</span> +<a id="line-182" name="line-182"></a> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">,</span><span class="w"> </span><span class="s">"texttag"</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">g_hash_table_insert</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">filters</span><span class="p">,</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">g_strdup</span><span class="p">(</span><span class="n">tokens</span><span class="p">[</span><span class="n">FILTER_NAME</span><span class="p">]),</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">filter</span><span class="p">);</span> +<a id="line-187" name="line-187"></a> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">);</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">tokens</span><span class="p">);</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="p">}</span> +<a id="line-192" name="line-192"></a> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">filters</span><span class="p">);</span> +<a id="line-194" name="line-194"></a><span class="p">}</span> +<a id="line-195" name="line-195"></a> +<a id="line-196" name="line-196"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-197" name="line-197"></a><span class="nf">save_filter_foreach_func</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">key</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-198" name="line-198"></a><span class="p">{</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">filters</span><span class="p">;</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">LogviewFilter</span><span class="w"> </span><span class="o">*</span><span class="n">filter</span><span class="p">;</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">GdkRGBA</span><span class="w"> </span><span class="o">*</span><span class="n">foreground</span><span class="p">;</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">foreground_set</span><span class="p">;</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">GdkRGBA</span><span class="w"> </span><span class="o">*</span><span class="n">background</span><span class="p">;</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">background_set</span><span class="p">;</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">regex</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">color</span><span class="p">;</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">invisible</span><span class="p">;</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">tag</span><span class="p">;</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">prefs_string</span><span class="p">;</span> +<a id="line-210" name="line-210"></a> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">filter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_FILTER</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">key</span><span class="p">;</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">color</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-215" name="line-215"></a> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">prefs_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">prefs_string</span><span class="p">,</span><span class="w"> </span><span class="n">DELIMITER</span><span class="p">);</span> +<a id="line-218" name="line-218"></a> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">,</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="s">"regex"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">regex</span><span class="p">,</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="s">"texttag"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">tag</span><span class="p">,</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="s">"foreground-set"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">foreground_set</span><span class="p">,</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="s">"foreground-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">foreground</span><span class="p">,</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="s">"paragraph-background-set"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">background_set</span><span class="p">,</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="s">"paragraph-background-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">background</span><span class="p">,</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">invisible</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-229" name="line-229"></a> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">invisible</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">prefs_string</span><span class="p">,</span><span class="w"> </span><span class="s">"1"</span><span class="w"> </span><span class="n">DELIMITER</span><span class="p">);</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">prefs_string</span><span class="p">,</span><span class="w"> </span><span class="s">"0"</span><span class="w"> </span><span class="n">DELIMITER</span><span class="p">);</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="p">}</span> +<a id="line-235" name="line-235"></a> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">foreground_set</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">color</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_rgba_to_string</span><span class="w"> </span><span class="p">(</span><span class="n">foreground</span><span class="p">);</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">prefs_string</span><span class="p">,</span><span class="w"> </span><span class="n">color</span><span class="p">);</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">color</span><span class="p">);</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="p">}</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">foreground</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">gdk_rgba_free</span><span class="w"> </span><span class="p">(</span><span class="n">foreground</span><span class="p">);</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="p">}</span> +<a id="line-245" name="line-245"></a> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">prefs_string</span><span class="p">,</span><span class="w"> </span><span class="n">DELIMITER</span><span class="p">);</span> +<a id="line-247" name="line-247"></a> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">background_set</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">color</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_rgba_to_string</span><span class="w"> </span><span class="p">(</span><span class="n">background</span><span class="p">);</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">prefs_string</span><span class="p">,</span><span class="w"> </span><span class="n">color</span><span class="p">);</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">color</span><span class="p">);</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="p">}</span> +<a id="line-253" name="line-253"></a> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">background</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">gdk_rgba_free</span><span class="w"> </span><span class="p">(</span><span class="n">background</span><span class="p">);</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="p">}</span> +<a id="line-257" name="line-257"></a> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">prefs_string</span><span class="p">,</span><span class="w"> </span><span class="n">DELIMITER</span><span class="p">);</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">prefs_string</span><span class="p">,</span><span class="w"> </span><span class="n">regex</span><span class="p">);</span> +<a id="line-260" name="line-260"></a> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">regex</span><span class="p">);</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> +<a id="line-263" name="line-263"></a> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">filters</span><span class="p">,</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">prefs_string</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">));</span> +<a id="line-265" name="line-265"></a><span class="p">}</span> +<a id="line-266" name="line-266"></a> +<a id="line-267" name="line-267"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-268" name="line-268"></a><span class="nf">save_filters</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">)</span> +<a id="line-269" name="line-269"></a><span class="p">{</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">filters</span><span class="p">;</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">filters_strv</span><span class="p">;</span> +<a id="line-272" name="line-272"></a> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="n">g_hash_table_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">filters</span><span class="p">,</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">save_filter_foreach_func</span><span class="p">,</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">filters</span><span class="p">);</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">filters</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-278" name="line-278"></a> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">filters_strv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">filters</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">g_settings_set_strv</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">PREF_FILTERS</span><span class="p">,</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">filters_strv</span><span class="p">);</span> +<a id="line-283" name="line-283"></a> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">filters_strv</span><span class="p">);</span> +<a id="line-285" name="line-285"></a><span class="p">}</span> +<a id="line-286" name="line-286"></a> +<a id="line-287" name="line-287"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-288" name="line-288"></a><span class="nf">get_filters_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">key</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-289" name="line-289"></a><span class="p">{</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">**</span><span class="n">list</span><span class="p">;</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_append</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">value</span><span class="p">);</span> +<a id="line-293" name="line-293"></a><span class="p">}</span> +<a id="line-294" name="line-294"></a> +<a id="line-295" name="line-295"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-296" name="line-296"></a><span class="nf">logview_prefs_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">self</span><span class="p">)</span> +<a id="line-297" name="line-297"></a><span class="p">{</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">LogviewPrefsPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">self</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">self</span><span class="p">);</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_SCHEMA</span><span class="p">);</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">interface_prefs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="s">"org.mate.interface"</span><span class="p">);</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">interface_prefs</span><span class="p">,</span><span class="w"> </span><span class="s">"changed::"</span><span class="w"> </span><span class="n">MATE_MONOSPACE_FONT_NAME</span><span class="p">,</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">monospace_font_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">self</span><span class="p">);</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">interface_prefs</span><span class="p">,</span><span class="w"> </span><span class="s">"changed::"</span><span class="w"> </span><span class="n">MATE_MENUS_HAVE_TEAROFF</span><span class="p">,</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">have_tearoff_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">self</span><span class="p">);</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">load_filters</span><span class="w"> </span><span class="p">(</span><span class="n">self</span><span class="p">);</span> +<a id="line-311" name="line-311"></a><span class="p">}</span> +<a id="line-312" name="line-312"></a> +<a id="line-313" name="line-313"></a><span class="cm">/* public methods */</span> +<a id="line-314" name="line-314"></a> +<a id="line-315" name="line-315"></a><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span> +<a id="line-316" name="line-316"></a><span class="nf">logview_prefs_get</span><span class="w"> </span><span class="p">()</span> +<a id="line-317" name="line-317"></a><span class="p">{</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">singleton</span><span class="p">)</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">singleton</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_TYPE_PREFS</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-320" name="line-320"></a> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">singleton</span><span class="p">;</span> +<a id="line-322" name="line-322"></a><span class="p">}</span> +<a id="line-323" name="line-323"></a> +<a id="line-324" name="line-324"></a><span class="kt">void</span> +<a id="line-325" name="line-325"></a><span class="nf">logview_prefs_store_window_size</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">,</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">height</span><span class="p">)</span> +<a id="line-327" name="line-327"></a><span class="p">{</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-329" name="line-329"></a> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">g_settings_set_int</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">PREF_WIDTH</span><span class="p">,</span><span class="w"> </span><span class="n">width</span><span class="p">);</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">g_settings_set_int</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="n">PREF_HEIGHT</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">);</span> +<a id="line-334" name="line-334"></a><span class="p">}</span> +<a id="line-335" name="line-335"></a> +<a id="line-336" name="line-336"></a><span class="kt">void</span> +<a id="line-337" name="line-337"></a><span class="nf">logview_prefs_get_stored_window_size</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">,</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">height</span><span class="p">)</span> +<a id="line-339" name="line-339"></a><span class="p">{</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-341" name="line-341"></a> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="o">*</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_int</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">PREF_WIDTH</span><span class="p">);</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="o">*</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_int</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">PREF_HEIGHT</span><span class="p">);</span> +<a id="line-346" name="line-346"></a> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="o">*</span><span class="n">width</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">^</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">height</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="cm">/* if one of the two failed, return default for both */</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="o">*</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_DEFAULT_WIDTH</span><span class="p">;</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="o">*</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_DEFAULT_HEIGHT</span><span class="p">;</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="p">}</span> +<a id="line-352" name="line-352"></a><span class="p">}</span> +<a id="line-353" name="line-353"></a> +<a id="line-354" name="line-354"></a><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-355" name="line-355"></a><span class="nf">logview_prefs_get_monospace_font_name</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">)</span> +<a id="line-356" name="line-356"></a><span class="p">{</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-358" name="line-358"></a> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">interface_prefs</span><span class="p">,</span><span class="w"> </span><span class="n">MATE_MONOSPACE_FONT_NAME</span><span class="p">));</span> +<a id="line-360" name="line-360"></a><span class="p">}</span> +<a id="line-361" name="line-361"></a> +<a id="line-362" name="line-362"></a><span class="n">gboolean</span> +<a id="line-363" name="line-363"></a><span class="nf">logview_prefs_get_have_tearoff</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">)</span> +<a id="line-364" name="line-364"></a><span class="p">{</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-366" name="line-366"></a> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">interface_prefs</span><span class="p">,</span><span class="w"> </span><span class="n">MATE_MENUS_HAVE_TEAROFF</span><span class="p">));</span> +<a id="line-368" name="line-368"></a><span class="p">}</span> +<a id="line-369" name="line-369"></a> +<a id="line-370" name="line-370"></a><span class="cm">/* the elements should be freed with g_free () */</span> +<a id="line-371" name="line-371"></a> +<a id="line-372" name="line-372"></a><span class="n">gchar</span><span class="w"> </span><span class="o">**</span> +<a id="line-373" name="line-373"></a><span class="nf">logview_prefs_get_stored_logfiles</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">)</span> +<a id="line-374" name="line-374"></a><span class="p">{</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_settings_get_strv</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">PREF_LOGFILES</span><span class="p">);</span> +<a id="line-379" name="line-379"></a><span class="p">}</span> +<a id="line-380" name="line-380"></a> +<a id="line-381" name="line-381"></a><span class="kt">void</span> +<a id="line-382" name="line-382"></a><span class="nf">logview_prefs_store_log</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-383" name="line-383"></a><span class="p">{</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">stored_logs</span><span class="p">;</span> +<a id="line-385" name="line-385"></a><span class="hll"><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">stored</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'stored' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'stored' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">,</span><span class="w"> </span><span class="n">old_size</span><span class="p">;</span> +<a id="line-388" name="line-388"></a> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">G_IS_FILE</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">));</span> +<a id="line-391" name="line-391"></a> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">stored_logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_stored_logfiles</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">);</span> +<a id="line-393" name="line-393"></a> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">stored_logs</span><span class="p">[</span><span class="n">idx</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">stored</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_parse_name</span><span class="w"> </span><span class="p">(</span><span class="n">stored_logs</span><span class="p">[</span><span class="n">idx</span><span class="p">]);</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_equal</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="n">stored</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="p">}</span> +<a id="line-399" name="line-399"></a> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">stored</span><span class="p">);</span> +<a id="line-401" name="line-401"></a> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">found</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="p">}</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="p">}</span> +<a id="line-406" name="line-406"></a> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">found</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">old_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strv_length</span><span class="w"> </span><span class="p">(</span><span class="n">stored_logs</span><span class="p">);</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">stored_logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_realloc</span><span class="w"> </span><span class="p">(</span><span class="n">stored_logs</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">old_size</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">));</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="n">stored_logs</span><span class="p">[</span><span class="n">old_size</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_parse_name</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">stored_logs</span><span class="p">[</span><span class="n">old_size</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-412" name="line-412"></a> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">g_settings_set_strv</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="n">PREF_LOGFILES</span><span class="p">,</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">stored_logs</span><span class="p">);</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="p">}</span> +<a id="line-417" name="line-417"></a> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">stored_logs</span><span class="p">);</span> +<a id="line-419" name="line-419"></a><span class="p">}</span> +<a id="line-420" name="line-420"></a> +<a id="line-421" name="line-421"></a><span class="kt">void</span> +<a id="line-422" name="line-422"></a><span class="nf">logview_prefs_remove_stored_log</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">target</span><span class="p">)</span> +<a id="line-423" name="line-423"></a><span class="p">{</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">stored_logs</span><span class="p">;</span> +<a id="line-425" name="line-425"></a><span class="hll"><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">stored</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'stored' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'stored' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">new_value</span><span class="p">;</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">idx</span><span class="p">;</span> +<a id="line-428" name="line-428"></a> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">G_IS_FILE</span><span class="w"> </span><span class="p">(</span><span class="n">target</span><span class="p">));</span> +<a id="line-431" name="line-431"></a> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">stored_logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_stored_logfiles</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">);</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="n">new_value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-434" name="line-434"></a> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">stored_logs</span><span class="p">[</span><span class="n">idx</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">stored</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_parse_name</span><span class="w"> </span><span class="p">(</span><span class="n">stored_logs</span><span class="p">[</span><span class="n">idx</span><span class="p">]);</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_file_equal</span><span class="w"> </span><span class="p">(</span><span class="n">stored</span><span class="p">,</span><span class="w"> </span><span class="n">target</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">new_value</span><span class="p">,</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">stored_logs</span><span class="p">[</span><span class="n">idx</span><span class="p">]));</span> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="p">}</span> +<a id="line-440" name="line-440"></a> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">stored</span><span class="p">);</span> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="p">}</span> +<a id="line-443" name="line-443"></a> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">new_value</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">stored_logs</span><span class="p">);</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="n">stored_logs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">new_value</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-447" name="line-447"></a> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">g_settings_set_strv</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="n">PREF_LOGFILES</span><span class="p">,</span> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">stored_logs</span><span class="p">);</span> +<a id="line-451" name="line-451"></a> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">stored_logs</span><span class="p">);</span> +<a id="line-453" name="line-453"></a><span class="p">}</span> +<a id="line-454" name="line-454"></a> +<a id="line-455" name="line-455"></a><span class="kt">void</span> +<a id="line-456" name="line-456"></a><span class="nf">logview_prefs_store_fontsize</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">fontsize</span><span class="p">)</span> +<a id="line-457" name="line-457"></a><span class="p">{</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">fontsize</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-460" name="line-460"></a> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="n">g_settings_set_int</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span><span class="w"> </span><span class="n">PREF_FONTSIZE</span><span class="p">,</span><span class="w"> </span><span class="n">fontsize</span><span class="p">);</span> +<a id="line-462" name="line-462"></a><span class="p">}</span> +<a id="line-463" name="line-463"></a> +<a id="line-464" name="line-464"></a><span class="kt">int</span> +<a id="line-465" name="line-465"></a><span class="nf">logview_prefs_get_stored_fontsize</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">)</span> +<a id="line-466" name="line-466"></a><span class="p">{</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-468" name="line-468"></a> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_settings_get_int</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span><span class="w"> </span><span class="n">PREF_FONTSIZE</span><span class="p">);</span> +<a id="line-470" name="line-470"></a><span class="p">}</span> +<a id="line-471" name="line-471"></a> +<a id="line-472" name="line-472"></a><span class="kt">void</span> +<a id="line-473" name="line-473"></a><span class="nf">logview_prefs_store_active_logfile</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">,</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">filename</span><span class="p">)</span> +<a id="line-475" name="line-475"></a><span class="p">{</span> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-477" name="line-477"></a> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">g_settings_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">PREF_LOGFILE</span><span class="p">,</span><span class="w"> </span><span class="n">filename</span><span class="p">);</span> +<a id="line-480" name="line-480"></a><span class="p">}</span> +<a id="line-481" name="line-481"></a> +<a id="line-482" name="line-482"></a><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-483" name="line-483"></a><span class="nf">logview_prefs_get_active_logfile</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">)</span> +<a id="line-484" name="line-484"></a><span class="p">{</span> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-486" name="line-486"></a> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">logview_prefs</span><span class="p">,</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">PREF_LOGFILE</span><span class="p">);</span> +<a id="line-489" name="line-489"></a><span class="p">}</span> +<a id="line-490" name="line-490"></a> +<a id="line-491" name="line-491"></a><span class="n">GList</span><span class="w"> </span><span class="o">*</span> +<a id="line-492" name="line-492"></a><span class="nf">logview_prefs_get_filters</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">)</span> +<a id="line-493" name="line-493"></a><span class="p">{</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-495" name="line-495"></a> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-497" name="line-497"></a> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="n">g_hash_table_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">filters</span><span class="p">,</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="n">get_filters_foreach</span><span class="p">,</span> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="o">&</span><span class="n">filters</span><span class="p">);</span> +<a id="line-501" name="line-501"></a> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">filters</span><span class="p">;</span> +<a id="line-503" name="line-503"></a><span class="p">}</span> +<a id="line-504" name="line-504"></a> +<a id="line-505" name="line-505"></a><span class="kt">void</span> +<a id="line-506" name="line-506"></a><span class="nf">logview_prefs_remove_filter</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">,</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">)</span> +<a id="line-508" name="line-508"></a><span class="p">{</span> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-510" name="line-510"></a> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="n">g_hash_table_remove</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">filters</span><span class="p">,</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-513" name="line-513"></a> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">save_filters</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">);</span> +<a id="line-515" name="line-515"></a><span class="p">}</span> +<a id="line-516" name="line-516"></a> +<a id="line-517" name="line-517"></a><span class="kt">void</span> +<a id="line-518" name="line-518"></a><span class="nf">logview_prefs_add_filter</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">,</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="n">LogviewFilter</span><span class="w"> </span><span class="o">*</span><span class="n">filter</span><span class="p">)</span> +<a id="line-520" name="line-520"></a><span class="p">{</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">gchar</span><span class="o">*</span><span class="w"> </span><span class="n">name</span><span class="p">;</span> +<a id="line-522" name="line-522"></a> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_FILTER</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">));</span> +<a id="line-525" name="line-525"></a> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">,</span><span class="w"> </span><span class="s">"name"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="n">g_hash_table_insert</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">filters</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">));</span> +<a id="line-528" name="line-528"></a> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">save_filters</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">);</span> +<a id="line-530" name="line-530"></a><span class="p">}</span> +<a id="line-531" name="line-531"></a> +<a id="line-532" name="line-532"></a><span class="n">LogviewFilter</span><span class="w"> </span><span class="o">*</span> +<a id="line-533" name="line-533"></a><span class="nf">logview_prefs_get_filter</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">,</span> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">)</span> +<a id="line-535" name="line-535"></a><span class="p">{</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_PREFS</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="p">));</span> +<a id="line-537" name="line-537"></a> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_hash_table_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">prefs</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">filters</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-539" name="line-539"></a><span class="p">}</span> +<a id="line-540" name="line-540"></a> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/24.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/24.html new file mode 100644 index 00000000..6292d22f --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/24.html @@ -0,0 +1,1023 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: logview/src/logview-resources.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> logview-resources.c</p> +<a href="24.html#line-9"> unusedStructMember 9</a><a href="24.html#line-9"> unusedStructMember 9</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-2" name="line-2"></a> +<a id="line-3" name="line-3"></a><span class="cp">#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))</span> +<a id="line-4" name="line-4"></a><span class="cp"># define SECTION __attribute__ ((section (".gresource.logview"), aligned (8)))</span> +<a id="line-5" name="line-5"></a><span class="cp">#else</span> +<a id="line-6" name="line-6"></a><span class="cp"># define SECTION</span> +<a id="line-7" name="line-7"></a><span class="cp">#endif</span> +<a id="line-8" name="line-8"></a> +<a id="line-9" name="line-9"></a><span class="hll"><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">SECTION</span><span class="w"> </span><span class="k">union</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">guint8</span><span class="w"> </span><span class="n">data</span><span class="p">[</span><span class="mi">2997</span><span class="p">];</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">alignment</span><span class="p">;</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">ptr</span><span class="p">;}</span><span class="w"> </span><span class="n">logview_resource_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">{</span><span class="error2"><--- union member 'Anonymous0::alignment' is never used.</span><span class="error2"><--- union member 'Anonymous0::ptr' is never used.</span> +</span><a id="line-10" name="line-10"></a><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-11" name="line-11"></a><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-12" name="line-12"></a><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-13" name="line-13"></a><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-14" name="line-14"></a><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-15" name="line-15"></a><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-16" name="line-16"></a><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span> +<a id="line-17" name="line-17"></a><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-18" name="line-18"></a><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-19" name="line-19"></a><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-20" name="line-20"></a><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-21" name="line-21"></a><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-22" name="line-22"></a><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-23" name="line-23"></a><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span> +<a id="line-24" name="line-24"></a><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-25" name="line-25"></a><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span> +<a id="line-26" name="line-26"></a><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span> +<a id="line-27" name="line-27"></a><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span> +<a id="line-28" name="line-28"></a><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span> +<a id="line-29" name="line-29"></a><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span> +<a id="line-30" name="line-30"></a><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span> +<a id="line-31" name="line-31"></a><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span> +<a id="line-32" name="line-32"></a><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span> +<a id="line-33" name="line-33"></a><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span> +<a id="line-34" name="line-34"></a><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span> +<a id="line-35" name="line-35"></a><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span> +<a id="line-38" name="line-38"></a><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span> +<a id="line-39" name="line-39"></a><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span> +<a id="line-40" name="line-40"></a><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span> +<a id="line-41" name="line-41"></a><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span> +<a id="line-42" name="line-42"></a><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span> +<a id="line-43" name="line-43"></a><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span> +<a id="line-198" name="line-198"></a><span class="p">}</span><span class="w"> </span><span class="p">};</span> +<a id="line-199" name="line-199"></a> +<a id="line-200" name="line-200"></a><span class="k">static</span><span class="w"> </span><span class="n">GStaticResource</span><span class="w"> </span><span class="n">static_resource</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">logview_resource_data</span><span class="p">.</span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">logview_resource_data</span><span class="p">.</span><span class="n">data</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="cm">/* nul terminator */</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">};</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="n">G_MODULE_EXPORT</span> +<a id="line-203" name="line-203"></a><span class="n">GResource</span><span class="w"> </span><span class="o">*</span><span class="n">logview_get_resource</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> +<a id="line-204" name="line-204"></a><span class="n">GResource</span><span class="w"> </span><span class="o">*</span><span class="nf">logview_get_resource</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-205" name="line-205"></a><span class="p">{</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_static_resource_get_resource</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">static_resource</span><span class="p">);</span> +<a id="line-207" name="line-207"></a><span class="p">}</span> +<a id="line-208" name="line-208"></a><span class="cm">/* GLIB - Library of useful routines for C programming</span> +<a id="line-209" name="line-209"></a><span class="cm"> * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald</span> +<a id="line-210" name="line-210"></a><span class="cm"> *</span> +<a id="line-211" name="line-211"></a><span class="cm"> * SPDX-License-Identifier: LGPL-2.1-or-later</span> +<a id="line-212" name="line-212"></a><span class="cm"> *</span> +<a id="line-213" name="line-213"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span> +<a id="line-214" name="line-214"></a><span class="cm"> * modify it under the terms of the GNU Lesser General Public</span> +<a id="line-215" name="line-215"></a><span class="cm"> * License as published by the Free Software Foundation; either</span> +<a id="line-216" name="line-216"></a><span class="cm"> * version 2.1 of the License, or (at your option) any later version.</span> +<a id="line-217" name="line-217"></a><span class="cm"> *</span> +<a id="line-218" name="line-218"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span> +<a id="line-219" name="line-219"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-220" name="line-220"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> +<a id="line-221" name="line-221"></a><span class="cm"> * Lesser General Public License for more details.</span> +<a id="line-222" name="line-222"></a><span class="cm"> *</span> +<a id="line-223" name="line-223"></a><span class="cm"> * You should have received a copy of the GNU Lesser General Public</span> +<a id="line-224" name="line-224"></a><span class="cm"> * License along with this library; if not, see <http://www.gnu.org/licenses/>.</span> +<a id="line-225" name="line-225"></a><span class="cm"> */</span> +<a id="line-226" name="line-226"></a> +<a id="line-227" name="line-227"></a><span class="cm">/*</span> +<a id="line-228" name="line-228"></a><span class="cm"> * Modified by the GLib Team and others 1997-2000. See the AUTHORS</span> +<a id="line-229" name="line-229"></a><span class="cm"> * file for a list of people on the GLib Team. See the ChangeLog</span> +<a id="line-230" name="line-230"></a><span class="cm"> * files for a list of changes. These files are distributed with</span> +<a id="line-231" name="line-231"></a><span class="cm"> * GLib at ftp://ftp.gtk.org/pub/gtk/.</span> +<a id="line-232" name="line-232"></a><span class="cm"> */</span> +<a id="line-233" name="line-233"></a> +<a id="line-234" name="line-234"></a><span class="cp">#ifndef __G_CONSTRUCTOR_H__</span> +<a id="line-235" name="line-235"></a><span class="cp">#define __G_CONSTRUCTOR_H__</span> +<a id="line-236" name="line-236"></a> +<a id="line-237" name="line-237"></a><span class="cm">/*</span> +<a id="line-238" name="line-238"></a><span class="cm"> If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and</span> +<a id="line-239" name="line-239"></a><span class="cm"> destructors, in a usable way, including e.g. on library unload. If not you're on</span> +<a id="line-240" name="line-240"></a><span class="cm"> your own.</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="cm"> Some compilers need #pragma to handle this, which does not work with macros,</span> +<a id="line-243" name="line-243"></a><span class="cm"> so the way you need to use this is (for constructors):</span> +<a id="line-244" name="line-244"></a> +<a id="line-245" name="line-245"></a><span class="cm"> #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA</span> +<a id="line-246" name="line-246"></a><span class="cm"> #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)</span> +<a id="line-247" name="line-247"></a><span class="cm"> #endif</span> +<a id="line-248" name="line-248"></a><span class="cm"> G_DEFINE_CONSTRUCTOR(my_constructor)</span> +<a id="line-249" name="line-249"></a><span class="cm"> static void my_constructor(void) {</span> +<a id="line-250" name="line-250"></a><span class="cm"> ...</span> +<a id="line-251" name="line-251"></a><span class="cm"> }</span> +<a id="line-252" name="line-252"></a> +<a id="line-253" name="line-253"></a><span class="cm">*/</span> +<a id="line-254" name="line-254"></a> +<a id="line-255" name="line-255"></a><span class="cp">#ifndef __GTK_DOC_IGNORE__</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="cp">#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)</span> +<a id="line-258" name="line-258"></a> +<a id="line-259" name="line-259"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-260" name="line-260"></a> +<a id="line-261" name="line-261"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);</span> +<a id="line-262" name="line-262"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);</span> +<a id="line-263" name="line-263"></a> +<a id="line-264" name="line-264"></a><span class="cp">#elif defined (_MSC_VER) && (_MSC_VER >= 1500)</span> +<a id="line-265" name="line-265"></a><span class="cm">/* Visual studio 2008 and later has _Pragma */</span> +<a id="line-266" name="line-266"></a> +<a id="line-267" name="line-267"></a><span class="cm">/*</span> +<a id="line-268" name="line-268"></a><span class="cm"> * Only try to include gslist.h if not already included via glib.h,</span> +<a id="line-269" name="line-269"></a><span class="cm"> * so that items using gconstructor.h outside of GLib (such as</span> +<a id="line-270" name="line-270"></a><span class="cm"> * GResources) continue to build properly.</span> +<a id="line-271" name="line-271"></a><span class="cm"> */</span> +<a id="line-272" name="line-272"></a><span class="cp">#ifndef __G_LIB_H__</span> +<a id="line-273" name="line-273"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gslist.h"</span> +<a id="line-274" name="line-274"></a><span class="cp">#endif</span> +<a id="line-275" name="line-275"></a> +<a id="line-276" name="line-276"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-277" name="line-277"></a> +<a id="line-278" name="line-278"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-279" name="line-279"></a> +<a id="line-280" name="line-280"></a><span class="cm">/* We do some weird things to avoid the constructors being optimized</span> +<a id="line-281" name="line-281"></a><span class="cm"> * away on VS2015 if WholeProgramOptimization is enabled. First we</span> +<a id="line-282" name="line-282"></a><span class="cm"> * make a reference to the array from the wrapper to make sure its</span> +<a id="line-283" name="line-283"></a><span class="cm"> * references. Then we use a pragma to make sure the wrapper function</span> +<a id="line-284" name="line-284"></a><span class="cm"> * symbol is always included at the link stage. Also, the symbols</span> +<a id="line-285" name="line-285"></a><span class="cm"> * need to be extern (but not dllexport), even though they are not</span> +<a id="line-286" name="line-286"></a><span class="cm"> * really used from another object file.</span> +<a id="line-287" name="line-287"></a><span class="cm"> */</span> +<a id="line-288" name="line-288"></a> +<a id="line-289" name="line-289"></a><span class="cm">/* We need to account for differences between the mangling of symbols</span> +<a id="line-290" name="line-290"></a><span class="cm"> * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed</span> +<a id="line-291" name="line-291"></a><span class="cm"> * with an underscore but symbols on x64/ARM/ARM64 are not.</span> +<a id="line-292" name="line-292"></a><span class="cm"> */</span> +<a id="line-293" name="line-293"></a><span class="cp">#ifdef _M_IX86</span> +<a id="line-294" name="line-294"></a><span class="cp">#define G_MSVC_SYMBOL_PREFIX "_"</span> +<a id="line-295" name="line-295"></a><span class="cp">#else</span> +<a id="line-296" name="line-296"></a><span class="cp">#define G_MSVC_SYMBOL_PREFIX ""</span> +<a id="line-297" name="line-297"></a><span class="cp">#endif</span> +<a id="line-298" name="line-298"></a> +<a id="line-299" name="line-299"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)</span> +<a id="line-300" name="line-300"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX)</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="cp">#define G_MSVC_CTOR(_func,_sym_prefix) \</span> +<a id="line-303" name="line-303"></a><span class="cp"> static void _func(void); \</span> +<a id="line-304" name="line-304"></a><span class="cp"> extern int (* _array ## _func)(void); \</span> +<a id="line-305" name="line-305"></a><span class="cp"> int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \</span> +<a id="line-306" name="line-306"></a><span class="cp"> __pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \</span> +<a id="line-307" name="line-307"></a><span class="cp"> __pragma(section(".CRT$XCU",read)) \</span> +<a id="line-308" name="line-308"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _wrapper;</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="cp">#define G_MSVC_DTOR(_func,_sym_prefix) \</span> +<a id="line-311" name="line-311"></a><span class="cp"> static void _func(void); \</span> +<a id="line-312" name="line-312"></a><span class="cp"> extern int (* _array ## _func)(void); \</span> +<a id="line-313" name="line-313"></a><span class="cp"> int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \</span> +<a id="line-314" name="line-314"></a><span class="cp"> __pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \</span> +<a id="line-315" name="line-315"></a><span class="cp"> __pragma(section(".CRT$XCU",read)) \</span> +<a id="line-316" name="line-316"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _constructor;</span> +<a id="line-317" name="line-317"></a> +<a id="line-318" name="line-318"></a><span class="cp">#elif defined (_MSC_VER)</span> +<a id="line-319" name="line-319"></a> +<a id="line-320" name="line-320"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-321" name="line-321"></a> +<a id="line-322" name="line-322"></a><span class="cm">/* Pre Visual studio 2008 must use #pragma section */</span> +<a id="line-323" name="line-323"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-324" name="line-324"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-325" name="line-325"></a> +<a id="line-326" name="line-326"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-327" name="line-327"></a><span class="cp"> section(".CRT$XCU",read)</span> +<a id="line-328" name="line-328"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) \</span> +<a id="line-329" name="line-329"></a><span class="cp"> static void _func(void); \</span> +<a id="line-330" name="line-330"></a><span class="cp"> static int _func ## _wrapper(void) { _func(); return 0; } \</span> +<a id="line-331" name="line-331"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper;</span> +<a id="line-332" name="line-332"></a> +<a id="line-333" name="line-333"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-334" name="line-334"></a><span class="cp"> section(".CRT$XCU",read)</span> +<a id="line-335" name="line-335"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) \</span> +<a id="line-336" name="line-336"></a><span class="cp"> static void _func(void); \</span> +<a id="line-337" name="line-337"></a><span class="cp"> static int _func ## _constructor(void) { atexit (_func); return 0; } \</span> +<a id="line-338" name="line-338"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;</span> +<a id="line-339" name="line-339"></a> +<a id="line-340" name="line-340"></a><span class="cp">#elif defined(__SUNPRO_C)</span> +<a id="line-341" name="line-341"></a> +<a id="line-342" name="line-342"></a><span class="cm">/* This is not tested, but i believe it should work, based on:</span> +<a id="line-343" name="line-343"></a><span class="cm"> * http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c</span> +<a id="line-344" name="line-344"></a><span class="cm"> */</span> +<a id="line-345" name="line-345"></a> +<a id="line-346" name="line-346"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-347" name="line-347"></a> +<a id="line-348" name="line-348"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-349" name="line-349"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-350" name="line-350"></a> +<a id="line-351" name="line-351"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-352" name="line-352"></a><span class="cp"> init(_func)</span> +<a id="line-353" name="line-353"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) \</span> +<a id="line-354" name="line-354"></a><span class="cp"> static void _func(void);</span> +<a id="line-355" name="line-355"></a> +<a id="line-356" name="line-356"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-357" name="line-357"></a><span class="cp"> fini(_func)</span> +<a id="line-358" name="line-358"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) \</span> +<a id="line-359" name="line-359"></a><span class="cp"> static void _func(void);</span> +<a id="line-360" name="line-360"></a> +<a id="line-361" name="line-361"></a><span class="cp">#else</span> +<a id="line-362" name="line-362"></a> +<a id="line-363" name="line-363"></a><span class="cm">/* constructors not supported for this compiler */</span> +<a id="line-364" name="line-364"></a> +<a id="line-365" name="line-365"></a><span class="cp">#endif</span> +<a id="line-366" name="line-366"></a> +<a id="line-367" name="line-367"></a><span class="cp">#endif </span><span class="cm">/* __GTK_DOC_IGNORE__ */</span> +<a id="line-368" name="line-368"></a><span class="cp">#endif </span><span class="cm">/* __G_CONSTRUCTOR_H__ */</span> +<a id="line-369" name="line-369"></a> +<a id="line-370" name="line-370"></a><span class="cp">#ifdef G_HAS_CONSTRUCTORS</span> +<a id="line-371" name="line-371"></a> +<a id="line-372" name="line-372"></a><span class="cp">#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA</span> +<a id="line-373" name="line-373"></a><span class="cp">#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(logviewresource_constructor)</span> +<a id="line-374" name="line-374"></a><span class="cp">#endif</span> +<a id="line-375" name="line-375"></a><span class="n">G_DEFINE_CONSTRUCTOR</span><span class="p">(</span><span class="n">logviewresource_constructor</span><span class="p">)</span> +<a id="line-376" name="line-376"></a><span class="cp">#ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA</span> +<a id="line-377" name="line-377"></a><span class="cp">#pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(logviewresource_destructor)</span> +<a id="line-378" name="line-378"></a><span class="cp">#endif</span> +<a id="line-379" name="line-379"></a><span class="n">G_DEFINE_DESTRUCTOR</span><span class="p">(</span><span class="n">logviewresource_destructor</span><span class="p">)</span> +<a id="line-380" name="line-380"></a> +<a id="line-381" name="line-381"></a><span class="cp">#else</span> +<a id="line-382" name="line-382"></a><span class="cp">#warning "Constructor not supported on this compiler, linking in resources will not work"</span> +<a id="line-383" name="line-383"></a><span class="cp">#endif</span> +<a id="line-384" name="line-384"></a> +<a id="line-385" name="line-385"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">logviewresource_constructor</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-386" name="line-386"></a><span class="p">{</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="n">g_static_resource_init</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">static_resource</span><span class="p">);</span> +<a id="line-388" name="line-388"></a><span class="p">}</span> +<a id="line-389" name="line-389"></a> +<a id="line-390" name="line-390"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">logviewresource_destructor</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-391" name="line-391"></a><span class="p">{</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">g_static_resource_fini</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">static_resource</span><span class="p">);</span> +<a id="line-393" name="line-393"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/25.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/25.html new file mode 100644 index 00000000..214e92cf --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/25.html @@ -0,0 +1,3533 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: logview/src/logview-window.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> logview-window.c</p> +<a href="25.html#line-337"> variableScope 337</a><a href="25.html#line-522"> variableScope 522</a><a href="25.html#line-619"> variableScope 619</a><a href="25.html#line-620"> variableScope 620</a><a href="25.html#line-682"> variableScope 682</a><a href="25.html#line-713"> variableScope 713</a><a href="25.html#line-714"> variableScope 714</a><a href="25.html#line-1037"> variableScope 1037</a><a href="25.html#line-1317"> variableScope 1317</a><a href="25.html#line-1559"> variableScope 1559</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span> +<span class="normal">1328</span> +<span class="normal">1329</span> +<span class="normal">1330</span> +<span class="normal">1331</span> +<span class="normal">1332</span> +<span class="normal">1333</span> +<span class="normal">1334</span> +<span class="normal">1335</span> +<span class="normal">1336</span> +<span class="normal">1337</span> +<span class="normal">1338</span> +<span class="normal">1339</span> +<span class="normal">1340</span> +<span class="normal">1341</span> +<span class="normal">1342</span> +<span class="normal">1343</span> +<span class="normal">1344</span> +<span class="normal">1345</span> +<span class="normal">1346</span> +<span class="normal">1347</span> +<span class="normal">1348</span> +<span class="normal">1349</span> +<span class="normal">1350</span> +<span class="normal">1351</span> +<span class="normal">1352</span> +<span class="normal">1353</span> +<span class="normal">1354</span> +<span class="normal">1355</span> +<span class="normal">1356</span> +<span class="normal">1357</span> +<span class="normal">1358</span> +<span class="normal">1359</span> +<span class="normal">1360</span> +<span class="normal">1361</span> +<span class="normal">1362</span> +<span class="normal">1363</span> +<span class="normal">1364</span> +<span class="normal">1365</span> +<span class="normal">1366</span> +<span class="normal">1367</span> +<span class="normal">1368</span> +<span class="normal">1369</span> +<span class="normal">1370</span> +<span class="normal">1371</span> +<span class="normal">1372</span> +<span class="normal">1373</span> +<span class="normal">1374</span> +<span class="normal">1375</span> +<span class="normal">1376</span> +<span class="normal">1377</span> +<span class="normal">1378</span> +<span class="normal">1379</span> +<span class="normal">1380</span> +<span class="normal">1381</span> +<span class="normal">1382</span> +<span class="normal">1383</span> +<span class="normal">1384</span> +<span class="normal">1385</span> +<span class="normal">1386</span> +<span class="normal">1387</span> +<span class="normal">1388</span> +<span class="normal">1389</span> +<span class="normal">1390</span> +<span class="normal">1391</span> +<span class="normal">1392</span> +<span class="normal">1393</span> +<span class="normal">1394</span> +<span class="normal">1395</span> +<span class="normal">1396</span> +<span class="normal">1397</span> +<span class="normal">1398</span> +<span class="normal">1399</span> +<span class="normal">1400</span> +<span class="normal">1401</span> +<span class="normal">1402</span> +<span class="normal">1403</span> +<span class="normal">1404</span> +<span class="normal">1405</span> +<span class="normal">1406</span> +<span class="normal">1407</span> +<span class="normal">1408</span> +<span class="normal">1409</span> +<span class="normal">1410</span> +<span class="normal">1411</span> +<span class="normal">1412</span> +<span class="normal">1413</span> +<span class="normal">1414</span> +<span class="normal">1415</span> +<span class="normal">1416</span> +<span class="normal">1417</span> +<span class="normal">1418</span> +<span class="normal">1419</span> +<span class="normal">1420</span> +<span class="normal">1421</span> +<span class="normal">1422</span> +<span class="normal">1423</span> +<span class="normal">1424</span> +<span class="normal">1425</span> +<span class="normal">1426</span> +<span class="normal">1427</span> +<span class="normal">1428</span> +<span class="normal">1429</span> +<span class="normal">1430</span> +<span class="normal">1431</span> +<span class="normal">1432</span> +<span class="normal">1433</span> +<span class="normal">1434</span> +<span class="normal">1435</span> +<span class="normal">1436</span> +<span class="normal">1437</span> +<span class="normal">1438</span> +<span class="normal">1439</span> +<span class="normal">1440</span> +<span class="normal">1441</span> +<span class="normal">1442</span> +<span class="normal">1443</span> +<span class="normal">1444</span> +<span class="normal">1445</span> +<span class="normal">1446</span> +<span class="normal">1447</span> +<span class="normal">1448</span> +<span class="normal">1449</span> +<span class="normal">1450</span> +<span class="normal">1451</span> +<span class="normal">1452</span> +<span class="normal">1453</span> +<span class="normal">1454</span> +<span class="normal">1455</span> +<span class="normal">1456</span> +<span class="normal">1457</span> +<span class="normal">1458</span> +<span class="normal">1459</span> +<span class="normal">1460</span> +<span class="normal">1461</span> +<span class="normal">1462</span> +<span class="normal">1463</span> +<span class="normal">1464</span> +<span class="normal">1465</span> +<span class="normal">1466</span> +<span class="normal">1467</span> +<span class="normal">1468</span> +<span class="normal">1469</span> +<span class="normal">1470</span> +<span class="normal">1471</span> +<span class="normal">1472</span> +<span class="normal">1473</span> +<span class="normal">1474</span> +<span class="normal">1475</span> +<span class="normal">1476</span> +<span class="normal">1477</span> +<span class="normal">1478</span> +<span class="normal">1479</span> +<span class="normal">1480</span> +<span class="normal">1481</span> +<span class="normal">1482</span> +<span class="normal">1483</span> +<span class="normal">1484</span> +<span class="normal">1485</span> +<span class="normal">1486</span> +<span class="normal">1487</span> +<span class="normal">1488</span> +<span class="normal">1489</span> +<span class="normal">1490</span> +<span class="normal">1491</span> +<span class="normal">1492</span> +<span class="normal">1493</span> +<span class="normal">1494</span> +<span class="normal">1495</span> +<span class="normal">1496</span> +<span class="normal">1497</span> +<span class="normal">1498</span> +<span class="normal">1499</span> +<span class="normal">1500</span> +<span class="normal">1501</span> +<span class="normal">1502</span> +<span class="normal">1503</span> +<span class="normal">1504</span> +<span class="normal">1505</span> +<span class="normal">1506</span> +<span class="normal">1507</span> +<span class="normal">1508</span> +<span class="normal">1509</span> +<span class="normal">1510</span> +<span class="normal">1511</span> +<span class="normal">1512</span> +<span class="normal">1513</span> +<span class="normal">1514</span> +<span class="normal">1515</span> +<span class="normal">1516</span> +<span class="normal">1517</span> +<span class="normal">1518</span> +<span class="normal">1519</span> +<span class="normal">1520</span> +<span class="normal">1521</span> +<span class="normal">1522</span> +<span class="normal">1523</span> +<span class="normal">1524</span> +<span class="normal">1525</span> +<span class="normal">1526</span> +<span class="normal">1527</span> +<span class="normal">1528</span> +<span class="normal">1529</span> +<span class="normal">1530</span> +<span class="normal">1531</span> +<span class="normal">1532</span> +<span class="normal">1533</span> +<span class="normal">1534</span> +<span class="normal">1535</span> +<span class="normal">1536</span> +<span class="normal">1537</span> +<span class="normal">1538</span> +<span class="normal">1539</span> +<span class="normal">1540</span> +<span class="normal">1541</span> +<span class="normal">1542</span> +<span class="normal">1543</span> +<span class="normal">1544</span> +<span class="normal">1545</span> +<span class="normal">1546</span> +<span class="normal">1547</span> +<span class="normal">1548</span> +<span class="normal">1549</span> +<span class="normal">1550</span> +<span class="normal">1551</span> +<span class="normal">1552</span> +<span class="normal">1553</span> +<span class="normal">1554</span> +<span class="normal">1555</span> +<span class="normal">1556</span> +<span class="normal">1557</span> +<span class="normal">1558</span> +<span class="normal">1559</span> +<span class="normal">1560</span> +<span class="normal">1561</span> +<span class="normal">1562</span> +<span class="normal">1563</span> +<span class="normal">1564</span> +<span class="normal">1565</span> +<span class="normal">1566</span> +<span class="normal">1567</span> +<span class="normal">1568</span> +<span class="normal">1569</span> +<span class="normal">1570</span> +<span class="normal">1571</span> +<span class="normal">1572</span> +<span class="normal">1573</span> +<span class="normal">1574</span> +<span class="normal">1575</span> +<span class="normal">1576</span> +<span class="normal">1577</span> +<span class="normal">1578</span> +<span class="normal">1579</span> +<span class="normal">1580</span> +<span class="normal">1581</span> +<span class="normal">1582</span> +<span class="normal">1583</span> +<span class="normal">1584</span> +<span class="normal">1585</span> +<span class="normal">1586</span> +<span class="normal">1587</span> +<span class="normal">1588</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */</span> +<a id="line-2" name="line-2"></a><span class="cm">/* Copyright (C) 1998 Cesar Miquel <[email protected]></span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2008 Cosimo Cecchi <[email protected]></span> +<a id="line-4" name="line-4"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-7" name="line-7"></a><span class="cm"> *</span> +<a id="line-8" name="line-8"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-9" name="line-9"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-10" name="line-10"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-11" name="line-11"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-12" name="line-12"></a><span class="cm"> *</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-14" name="line-14"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-15" name="line-15"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-16" name="line-16"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-17" name="line-17"></a><span class="cm"> *</span> +<a id="line-18" name="line-18"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-19" name="line-19"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-20" name="line-20"></a><span class="cm"> */</span> +<a id="line-21" name="line-21"></a> +<a id="line-22" name="line-22"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-23" name="line-23"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-24" name="line-24"></a><span class="cp">#endif</span> +<a id="line-25" name="line-25"></a> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkkeysyms.h></span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-31" name="line-31"></a> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-window.h"</span> +<a id="line-33" name="line-33"></a> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-loglist.h"</span> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-findbar.h"</span> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-about.h"</span> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-prefs.h"</span> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-manager.h"</span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"logview-filter-manager.h"</span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="cp">#define APP_NAME _("System Log Viewer")</span> +<a id="line-42" name="line-42"></a><span class="cp">#define SEARCH_START_MARK "lw-search-start-mark"</span> +<a id="line-43" name="line-43"></a><span class="cp">#define SEARCH_END_MARK "lw-search-end-mark"</span> +<a id="line-44" name="line-44"></a> +<a id="line-45" name="line-45"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_LogviewWindowPrivate</span><span class="w"> </span><span class="p">{</span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="n">GtkBuilder</span><span class="w"> </span><span class="o">*</span><span class="n">ui_manager</span><span class="p">;</span> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="n">GActionGroup</span><span class="w"> </span><span class="o">*</span><span class="n">action_group</span><span class="p">;</span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="n">GActionGroup</span><span class="w"> </span><span class="o">*</span><span class="n">filter_action_group</span><span class="p">;</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">find_bar</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">loglist</span><span class="p">;</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">sidebar</span><span class="p">;</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">version_bar</span><span class="p">;</span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">version_selector</span><span class="p">;</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hpaned</span><span class="p">;</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">text_view</span><span class="p">;</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">statusbar</span><span class="p">;</span> +<a id="line-58" name="line-58"></a> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">message_area</span><span class="p">;</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">message_primary</span><span class="p">;</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">message_secondary</span><span class="p">;</span> +<a id="line-62" name="line-62"></a> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">GtkTextTagTable</span><span class="w"> </span><span class="o">*</span><span class="n">tag_table</span><span class="p">;</span> +<a id="line-64" name="line-64"></a> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">original_fontsize</span><span class="p">,</span><span class="w"> </span><span class="n">fontsize</span><span class="p">;</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">;</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">;</span> +<a id="line-69" name="line-69"></a> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">gulong</span><span class="w"> </span><span class="n">monitor_id</span><span class="p">;</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">search_timeout_id</span><span class="p">;</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">GCancellable</span><span class="w"> </span><span class="o">*</span><span class="n">read_cancellable</span><span class="p">;</span> +<a id="line-74" name="line-74"></a> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">active_filters</span><span class="p">;</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">matches_only</span><span class="p">;</span> +<a id="line-77" name="line-77"></a><span class="p">};</span> +<a id="line-78" name="line-78"></a> +<a id="line-79" name="line-79"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="p">,</span><span class="w"> </span><span class="n">logview_window</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_WINDOW</span><span class="p">);</span> +<a id="line-80" name="line-80"></a> +<a id="line-81" name="line-81"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">findbar_close_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="p">,</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">);</span> +<a id="line-83" name="line-83"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">read_new_lines_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="p">,</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">new_days</span><span class="p">,</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">,</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">);</span> +<a id="line-88" name="line-88"></a> +<a id="line-89" name="line-89"></a><span class="cm">/* private functions */</span> +<a id="line-90" name="line-90"></a> +<a id="line-91" name="line-91"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-92" name="line-92"></a><span class="nf">logview_version_selector_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GtkComboBox</span><span class="w"> </span><span class="o">*</span><span class="n">version_selector</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-93" name="line-93"></a><span class="p">{</span> +<a id="line-94" name="line-94"></a> +<a id="line-95" name="line-95"></a><span class="p">}</span> +<a id="line-96" name="line-96"></a><span class="cp">#if 0</span> +<a id="line-97" name="line-97"></a><span class="c"> LogviewWindow *logview = user_data;</span> +<a id="line-98" name="line-98"></a><span class="c"> Log *log = logview->curlog;</span> +<a id="line-99" name="line-99"></a><span class="c"> int selected;</span> +<a id="line-100" name="line-100"></a> +<a id="line-101" name="line-101"></a><span class="c"> g_assert (LOGVIEW_IS_WINDOW (logview));</span> +<a id="line-102" name="line-102"></a> +<a id="line-103" name="line-103"></a><span class="c"> selected = gtk_combo_box_get_active (version_selector);</span> +<a id="line-104" name="line-104"></a> +<a id="line-105" name="line-105"></a><span class="c"> if (selected == log->current_version)</span> +<a id="line-106" name="line-106"></a><span class="c"> return;</span> +<a id="line-107" name="line-107"></a> +<a id="line-108" name="line-108"></a><span class="c"> /* select a new version */</span> +<a id="line-109" name="line-109"></a><span class="c"> if (selected == 0) {</span> +<a id="line-110" name="line-110"></a><span class="c"> logview_select_log (logview, log->parent_log);</span> +<a id="line-111" name="line-111"></a><span class="c"> } else {</span> +<a id="line-112" name="line-112"></a><span class="c"> Log *new;</span> +<a id="line-113" name="line-113"></a><span class="c"> if (log->parent_log) {</span> +<a id="line-114" name="line-114"></a><span class="c"> new = log->parent_log->older_logs[selected];</span> +<a id="line-115" name="line-115"></a><span class="c"> } else {</span> +<a id="line-116" name="line-116"></a><span class="c"> new = log->older_logs[selected];</span> +<a id="line-117" name="line-117"></a><span class="c"> }</span> +<a id="line-118" name="line-118"></a> +<a id="line-119" name="line-119"></a><span class="c"> logview_select_log (logview, new);</span> +<a id="line-120" name="line-120"></a><span class="c"> }</span> +<a id="line-121" name="line-121"></a><span class="c">}</span> +<a id="line-122" name="line-122"></a> +<a id="line-123" name="line-123"></a><span class="cp">#endif</span> +<a id="line-124" name="line-124"></a> +<a id="line-125" name="line-125"></a><span class="cm">/* private helpers */</span> +<a id="line-126" name="line-126"></a> +<a id="line-127" name="line-127"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-128" name="line-128"></a><span class="nf">populate_tag_table</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTextTagTable</span><span class="w"> </span><span class="o">*</span><span class="n">tag_table</span><span class="p">)</span> +<a id="line-129" name="line-129"></a><span class="p">{</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">tag</span><span class="p">;</span> +<a id="line-131" name="line-131"></a> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_tag_new</span><span class="w"> </span><span class="p">(</span><span class="s">"bold"</span><span class="p">);</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="s">"weight"</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_WEIGHT_BOLD</span><span class="p">,</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="s">"weight-set"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-135" name="line-135"></a> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">gtk_text_tag_table_add</span><span class="w"> </span><span class="p">(</span><span class="n">tag_table</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-137" name="line-137"></a> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_tag_new</span><span class="w"> </span><span class="p">(</span><span class="s">"invisible"</span><span class="p">);</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible-set"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">gtk_text_tag_table_add</span><span class="w"> </span><span class="p">(</span><span class="n">tag_table</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-141" name="line-141"></a> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_tag_new</span><span class="w"> </span><span class="p">(</span><span class="s">"invisible-filter"</span><span class="p">);</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible-set"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">gtk_text_tag_table_add</span><span class="w"> </span><span class="p">(</span><span class="n">tag_table</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-145" name="line-145"></a><span class="p">}</span> +<a id="line-146" name="line-146"></a> +<a id="line-147" name="line-147"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-148" name="line-148"></a><span class="nf">populate_style_tag_table</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">)</span> +<a id="line-149" name="line-149"></a><span class="p">{</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">GtkTextTagTable</span><span class="w"> </span><span class="o">*</span><span class="n">tag_table</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">tag_table</span><span class="p">;</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">tag</span><span class="p">;</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">GtkStyleContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">GdkRGBA</span><span class="w"> </span><span class="n">rgba</span><span class="p">;</span> +<a id="line-154" name="line-154"></a> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_tag_table_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">tag_table</span><span class="p">,</span><span class="w"> </span><span class="s">"gray"</span><span class="p">);</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">gtk_text_tag_table_remove</span><span class="w"> </span><span class="p">(</span><span class="n">tag_table</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="p">}</span> +<a id="line-160" name="line-160"></a> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_tag_new</span><span class="w"> </span><span class="p">(</span><span class="s">"gray"</span><span class="p">);</span> +<a id="line-162" name="line-162"></a> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_style_context</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">);</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">gtk_style_context_save</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">gtk_style_context_add_class</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"dim-label"</span><span class="p">);</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">gtk_style_context_get_color</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_STATE_FLAG_NORMAL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rgba</span><span class="p">);</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">gtk_style_context_restore</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-168" name="line-168"></a> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">,</span><span class="w"> </span><span class="s">"foreground-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rgba</span><span class="p">,</span><span class="w"> </span><span class="s">"foreground-set"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-170" name="line-170"></a> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">gtk_text_tag_table_add</span><span class="w"> </span><span class="p">(</span><span class="n">tag_table</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-172" name="line-172"></a><span class="p">}</span> +<a id="line-173" name="line-173"></a> +<a id="line-174" name="line-174"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-175" name="line-175"></a><span class="nf">_gtk_text_buffer_apply_tag_to_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">line_start</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">line_end</span><span class="p">,</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">offset_start</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">offset_end</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">tag_name</span><span class="p">)</span> +<a id="line-177" name="line-177"></a><span class="p">{</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">line_cur</span><span class="p">;</span> +<a id="line-180" name="line-180"></a> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_line</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">line_start</span><span class="p">);</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_line</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">line_start</span><span class="p">);</span> +<a id="line-183" name="line-183"></a> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">line_cur</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">line_start</span><span class="p">;</span><span class="w"> </span><span class="n">line_cur</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">line_end</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="n">line_cur</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-185" name="line-185"></a> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">offset_start</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_chars</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">offset_start</span><span class="p">);</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="p">}</span> +<a id="line-189" name="line-189"></a> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_chars</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">offset_end</span><span class="p">);</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">gtk_text_buffer_apply_tag_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">tag_name</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-193" name="line-193"></a> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_line</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">start</span><span class="p">);</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_line</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="p">}</span> +<a id="line-197" name="line-197"></a><span class="p">}</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-200" name="line-200"></a><span class="nf">activate_toggle</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-203" name="line-203"></a><span class="p">{</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">state</span><span class="p">;</span> +<a id="line-205" name="line-205"></a> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_action_get_state</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">));</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">g_action_change_state</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">),</span><span class="w"> </span><span class="n">g_variant_new_boolean</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_variant_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state</span><span class="p">)));</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">state</span><span class="p">);</span> +<a id="line-209" name="line-209"></a><span class="p">}</span> +<a id="line-210" name="line-210"></a> +<a id="line-211" name="line-211"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-212" name="line-212"></a><span class="nf">logview_update_statusbar</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">active</span><span class="p">)</span> +<a id="line-213" name="line-213"></a><span class="p">{</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">GDateTime</span><span class="w"> </span><span class="o">*</span><span class="n">date_time</span><span class="p">;</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">statusbar_text</span><span class="p">;</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">modified</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">timestring</span><span class="p">;</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="kt">time_t</span><span class="w"> </span><span class="n">timestamp</span><span class="p">;</span> +<a id="line-218" name="line-218"></a> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">gtk_statusbar_pop</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="p">}</span> +<a id="line-223" name="line-223"></a> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">timestamp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_log_get_timestamp</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="p">);</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">date_time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_date_time_new_from_unix_local</span><span class="w"> </span><span class="p">(</span><span class="n">timestamp</span><span class="p">);</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">timestring</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_date_time_format</span><span class="w"> </span><span class="p">(</span><span class="n">date_time</span><span class="p">,</span><span class="w"> </span><span class="s">"%c"</span><span class="p">);</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">modified</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"last update: %s"</span><span class="p">),</span><span class="w"> </span><span class="n">timestring</span><span class="p">);</span> +<a id="line-228" name="line-228"></a> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">logview_log_get_file_size</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="p">));</span> +<a id="line-230" name="line-230"></a> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">statusbar_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"%d lines (%s) - %s"</span><span class="p">),</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">logview_log_get_cached_lines_number</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="p">),</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="n">modified</span><span class="p">);</span> +<a id="line-234" name="line-234"></a> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">gtk_statusbar_pop</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">gtk_statusbar_push</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">statusbar_text</span><span class="p">);</span> +<a id="line-237" name="line-237"></a> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">size</span><span class="p">);</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">timestring</span><span class="p">);</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">modified</span><span class="p">);</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">statusbar_text</span><span class="p">);</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">g_date_time_unref</span><span class="w"> </span><span class="p">(</span><span class="n">date_time</span><span class="p">);</span> +<a id="line-243" name="line-243"></a><span class="p">}</span> +<a id="line-244" name="line-244"></a> +<a id="line-245" name="line-245"></a><span class="cp">#define DEFAULT_LOGVIEW_FONT "Monospace 10"</span> +<a id="line-246" name="line-246"></a> +<a id="line-247" name="line-247"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-248" name="line-248"></a><span class="nf">logview_set_font</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">,</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">fontname</span><span class="p">)</span> +<a id="line-250" name="line-250"></a><span class="p">{</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">PangoFontDescription</span><span class="w"> </span><span class="o">*</span><span class="n">font_desc</span><span class="p">;</span> +<a id="line-252" name="line-252"></a> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">fontname</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">fontname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DEFAULT_LOGVIEW_FONT</span><span class="p">;</span> +<a id="line-255" name="line-255"></a> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">font_desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pango_font_description_from_string</span><span class="w"> </span><span class="p">(</span><span class="n">fontname</span><span class="p">);</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">font_desc</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">gtk_widget_override_font</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">,</span><span class="w"> </span><span class="n">font_desc</span><span class="p">);</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">pango_font_description_free</span><span class="w"> </span><span class="p">(</span><span class="n">font_desc</span><span class="p">);</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="p">}</span> +<a id="line-261" name="line-261"></a><span class="p">}</span> +<a id="line-262" name="line-262"></a> +<a id="line-263" name="line-263"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-264" name="line-264"></a><span class="nf">logview_set_fontsize</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">store</span><span class="p">)</span> +<a id="line-265" name="line-265"></a><span class="p">{</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">PangoFontDescription</span><span class="w"> </span><span class="o">*</span><span class="n">fontdesc</span><span class="p">;</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">PangoContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">LogviewWindowPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-269" name="line-269"></a> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_pango_context</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">);</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">fontdesc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pango_context_get_font_description</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">pango_font_description_set_size</span><span class="w"> </span><span class="p">(</span><span class="n">fontdesc</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">fontsize</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">PANGO_SCALE</span><span class="p">);</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">gtk_widget_override_font</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">,</span><span class="w"> </span><span class="n">fontdesc</span><span class="p">);</span> +<a id="line-274" name="line-274"></a> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">logview_prefs_store_fontsize</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">fontsize</span><span class="p">);</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="p">}</span> +<a id="line-278" name="line-278"></a><span class="p">}</span> +<a id="line-279" name="line-279"></a> +<a id="line-280" name="line-280"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-281" name="line-281"></a><span class="nf">logview_set_window_title</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">log_name</span><span class="p">)</span> +<a id="line-282" name="line-282"></a><span class="p">{</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">window_title</span><span class="p">;</span> +<a id="line-284" name="line-284"></a> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log_name</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">window_title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s - %s"</span><span class="p">,</span><span class="w"> </span><span class="n">log_name</span><span class="p">,</span><span class="w"> </span><span class="n">APP_NAME</span><span class="p">);</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">window_title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">APP_NAME</span><span class="p">);</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="p">}</span> +<a id="line-290" name="line-290"></a> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">),</span><span class="w"> </span><span class="n">window_title</span><span class="p">);</span> +<a id="line-292" name="line-292"></a> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window_title</span><span class="p">);</span> +<a id="line-294" name="line-294"></a><span class="p">}</span> +<a id="line-295" name="line-295"></a> +<a id="line-296" name="line-296"></a><span class="cm">/* actions callbacks */</span> +<a id="line-297" name="line-297"></a> +<a id="line-298" name="line-298"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-299" name="line-299"></a><span class="nf">open_file_selected_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">)</span> +<a id="line-300" name="line-300"></a><span class="p">{</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">f</span><span class="p">;</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">file_uri</span><span class="p">;</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">;</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">));</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="p">}</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_get_file</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">));</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">file_uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">f</span><span class="p">);</span> +<a id="line-312" name="line-312"></a> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_manager_get_if_loaded</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">file_uri</span><span class="p">);</span> +<a id="line-314" name="line-314"></a> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file_uri</span><span class="p">);</span> +<a id="line-316" name="line-316"></a> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">logview_manager_set_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="p">}</span> +<a id="line-322" name="line-322"></a> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="n">logview_manager_add_log_from_gfile</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="n">f</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-324" name="line-324"></a> +<a id="line-325" name="line-325"></a><span class="nl">out</span><span class="p">:</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">f</span><span class="p">);</span> +<a id="line-327" name="line-327"></a><span class="p">}</span> +<a id="line-328" name="line-328"></a> +<a id="line-329" name="line-329"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-330" name="line-330"></a><span class="nf">logview_open_log</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-333" name="line-333"></a> +<a id="line-334" name="line-334"></a><span class="p">{</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-337" name="line-337"></a><span class="hll"><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">active</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'active' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'active' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-338" name="line-338"></a> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Open Log"</span><span class="p">),</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">),</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">GTK_FILE_CHOOSER_ACTION_OPEN</span><span class="p">,</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="s">"gtk-cancel"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">,</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="s">"gtk-open"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">,</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">gtk_dialog_set_default_response</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">gtk_window_set_modal</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_selected_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">,</span><span class="w"> </span><span class="s">"destroy"</span><span class="p">,</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroyed</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">chooser</span><span class="p">);</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">active</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_active_logfile</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">);</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_filename</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="n">active</span><span class="p">);</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="p">);</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="p">}</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="p">}</span> +<a id="line-358" name="line-358"></a> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="n">gtk_window_present</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">));</span> +<a id="line-360" name="line-360"></a><span class="p">}</span> +<a id="line-361" name="line-361"></a> +<a id="line-362" name="line-362"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-363" name="line-363"></a><span class="nf">logview_close_log</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-366" name="line-366"></a><span class="p">{</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-368" name="line-368"></a> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="n">findbar_close_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">logview_manager_close_active_log</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">);</span> +<a id="line-371" name="line-371"></a><span class="p">}</span> +<a id="line-372" name="line-372"></a> +<a id="line-373" name="line-373"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-374" name="line-374"></a><span class="nf">logview_help</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-376" name="line-376"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-377" name="line-377"></a><span class="p">{</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-379" name="line-379"></a> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="n">gtk_show_uri_on_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">),</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="s">"help:mate-system-log"</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_get_current_event_time</span><span class="w"> </span><span class="p">(),</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-383" name="line-383"></a> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"There was an error displaying help: %s"</span><span class="p">),</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="p">}</span> +<a id="line-388" name="line-388"></a><span class="p">}</span> +<a id="line-389" name="line-389"></a> +<a id="line-390" name="line-390"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-391" name="line-391"></a><span class="nf">logview_bigger_text</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-394" name="line-394"></a><span class="p">{</span> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-396" name="line-396"></a> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">fontsize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">fontsize</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">24</span><span class="p">);</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">logview_set_fontsize</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-399" name="line-399"></a><span class="p">}</span> +<a id="line-400" name="line-400"></a> +<a id="line-401" name="line-401"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-402" name="line-402"></a><span class="nf">logview_smaller_text</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-405" name="line-405"></a><span class="p">{</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-407" name="line-407"></a> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">fontsize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">fontsize</span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">logview_set_fontsize</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-410" name="line-410"></a><span class="p">}</span> +<a id="line-411" name="line-411"></a> +<a id="line-412" name="line-412"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-413" name="line-413"></a><span class="nf">logview_normal_text</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-416" name="line-416"></a><span class="p">{</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-418" name="line-418"></a> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">fontsize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">original_fontsize</span><span class="p">;</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="n">logview_set_fontsize</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-421" name="line-421"></a><span class="p">}</span> +<a id="line-422" name="line-422"></a> +<a id="line-423" name="line-423"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-424" name="line-424"></a><span class="nf">logview_select_all</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-427" name="line-427"></a><span class="p">{</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-431" name="line-431"></a> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-433" name="line-433"></a> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_bounds</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="n">gtk_text_buffer_select_range</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-436" name="line-436"></a> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-438" name="line-438"></a><span class="p">}</span> +<a id="line-439" name="line-439"></a> +<a id="line-440" name="line-440"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-441" name="line-441"></a><span class="nf">logview_copy</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-444" name="line-444"></a><span class="p">{</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">GtkClipboard</span><span class="w"> </span><span class="o">*</span><span class="n">clipboard</span><span class="p">;</span> +<a id="line-448" name="line-448"></a> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="n">clipboard</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_clipboard_get</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_SELECTION_CLIPBOARD</span><span class="p">);</span> +<a id="line-451" name="line-451"></a> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">gtk_text_buffer_copy_clipboard</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">clipboard</span><span class="p">);</span> +<a id="line-453" name="line-453"></a> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-455" name="line-455"></a><span class="p">}</span> +<a id="line-456" name="line-456"></a> +<a id="line-457" name="line-457"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-458" name="line-458"></a><span class="nf">findbar_close_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="p">,</span> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-460" name="line-460"></a><span class="p">{</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">));</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="n">logview_findbar_set_message</span><span class="w"> </span><span class="p">(</span><span class="n">findbar</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-463" name="line-463"></a><span class="p">}</span> +<a id="line-464" name="line-464"></a> +<a id="line-465" name="line-465"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-466" name="line-466"></a><span class="nf">logview_search_text</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">forward</span><span class="p">)</span> +<a id="line-467" name="line-467"></a><span class="p">{</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="n">GtkTextMark</span><span class="w"> </span><span class="o">*</span><span class="n">search_start</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">search_end</span><span class="p">;</span> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="n">start_m</span><span class="p">,</span><span class="w"> </span><span class="n">end_m</span><span class="p">;</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">;</span> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">,</span><span class="w"> </span><span class="n">wrapped</span><span class="p">;</span> +<a id="line-473" name="line-473"></a> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="n">wrapped</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-475" name="line-475"></a> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_findbar_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">));</span> +<a id="line-477" name="line-477"></a> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">text</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="p">}</span> +<a id="line-481" name="line-481"></a> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="n">search_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_START_MARK</span><span class="p">);</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">search_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_END_MARK</span><span class="p">);</span> +<a id="line-485" name="line-485"></a> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">search_start</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="cm">/* this is our first search on the buffer, create a new search mark */</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_start_iter</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">search</span><span class="p">);</span> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="n">search_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_create_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_START_MARK</span><span class="p">,</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="n">search_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_create_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_END_MARK</span><span class="p">,</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">forward</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="n">search_end</span><span class="p">);</span> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="n">search_start</span><span class="p">);</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="p">}</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="p">}</span> +<a id="line-500" name="line-500"></a> +<a id="line-501" name="line-501"></a><span class="nl">wrap</span><span class="p">:</span> +<a id="line-502" name="line-502"></a> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">forward</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_forward_search</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TEXT_SEARCH_VISIBLE_ONLY</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start_m</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_m</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_backward_search</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TEXT_SEARCH_VISIBLE_ONLY</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start_m</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_m</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="p">}</span> +<a id="line-508" name="line-508"></a> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="n">gtk_text_buffer_select_range</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start_m</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_m</span><span class="p">);</span> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="n">gtk_text_buffer_move_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">search_start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start_m</span><span class="p">);</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="n">gtk_text_buffer_move_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">search_end</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_m</span><span class="p">);</span> +<a id="line-513" name="line-513"></a> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">gtk_text_view_scroll_mark_onscreen</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span><span class="w"> </span><span class="n">search_end</span><span class="p">);</span> +<a id="line-515" name="line-515"></a> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">wrapped</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="n">logview_findbar_set_message</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Wrapped"</span><span class="p">));</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="p">}</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">wrapped</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-521" name="line-521"></a> +<a id="line-522" name="line-522"></a><span class="hll"><span class="w"> </span><span class="n">GtkTextMark</span><span class="w"> </span><span class="o">*</span><span class="n">mark</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'mark' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'mark' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-523" name="line-523"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-524" name="line-524"></a> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_buffer_get_has_selection</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="cm">/* unselect */</span> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="n">mark</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"insert"</span><span class="p">);</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">mark</span><span class="p">);</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">gtk_text_buffer_move_mark_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"selection_bound"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="p">}</span> +<a id="line-531" name="line-531"></a> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="n">logview_findbar_set_message</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Not found"</span><span class="p">));</span> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">forward</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-535" name="line-535"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_start_iter</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">search</span><span class="p">);</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-537" name="line-537"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_end_iter</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">search</span><span class="p">);</span> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="p">}</span> +<a id="line-539" name="line-539"></a> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="n">wrapped</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-541" name="line-541"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">wrap</span><span class="p">;</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="p">}</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="p">}</span> +<a id="line-544" name="line-544"></a><span class="p">}</span> +<a id="line-545" name="line-545"></a> +<a id="line-546" name="line-546"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-547" name="line-547"></a><span class="nf">findbar_previous_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="p">,</span> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-549" name="line-549"></a><span class="p">{</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-551" name="line-551"></a> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="n">logview_search_text</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-553" name="line-553"></a><span class="p">}</span> +<a id="line-554" name="line-554"></a> +<a id="line-555" name="line-555"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-556" name="line-556"></a><span class="nf">findbar_next_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="p">,</span> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-558" name="line-558"></a><span class="p">{</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-560" name="line-560"></a> +<a id="line-561" name="line-561"></a><span class="w"> </span><span class="n">logview_search_text</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-562" name="line-562"></a><span class="p">}</span> +<a id="line-563" name="line-563"></a> +<a id="line-564" name="line-564"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-565" name="line-565"></a><span class="nf">text_changed_timeout_cb</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-566" name="line-566"></a><span class="p">{</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="n">GtkTextMark</span><span class="w"> </span><span class="o">*</span><span class="n">search_start</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">search_end</span><span class="p">;</span> +<a id="line-569" name="line-569"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">;</span> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-571" name="line-571"></a> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">search_timeout_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-573" name="line-573"></a> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="n">search_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_START_MARK</span><span class="p">);</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">search_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">SEARCH_END_MARK</span><span class="p">);</span> +<a id="line-577" name="line-577"></a> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">search_start</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-579" name="line-579"></a><span class="w"> </span><span class="cm">/* reset the search mark to the start */</span> +<a id="line-580" name="line-580"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_start_iter</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">);</span> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="n">gtk_text_buffer_move_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">search_start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">);</span> +<a id="line-582" name="line-582"></a><span class="w"> </span><span class="n">gtk_text_buffer_move_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">search_end</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">);</span> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="p">}</span> +<a id="line-584" name="line-584"></a> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="n">logview_findbar_set_message</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-586" name="line-586"></a> +<a id="line-587" name="line-587"></a><span class="w"> </span><span class="n">logview_search_text</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-588" name="line-588"></a> +<a id="line-589" name="line-589"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-590" name="line-590"></a><span class="p">}</span> +<a id="line-591" name="line-591"></a> +<a id="line-592" name="line-592"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-593" name="line-593"></a><span class="nf">findbar_text_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewFindbar</span><span class="w"> </span><span class="o">*</span><span class="n">findbar</span><span class="p">,</span> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-595" name="line-595"></a><span class="p">{</span> +<a id="line-596" name="line-596"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-597" name="line-597"></a> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">search_timeout_id</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">search_timeout_id</span><span class="p">);</span> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="p">}</span> +<a id="line-601" name="line-601"></a> +<a id="line-602" name="line-602"></a><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">search_timeout_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add</span><span class="w"> </span><span class="p">(</span><span class="mi">300</span><span class="p">,</span><span class="w"> </span><span class="n">text_changed_timeout_cb</span><span class="p">,</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-603" name="line-603"></a><span class="p">}</span> +<a id="line-604" name="line-604"></a> +<a id="line-605" name="line-605"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-606" name="line-606"></a><span class="nf">logview_search</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-609" name="line-609"></a><span class="p">{</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-611" name="line-611"></a> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="n">logview_findbar_open</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">));</span> +<a id="line-613" name="line-613"></a><span class="p">}</span> +<a id="line-614" name="line-614"></a> +<a id="line-615" name="line-615"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-616" name="line-616"></a><span class="nf">filter_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">start_line</span><span class="p">)</span> +<a id="line-617" name="line-617"></a><span class="p">{</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-619" name="line-619"></a><span class="hll"><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">end</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'end' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'end' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-620" name="line-620"></a><span class="hll"><span class="w"> </span><span class="n">gchar</span><span class="o">*</span><span class="w"> </span><span class="n">text</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'text' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'text' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-621" name="line-621"></a><span class="w"> </span><span class="n">GList</span><span class="o">*</span><span class="w"> </span><span class="n">cur_filter</span><span class="p">;</span> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">matched</span><span class="p">;</span> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-624" name="line-624"></a> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_line_count</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">);</span> +<a id="line-627" name="line-627"></a> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">start_line</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">lines</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="n">matched</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-630" name="line-630"></a> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_line</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="n">end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_copy</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">start</span><span class="p">);</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_line</span><span class="w"> </span><span class="p">(</span><span class="n">end</span><span class="p">);</span> +<a id="line-634" name="line-634"></a> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-636" name="line-636"></a> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">cur_filter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_filters</span><span class="p">;</span><span class="w"> </span><span class="n">cur_filter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="n">cur_filter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_next</span><span class="w"> </span><span class="p">(</span><span class="n">cur_filter</span><span class="p">))</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="p">{</span> +<a id="line-640" name="line-640"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">logview_filter_filter</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_FILTER</span><span class="w"> </span><span class="p">(</span><span class="n">cur_filter</span><span class="o">-></span><span class="n">data</span><span class="p">),</span><span class="w"> </span><span class="n">text</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="n">gtk_text_buffer_apply_tag</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span> +<a id="line-642" name="line-642"></a><span class="w"> </span><span class="n">logview_filter_get_tag</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_FILTER</span><span class="w"> </span><span class="p">(</span><span class="n">cur_filter</span><span class="o">-></span><span class="n">data</span><span class="p">)),</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">);</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="n">matched</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="p">}</span> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="p">}</span> +<a id="line-647" name="line-647"></a> +<a id="line-648" name="line-648"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-649" name="line-649"></a> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">matched</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">matches_only</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="n">gtk_text_buffer_apply_tag_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="s">"invisible-filter"</span><span class="p">,</span> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">);</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="n">gtk_text_buffer_remove_tag_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="s">"invisible-filter"</span><span class="p">,</span> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">);</span> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="p">}</span> +<a id="line-659" name="line-659"></a> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="n">gtk_text_iter_free</span><span class="w"> </span><span class="p">(</span><span class="n">end</span><span class="p">);</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="p">}</span> +<a id="line-662" name="line-662"></a><span class="p">}</span> +<a id="line-663" name="line-663"></a> +<a id="line-664" name="line-664"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-665" name="line-665"></a><span class="nf">filter_remove</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewFilter</span><span class="w"> </span><span class="o">*</span><span class="n">filter</span><span class="p">)</span> +<a id="line-666" name="line-666"></a><span class="p">{</span> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-669" name="line-669"></a> +<a id="line-670" name="line-670"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_bounds</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-672" name="line-672"></a> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="n">gtk_text_buffer_remove_tag</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">logview_filter_get_tag</span><span class="w"> </span><span class="p">(</span><span class="n">filter</span><span class="p">),</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-675" name="line-675"></a><span class="p">}</span> +<a id="line-676" name="line-676"></a> +<a id="line-677" name="line-677"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-678" name="line-678"></a><span class="nf">on_filter_toggled</span><span class="w"> </span><span class="p">(</span><span class="n">GtkCheckMenuItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">)</span> +<a id="line-679" name="line-679"></a><span class="p">{</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="n">LogviewWindowPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_window_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">);</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="o">*</span><span class="w"> </span><span class="n">name</span><span class="p">;</span> +<a id="line-682" name="line-682"></a><span class="hll"><span class="w"> </span><span class="n">LogviewFilter</span><span class="w"> </span><span class="o">*</span><span class="n">filter</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'filter' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'filter' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-683" name="line-683"></a> +<a id="line-684" name="line-684"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_item_get_label</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">));</span> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_check_menu_item_get_active</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">active_filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_append</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">active_filters</span><span class="p">,</span> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="n">logview_prefs_get_filter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">,</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="n">name</span><span class="p">));</span> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="n">filter_buffer</span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="n">filter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_filter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">active_filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_remove</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">active_filters</span><span class="p">,</span> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="n">filter</span><span class="p">);</span> +<a id="line-694" name="line-694"></a> +<a id="line-695" name="line-695"></a><span class="w"> </span><span class="n">filter_remove</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">filter</span><span class="p">);</span> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="p">}</span> +<a id="line-697" name="line-697"></a><span class="p">}</span> +<a id="line-698" name="line-698"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">remove_all_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">filter_menu</span><span class="p">)</span> +<a id="line-699" name="line-699"></a><span class="p">{</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="n">gtk_container_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">filter_menu</span><span class="p">),</span><span class="w"> </span><span class="n">widget</span><span class="p">);</span> +<a id="line-701" name="line-701"></a><span class="p">}</span> +<a id="line-702" name="line-702"></a> +<a id="line-703" name="line-703"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-704" name="line-704"></a><span class="nf">update_filter_menu</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-705" name="line-705"></a><span class="p">{</span> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="n">LogviewWindowPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">filter_menu</span><span class="p">;</span> +<a id="line-708" name="line-708"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">actions</span><span class="p">;</span> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-711" name="line-711"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">filters</span><span class="p">;</span> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="n">GtkTextTagTable</span><span class="w"> </span><span class="o">*</span><span class="n">table</span><span class="p">;</span> +<a id="line-713" name="line-713"></a><span class="hll"><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">tag</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'tag' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'tag' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-714" name="line-714"></a><span class="hll"><span class="w"> </span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'action' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'action' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-715" name="line-715"></a><span class="w"> </span><span class="n">gchar</span><span class="o">*</span><span class="w"> </span><span class="n">name</span><span class="p">;</span> +<a id="line-716" name="line-716"></a> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_window_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-718" name="line-718"></a> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">filter_action_group</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-720" name="line-720"></a> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="n">table</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">tag_table</span><span class="p">;</span> +<a id="line-722" name="line-722"></a> +<a id="line-723" name="line-723"></a><span class="w"> </span><span class="n">actions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_action_group_list_actions</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">filter_action_group</span><span class="p">);</span> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="n">filter_menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">gtk_builder_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">,</span><span class="w"> </span><span class="s">"filter_menu"</span><span class="p">);</span> +<a id="line-725" name="line-725"></a> +<a id="line-726" name="line-726"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">actions</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_tag_table_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">actions</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="n">gtk_text_tag_table_remove</span><span class="w"> </span><span class="p">(</span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="n">g_action_map_remove_action</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION_MAP</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">filter_action_group</span><span class="p">),</span><span class="w"> </span><span class="n">actions</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="p">}</span> +<a id="line-732" name="line-732"></a> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">actions</span><span class="p">);</span> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="n">gtk_container_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">filter_menu</span><span class="p">),</span><span class="w"> </span><span class="n">remove_all_widget</span><span class="p">,</span><span class="w"> </span><span class="n">filter_menu</span><span class="p">);</span> +<a id="line-735" name="line-735"></a><span class="w"> </span><span class="n">filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_filters</span><span class="w"> </span><span class="p">(</span><span class="n">logview_prefs_get</span><span class="w"> </span><span class="p">());</span> +<a id="line-736" name="line-736"></a> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">filters</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_next</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="s">"name"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_check_menu_item_new_with_label</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">filter_menu</span><span class="p">),</span><span class="w"> </span><span class="n">item</span><span class="p">);</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">filter_menu</span><span class="p">);</span> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="n">action</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_simple_action_new</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);;</span> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="n">g_action_map_add_action</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION_MAP</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">filter_action_group</span><span class="p">),</span><span class="w"> </span><span class="n">G_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">));</span> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="n">gtk_text_tag_table_add</span><span class="w"> </span><span class="p">(</span><span class="n">table</span><span class="p">,</span> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="n">logview_filter_get_tag</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_FILTER</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">)));</span> +<a id="line-747" name="line-747"></a> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="s">"toggled"</span><span class="p">,</span> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_filter_toggled</span><span class="p">),</span> +<a id="line-751" name="line-751"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">);</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">g_free</span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="p">}</span> +<a id="line-755" name="line-755"></a> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">filters</span><span class="p">);</span> +<a id="line-757" name="line-757"></a> +<a id="line-758" name="line-758"></a><span class="p">}</span> +<a id="line-759" name="line-759"></a> +<a id="line-760" name="line-760"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-761" name="line-761"></a><span class="nf">on_logview_filter_manager_response</span><span class="w"> </span><span class="p">(</span><span class="n">GtkDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">,</span> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">,</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">)</span> +<a id="line-764" name="line-764"></a><span class="p">{</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="n">update_filter_menu</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">);</span> +<a id="line-766" name="line-766"></a> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_filters</span><span class="p">);</span> +<a id="line-768" name="line-768"></a><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">active_filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-769" name="line-769"></a><span class="p">}</span> +<a id="line-770" name="line-770"></a> +<a id="line-771" name="line-771"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-772" name="line-772"></a><span class="nf">logview_manage_filters</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-775" name="line-775"></a><span class="p">{</span> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">;</span> +<a id="line-777" name="line-777"></a> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="n">manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_filter_manager_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-779" name="line-779"></a> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_logview_filter_manager_response</span><span class="p">),</span> +<a id="line-782" name="line-782"></a><span class="w"> </span><span class="n">user_data</span><span class="p">);</span> +<a id="line-783" name="line-783"></a> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="n">gtk_window_set_transient_for</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">),</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">));</span> +<a id="line-786" name="line-786"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">manager</span><span class="p">));</span> +<a id="line-787" name="line-787"></a><span class="p">}</span> +<a id="line-788" name="line-788"></a> +<a id="line-789" name="line-789"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-790" name="line-790"></a><span class="nf">logview_about</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-791" name="line-791"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-792" name="line-792"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">window</span><span class="p">)</span> +<a id="line-793" name="line-793"></a><span class="p">{</span> +<a id="line-794" name="line-794"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-795" name="line-795"></a> +<a id="line-796" name="line-796"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">license_trans</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strjoin</span><span class="w"> </span><span class="p">(</span><span class="s">"</span><span class="se">\n\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">logview_about_license</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span> +<a id="line-797" name="line-797"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">logview_about_license</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> +<a id="line-798" name="line-798"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="n">logview_about_license</span><span class="p">[</span><span class="mi">2</span><span class="p">]),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-799" name="line-799"></a> +<a id="line-800" name="line-800"></a><span class="cp">#ifdef ENABLE_NLS</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">p</span><span class="p">;</span> +<a id="line-802" name="line-802"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_about_documenters</span><span class="p">;</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">p</span><span class="p">)</span> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="o">*</span><span class="n">p</span><span class="p">);</span> +<a id="line-804" name="line-804"></a><span class="cp">#endif</span> +<a id="line-805" name="line-805"></a> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="n">gtk_show_about_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="s">"program-name"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"System Log Viewer"</span><span class="p">),</span> +<a id="line-808" name="line-808"></a><span class="w"> </span><span class="s">"version"</span><span class="p">,</span><span class="w"> </span><span class="n">VERSION</span><span class="p">,</span> +<a id="line-809" name="line-809"></a><span class="w"> </span><span class="s">"title"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"About System Log Viewer"</span><span class="p">),</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="s">"copyright"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Copyright </span><span class="se">\xc2\xa9</span><span class="s"> 1998-2008 Free Software Foundation, Inc.</span><span class="se">\n</span><span class="s">"</span> +<a id="line-811" name="line-811"></a><span class="w"> </span><span class="s">"Copyright </span><span class="se">\xc2\xa9</span><span class="s"> 2011-2021 MATE developers"</span><span class="p">),</span> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="s">"license"</span><span class="p">,</span><span class="w"> </span><span class="n">license_trans</span><span class="p">,</span> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="s">"wrap-license"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="s">"comments"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"View, monitor or analyze your system logs in a gradual manner."</span><span class="p">),</span> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="s">"authors"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_about_authors</span><span class="p">,</span> +<a id="line-816" name="line-816"></a><span class="w"> </span><span class="s">"documenters"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_about_documenters</span><span class="p">,</span> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="s">"translator_credits"</span><span class="p">,</span><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">logview_about_translator_credits</span><span class="p">,</span> +<a id="line-818" name="line-818"></a><span class="w"> </span><span class="s">"translator-credits"</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">?</span> +<a id="line-819" name="line-819"></a><span class="w"> </span><span class="nl">logview_about_translator_credits</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-820" name="line-820"></a><span class="w"> </span><span class="s">"logo_icon_name"</span><span class="p">,</span><span class="w"> </span><span class="s">"mate-system-log"</span><span class="p">,</span> +<a id="line-821" name="line-821"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-822" name="line-822"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">license_trans</span><span class="p">);</span> +<a id="line-823" name="line-823"></a> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-825" name="line-825"></a><span class="p">}</span> +<a id="line-826" name="line-826"></a> +<a id="line-827" name="line-827"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-828" name="line-828"></a><span class="nf">logview_toggle_statusbar</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-829" name="line-829"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-831" name="line-831"></a><span class="p">{</span> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-833" name="line-833"></a> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_visible</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="p">))</span> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="p">);</span> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="k">else</span> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="p">);</span> +<a id="line-838" name="line-838"></a><span class="p">}</span> +<a id="line-839" name="line-839"></a> +<a id="line-840" name="line-840"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-841" name="line-841"></a><span class="nf">logview_toggle_sidebar</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-844" name="line-844"></a><span class="p">{</span> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-846" name="line-846"></a> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_visible</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">sidebar</span><span class="p">))</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">sidebar</span><span class="p">);</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="k">else</span> +<a id="line-850" name="line-850"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">sidebar</span><span class="p">);</span> +<a id="line-851" name="line-851"></a><span class="p">}</span> +<a id="line-852" name="line-852"></a> +<a id="line-853" name="line-853"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-854" name="line-854"></a><span class="nf">logview_toggle_match_filters</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-855" name="line-855"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">state</span><span class="p">,</span> +<a id="line-856" name="line-856"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-857" name="line-857"></a><span class="p">{</span> +<a id="line-858" name="line-858"></a> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-860" name="line-860"></a> +<a id="line-861" name="line-861"></a><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">matches_only</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_variant_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state</span><span class="p">);</span> +<a id="line-862" name="line-862"></a><span class="w"> </span><span class="n">g_simple_action_set_state</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">,</span><span class="w"> </span><span class="n">state</span><span class="p">);</span> +<a id="line-863" name="line-863"></a><span class="w"> </span><span class="n">filter_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-864" name="line-864"></a><span class="p">}</span> +<a id="line-865" name="line-865"></a> +<a id="line-866" name="line-866"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-867" name="line-867"></a><span class="nf">logview_quit</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-868" name="line-868"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-869" name="line-869"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-870" name="line-870"></a><span class="p">{</span> +<a id="line-871" name="line-871"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">));</span> +<a id="line-872" name="line-872"></a><span class="w"> </span><span class="n">gtk_main_quit</span><span class="w"> </span><span class="p">();</span> +<a id="line-873" name="line-873"></a><span class="p">}</span> +<a id="line-874" name="line-874"></a> +<a id="line-875" name="line-875"></a><span class="cm">/* GObject functions */</span> +<a id="line-876" name="line-876"></a> +<a id="line-877" name="line-877"></a><span class="cm">/* Menus */</span> +<a id="line-878" name="line-878"></a><span class="k">static</span><span class="w"> </span><span class="n">GActionEntry</span><span class="w"> </span><span class="n">win_entries</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"OpenLog"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_open_log</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-880" name="line-880"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"CloseLog"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_close_log</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-881" name="line-881"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"Quit"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_quit</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"Copy"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_copy</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"SelectAll"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_select_all</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-884" name="line-884"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ShowStatusBar"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_toggle_statusbar</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="s">"true"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ShowSidebar"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_toggle_sidebar</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="s">"true"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-886" name="line-886"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"Search"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_search</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ViewZoomIn"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_bigger_text</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ViewZoomOut"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_smaller_text</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-889" name="line-889"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ViewZoom100"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_normal_text</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-890" name="line-890"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"FilterManage"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_manage_filters</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="s">"false"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-891" name="line-891"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"FilterMatchOnly"</span><span class="p">,</span><span class="w"> </span><span class="n">activate_toggle</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="s">"false"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_toggle_match_filters</span><span class="p">},</span> +<a id="line-892" name="line-892"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"HelpContents"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_help</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-893" name="line-893"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"AboutAction"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_about</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-894" name="line-894"></a><span class="p">};</span> +<a id="line-895" name="line-895"></a> +<a id="line-896" name="line-896"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-897" name="line-897"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">keyval</span><span class="p">;</span> +<a id="line-898" name="line-898"></a><span class="w"> </span><span class="n">GdkModifierType</span><span class="w"> </span><span class="n">modifier</span><span class="p">;</span> +<a id="line-899" name="line-899"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">widget_id</span><span class="p">;</span> +<a id="line-900" name="line-900"></a><span class="p">}</span><span class="w"> </span><span class="n">menu_keybindings</span><span class="w"> </span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-901" name="line-901"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_O</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"open_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-902" name="line-902"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_W</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"close_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-903" name="line-903"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_Q</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"quit_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-904" name="line-904"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_C</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"copy_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-905" name="line-905"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_A</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"select_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-906" name="line-906"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_F9</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">"side_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_F</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"find_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-908" name="line-908"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_plus</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"in_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_minus</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"out_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-910" name="line-910"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_0</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"normal_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-911" name="line-911"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_F1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">"help_item"</span><span class="w"> </span><span class="p">}</span> +<a id="line-912" name="line-912"></a><span class="p">};</span> +<a id="line-913" name="line-913"></a> +<a id="line-914" name="line-914"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-915" name="line-915"></a><span class="nf">window_size_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">GdkEventConfigure</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-916" name="line-916"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-917" name="line-917"></a><span class="p">{</span> +<a id="line-918" name="line-918"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-919" name="line-919"></a> +<a id="line-920" name="line-920"></a><span class="w"> </span><span class="n">logview_prefs_store_window_size</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">,</span> +<a id="line-921" name="line-921"></a><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">height</span><span class="p">);</span> +<a id="line-922" name="line-922"></a> +<a id="line-923" name="line-923"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-924" name="line-924"></a><span class="p">}</span> +<a id="line-925" name="line-925"></a> +<a id="line-926" name="line-926"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-927" name="line-927"></a><span class="nf">real_select_day</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">,</span> +<a id="line-928" name="line-928"></a><span class="w"> </span><span class="n">GDate</span><span class="w"> </span><span class="o">*</span><span class="n">date</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">first_line</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">last_line</span><span class="p">)</span> +<a id="line-929" name="line-929"></a><span class="p">{</span> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-931" name="line-931"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start_iter</span><span class="p">,</span><span class="w"> </span><span class="n">end_iter</span><span class="p">,</span><span class="w"> </span><span class="n">start_vis</span><span class="p">,</span><span class="w"> </span><span class="n">end_vis</span><span class="p">;</span> +<a id="line-932" name="line-932"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">visible_rect</span><span class="p">;</span> +<a id="line-933" name="line-933"></a> +<a id="line-934" name="line-934"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-935" name="line-935"></a> +<a id="line-936" name="line-936"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_bounds</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start_iter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">);</span> +<a id="line-937" name="line-937"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_line</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start_vis</span><span class="p">,</span><span class="w"> </span><span class="n">first_line</span><span class="p">);</span> +<a id="line-938" name="line-938"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_line</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_vis</span><span class="p">,</span><span class="w"> </span><span class="n">last_line</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-939" name="line-939"></a> +<a id="line-940" name="line-940"></a><span class="w"> </span><span class="cm">/* clear all previous invisible tags */</span> +<a id="line-941" name="line-941"></a><span class="w"> </span><span class="n">gtk_text_buffer_remove_tag_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span> +<a id="line-942" name="line-942"></a><span class="w"> </span><span class="o">&</span><span class="n">start_iter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">);</span> +<a id="line-943" name="line-943"></a> +<a id="line-944" name="line-944"></a><span class="w"> </span><span class="n">gtk_text_buffer_apply_tag_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span> +<a id="line-945" name="line-945"></a><span class="w"> </span><span class="o">&</span><span class="n">start_iter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start_vis</span><span class="p">);</span> +<a id="line-946" name="line-946"></a><span class="w"> </span><span class="n">gtk_text_buffer_apply_tag_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="o">&</span><span class="n">end_vis</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">);</span> +<a id="line-948" name="line-948"></a> +<a id="line-949" name="line-949"></a><span class="w"> </span><span class="cm">/* FIXME: why is this needed to update the view when selecting a day back? */</span> +<a id="line-950" name="line-950"></a><span class="w"> </span><span class="n">gtk_text_view_get_visible_rect</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span> +<a id="line-951" name="line-951"></a><span class="w"> </span><span class="o">&</span><span class="n">visible_rect</span><span class="p">);</span> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="n">gdk_window_invalidate_rect</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span> +<a id="line-953" name="line-953"></a><span class="w"> </span><span class="o">&</span><span class="n">visible_rect</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-954" name="line-954"></a><span class="p">}</span> +<a id="line-955" name="line-955"></a> +<a id="line-956" name="line-956"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-957" name="line-957"></a><span class="nf">loglist_day_selected_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">loglist</span><span class="p">,</span> +<a id="line-958" name="line-958"></a><span class="w"> </span><span class="n">Day</span><span class="w"> </span><span class="o">*</span><span class="n">day</span><span class="p">,</span> +<a id="line-959" name="line-959"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-960" name="line-960"></a><span class="p">{</span> +<a id="line-961" name="line-961"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-962" name="line-962"></a> +<a id="line-963" name="line-963"></a><span class="w"> </span><span class="n">real_select_day</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">day</span><span class="o">-></span><span class="n">date</span><span class="p">,</span><span class="w"> </span><span class="n">day</span><span class="o">-></span><span class="n">first_line</span><span class="p">,</span><span class="w"> </span><span class="n">day</span><span class="o">-></span><span class="n">last_line</span><span class="p">);</span> +<a id="line-964" name="line-964"></a><span class="p">}</span> +<a id="line-965" name="line-965"></a> +<a id="line-966" name="line-966"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-967" name="line-967"></a><span class="nf">loglist_day_cleared_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLoglist</span><span class="w"> </span><span class="o">*</span><span class="n">loglist</span><span class="p">,</span> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-969" name="line-969"></a><span class="p">{</span> +<a id="line-970" name="line-970"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-971" name="line-971"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-972" name="line-972"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-973" name="line-973"></a> +<a id="line-974" name="line-974"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-975" name="line-975"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_bounds</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-976" name="line-976"></a> +<a id="line-977" name="line-977"></a><span class="w"> </span><span class="cm">/* clear all previous invisible tags */</span> +<a id="line-978" name="line-978"></a><span class="w"> </span><span class="n">gtk_text_buffer_remove_tag_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span> +<a id="line-979" name="line-979"></a><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-980" name="line-980"></a><span class="p">}</span> +<a id="line-981" name="line-981"></a> +<a id="line-982" name="line-982"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-983" name="line-983"></a><span class="nf">logview_window_schedule_log_read</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-984" name="line-984"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">)</span> +<a id="line-985" name="line-985"></a><span class="p">{</span> +<a id="line-986" name="line-986"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">read_cancellable</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-987" name="line-987"></a><span class="w"> </span><span class="n">g_cancellable_cancel</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">read_cancellable</span><span class="p">);</span> +<a id="line-988" name="line-988"></a><span class="w"> </span><span class="n">g_clear_object</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">read_cancellable</span><span class="p">);</span> +<a id="line-989" name="line-989"></a><span class="w"> </span><span class="p">}</span> +<a id="line-990" name="line-990"></a> +<a id="line-991" name="line-991"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">read_cancellable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_cancellable_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-992" name="line-992"></a><span class="w"> </span><span class="n">logview_log_read_new_lines</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">read_cancellable</span><span class="p">,</span> +<a id="line-994" name="line-994"></a><span class="w"> </span><span class="p">(</span><span class="n">LogviewNewLinesCallback</span><span class="p">)</span><span class="w"> </span><span class="n">read_new_lines_cb</span><span class="p">,</span> +<a id="line-995" name="line-995"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-996" name="line-996"></a><span class="p">}</span> +<a id="line-997" name="line-997"></a> +<a id="line-998" name="line-998"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-999" name="line-999"></a><span class="nf">log_monitor_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-1000" name="line-1000"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1001" name="line-1001"></a><span class="p">{</span> +<a id="line-1002" name="line-1002"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1003" name="line-1003"></a> +<a id="line-1004" name="line-1004"></a><span class="w"> </span><span class="cm">/* reschedule a read */</span> +<a id="line-1005" name="line-1005"></a><span class="w"> </span><span class="n">logview_window_schedule_log_read</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-1006" name="line-1006"></a><span class="p">}</span> +<a id="line-1007" name="line-1007"></a> +<a id="line-1008" name="line-1008"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1009" name="line-1009"></a><span class="nf">paint_timestamps</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">old_line_count</span><span class="p">,</span> +<a id="line-1010" name="line-1010"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">days</span><span class="p">)</span> +<a id="line-1011" name="line-1011"></a><span class="p">{</span> +<a id="line-1012" name="line-1012"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-1013" name="line-1013"></a> +<a id="line-1014" name="line-1014"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">days</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1015" name="line-1015"></a><span class="w"> </span><span class="n">Day</span><span class="w"> </span><span class="o">*</span><span class="n">day</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1016" name="line-1016"></a> +<a id="line-1017" name="line-1017"></a><span class="w"> </span><span class="n">_gtk_text_buffer_apply_tag_to_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span> +<a id="line-1018" name="line-1018"></a><span class="w"> </span><span class="n">old_line_count</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">day</span><span class="o">-></span><span class="n">first_line</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-1019" name="line-1019"></a><span class="w"> </span><span class="n">old_line_count</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">day</span><span class="o">-></span><span class="n">last_line</span><span class="p">,</span> +<a id="line-1020" name="line-1020"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">day</span><span class="o">-></span><span class="n">timestamp_len</span><span class="p">,</span><span class="w"> </span><span class="s">"gray"</span><span class="p">);</span> +<a id="line-1021" name="line-1021"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1022" name="line-1022"></a><span class="p">}</span> +<a id="line-1023" name="line-1023"></a> +<a id="line-1024" name="line-1024"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1025" name="line-1025"></a><span class="nf">read_new_lines_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-1026" name="line-1026"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="p">,</span> +<a id="line-1027" name="line-1027"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">new_days</span><span class="p">,</span> +<a id="line-1028" name="line-1028"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">,</span> +<a id="line-1029" name="line-1029"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1030" name="line-1030"></a><span class="p">{</span> +<a id="line-1031" name="line-1031"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1032" name="line-1032"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-1033" name="line-1033"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">boldify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1034" name="line-1034"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">old_line_count</span><span class="p">,</span><span class="w"> </span><span class="n">filter_start_line</span><span class="p">;</span> +<a id="line-1035" name="line-1035"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">start</span><span class="p">;</span> +<a id="line-1036" name="line-1036"></a><span class="w"> </span><span class="n">GtkTextMark</span><span class="w"> </span><span class="o">*</span><span class="n">mark</span><span class="p">;</span> +<a id="line-1037" name="line-1037"></a><span class="hll"><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">converted</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">primary</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'primary' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'primary' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">len</span><span class="p">;</span> +<a id="line-1039" name="line-1039"></a> +<a id="line-1040" name="line-1040"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1041" name="line-1041"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_error_matches</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_ERROR</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_ERROR_CANCELLED</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1042" name="line-1042"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Can't read from </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">"</span><span class="p">),</span> +<a id="line-1043" name="line-1043"></a><span class="w"> </span><span class="n">logview_log_get_display_name</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-1044" name="line-1044"></a><span class="w"> </span><span class="n">logview_window_add_error</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1045" name="line-1045"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-1046" name="line-1046"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1047" name="line-1047"></a> +<a id="line-1048" name="line-1048"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1049" name="line-1049"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1050" name="line-1050"></a> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1052" name="line-1052"></a><span class="w"> </span><span class="cm">/* there's no error, but no lines have been read */</span> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1054" name="line-1054"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1055" name="line-1055"></a> +<a id="line-1056" name="line-1056"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-1057" name="line-1057"></a><span class="w"> </span><span class="n">old_line_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_line_count</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">);</span> +<a id="line-1058" name="line-1058"></a><span class="w"> </span><span class="n">filter_start_line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">old_line_count</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="p">(</span><span class="n">old_line_count</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1059" name="line-1059"></a> +<a id="line-1060" name="line-1060"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_buffer_get_char_count</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1061" name="line-1061"></a><span class="w"> </span><span class="n">boldify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1062" name="line-1062"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1063" name="line-1063"></a> +<a id="line-1064" name="line-1064"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_end_iter</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1065" name="line-1065"></a> +<a id="line-1066" name="line-1066"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">boldify</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1067" name="line-1067"></a><span class="w"> </span><span class="n">mark</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_create_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1068" name="line-1068"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1069" name="line-1069"></a> +<a id="line-1070" name="line-1070"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1071" name="line-1071"></a><span class="w"> </span><span class="n">len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-1072" name="line-1072"></a> +<a id="line-1073" name="line-1073"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_utf8_validate</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">],</span><span class="w"> </span><span class="n">len</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1074" name="line-1074"></a><span class="w"> </span><span class="n">converted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_locale_to_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">],</span><span class="w"> </span><span class="p">(</span><span class="n">gssize</span><span class="p">)</span><span class="w"> </span><span class="n">len</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">len</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1075" name="line-1075"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">converted</span><span class="p">,</span><span class="w"> </span><span class="n">len</span><span class="p">);</span> +<a id="line-1076" name="line-1076"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">converted</span><span class="p">);</span> +<a id="line-1077" name="line-1077"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1078" name="line-1078"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">],</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">]));</span> +<a id="line-1079" name="line-1079"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1080" name="line-1080"></a> +<a id="line-1081" name="line-1081"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_to_end</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1082" name="line-1082"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1083" name="line-1083"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_char</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1084" name="line-1084"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1085" name="line-1085"></a> +<a id="line-1086" name="line-1086"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">boldify</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1087" name="line-1087"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">mark</span><span class="p">);</span> +<a id="line-1088" name="line-1088"></a><span class="w"> </span><span class="n">gtk_text_buffer_apply_tag_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"bold"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1089" name="line-1089"></a><span class="w"> </span><span class="n">gtk_text_buffer_delete_mark</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">mark</span><span class="p">);</span> +<a id="line-1090" name="line-1090"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1091" name="line-1091"></a><span class="w"> </span><span class="n">filter_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">filter_start_line</span><span class="p">);</span> +<a id="line-1092" name="line-1092"></a> +<a id="line-1093" name="line-1093"></a><span class="w"> </span><span class="n">gtk_text_view_scroll_to_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span> +<a id="line-1094" name="line-1094"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-1095" name="line-1095"></a> +<a id="line-1096" name="line-1096"></a><span class="w"> </span><span class="n">paint_timestamps</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">old_line_count</span><span class="p">,</span><span class="w"> </span><span class="n">new_days</span><span class="p">);</span> +<a id="line-1097" name="line-1097"></a> +<a id="line-1098" name="line-1098"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">monitor_id</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1099" name="line-1099"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">monitor_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="s">"log-changed"</span><span class="p">,</span> +<a id="line-1100" name="line-1100"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">log_monitor_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1101" name="line-1101"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1102" name="line-1102"></a> +<a id="line-1103" name="line-1103"></a><span class="w"> </span><span class="n">logview_update_statusbar</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-1104" name="line-1104"></a><span class="w"> </span><span class="n">logview_loglist_update_lines</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_LOGLIST</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">loglist</span><span class="p">),</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-1105" name="line-1105"></a><span class="p">}</span> +<a id="line-1106" name="line-1106"></a> +<a id="line-1107" name="line-1107"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1108" name="line-1108"></a><span class="nf">active_log_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewManager</span><span class="w"> </span><span class="o">*</span><span class="n">manager</span><span class="p">,</span> +<a id="line-1109" name="line-1109"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-1110" name="line-1110"></a><span class="w"> </span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">old_log</span><span class="p">,</span> +<a id="line-1111" name="line-1111"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1112" name="line-1112"></a><span class="p">{</span> +<a id="line-1113" name="line-1113"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1114" name="line-1114"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="p">;</span> +<a id="line-1115" name="line-1115"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-1116" name="line-1116"></a> +<a id="line-1117" name="line-1117"></a><span class="w"> </span><span class="n">findbar_close_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_FINDBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">),</span> +<a id="line-1118" name="line-1118"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1119" name="line-1119"></a> +<a id="line-1120" name="line-1120"></a><span class="w"> </span><span class="n">logview_set_window_title</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">logview_log_get_display_name</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-1121" name="line-1121"></a> +<a id="line-1122" name="line-1122"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">monitor_id</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1123" name="line-1123"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">old_log</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">monitor_id</span><span class="p">);</span> +<a id="line-1124" name="line-1124"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">monitor_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1125" name="line-1125"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1126" name="line-1126"></a> +<a id="line-1127" name="line-1127"></a><span class="w"> </span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_log_get_cached_lines</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-1128" name="line-1128"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_new</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">tag_table</span><span class="p">);</span> +<a id="line-1129" name="line-1129"></a> +<a id="line-1130" name="line-1130"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1131" name="line-1131"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-1132" name="line-1132"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1133" name="line-1133"></a> +<a id="line-1134" name="line-1134"></a><span class="w"> </span><span class="cm">/* update the text view to show the current lines */</span> +<a id="line-1135" name="line-1135"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_end_iter</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1136" name="line-1136"></a> +<a id="line-1137" name="line-1137"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1138" name="line-1138"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">],</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">]));</span> +<a id="line-1139" name="line-1139"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_to_end</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1140" name="line-1140"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1141" name="line-1141"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_char</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1142" name="line-1142"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1143" name="line-1143"></a> +<a id="line-1144" name="line-1144"></a><span class="w"> </span><span class="n">paint_timestamps</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">logview_log_get_days_for_cached_lines</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-1145" name="line-1145"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1146" name="line-1146"></a> +<a id="line-1147" name="line-1147"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">logview_log_has_new_lines</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1148" name="line-1148"></a><span class="w"> </span><span class="cm">/* read the new lines */</span> +<a id="line-1149" name="line-1149"></a><span class="w"> </span><span class="n">logview_window_schedule_log_read</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-1150" name="line-1150"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1151" name="line-1151"></a><span class="w"> </span><span class="cm">/* start now monitoring the log for changes */</span> +<a id="line-1152" name="line-1152"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">monitor_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="s">"log-changed"</span><span class="p">,</span> +<a id="line-1153" name="line-1153"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">log_monitor_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1154" name="line-1154"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1155" name="line-1155"></a> +<a id="line-1156" name="line-1156"></a><span class="w"> </span><span class="cm">/* we set the buffer to the view anyway;</span> +<a id="line-1157" name="line-1157"></a><span class="cm"> * if there are no lines it will be empty for the duration of the thread</span> +<a id="line-1158" name="line-1158"></a><span class="cm"> * and will help us to distinguish the two cases of the following if</span> +<a id="line-1159" name="line-1159"></a><span class="cm"> * cause in the callback.</span> +<a id="line-1160" name="line-1160"></a><span class="cm"> */</span> +<a id="line-1161" name="line-1161"></a><span class="w"> </span><span class="n">gtk_text_view_set_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span><span class="w"> </span><span class="n">buffer</span><span class="p">);</span> +<a id="line-1162" name="line-1162"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">);</span> +<a id="line-1163" name="line-1163"></a><span class="p">}</span> +<a id="line-1164" name="line-1164"></a> +<a id="line-1165" name="line-1165"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1166" name="line-1166"></a><span class="nf">font_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewPrefs</span><span class="w"> </span><span class="o">*</span><span class="n">prefs</span><span class="p">,</span> +<a id="line-1167" name="line-1167"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">font_name</span><span class="p">,</span> +<a id="line-1168" name="line-1168"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1169" name="line-1169"></a><span class="p">{</span> +<a id="line-1170" name="line-1170"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1171" name="line-1171"></a> +<a id="line-1172" name="line-1172"></a><span class="w"> </span><span class="n">logview_set_font</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">font_name</span><span class="p">);</span> +<a id="line-1173" name="line-1173"></a><span class="p">}</span> +<a id="line-1174" name="line-1174"></a> +<a id="line-1175" name="line-1175"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-1176" name="line-1176"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">keyval</span><span class="p">;</span> +<a id="line-1177" name="line-1177"></a><span class="w"> </span><span class="n">GdkModifierType</span><span class="w"> </span><span class="n">modifier</span><span class="p">;</span> +<a id="line-1178" name="line-1178"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">;</span> +<a id="line-1179" name="line-1179"></a><span class="p">}</span><span class="w"> </span><span class="n">extra_keybindings</span><span class="w"> </span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-1180" name="line-1180"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_KP_Add</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"ViewZoomIn"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_KP_Subtract</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"ViewZoomOut"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1182" name="line-1182"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_KP_0</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"ViewZoom100"</span><span class="w"> </span><span class="p">}</span> +<a id="line-1183" name="line-1183"></a><span class="p">};</span> +<a id="line-1184" name="line-1184"></a> +<a id="line-1185" name="line-1185"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1186" name="line-1186"></a><span class="nf">key_press_event_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1187" name="line-1187"></a><span class="w"> </span><span class="n">GdkEventKey</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-1188" name="line-1188"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1189" name="line-1189"></a><span class="p">{</span> +<a id="line-1190" name="line-1190"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1191" name="line-1191"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">modifier</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">gtk_accelerator_get_default_mod_mask</span><span class="w"> </span><span class="p">();</span> +<a id="line-1192" name="line-1192"></a><span class="w"> </span><span class="n">GAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">;</span> +<a id="line-1193" name="line-1193"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-1194" name="line-1194"></a> +<a id="line-1195" name="line-1195"></a><span class="w"> </span><span class="cm">/* handle accelerators that we want bound, but aren't associated with</span> +<a id="line-1196" name="line-1196"></a><span class="cm"> * an action */</span> +<a id="line-1197" name="line-1197"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">extra_keybindings</span><span class="p">);</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1198" name="line-1198"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">keyval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">extra_keybindings</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">keyval</span><span class="w"> </span><span class="o">&&</span> +<a id="line-1199" name="line-1199"></a><span class="w"> </span><span class="n">modifier</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">extra_keybindings</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">modifier</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1200" name="line-1200"></a><span class="w"> </span><span class="n">action</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_action_map_lookup_action</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION_MAP</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">action_group</span><span class="p">),</span> +<a id="line-1201" name="line-1201"></a><span class="w"> </span><span class="n">extra_keybindings</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">action</span><span class="p">);</span> +<a id="line-1202" name="line-1202"></a><span class="w"> </span><span class="n">g_action_activate</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1203" name="line-1203"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1204" name="line-1204"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1205" name="line-1205"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1206" name="line-1206"></a> +<a id="line-1207" name="line-1207"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1208" name="line-1208"></a><span class="p">}</span> +<a id="line-1209" name="line-1209"></a> +<a id="line-1210" name="line-1210"></a><span class="cm">/* adapted from GEdit */</span> +<a id="line-1211" name="line-1211"></a> +<a id="line-1212" name="line-1212"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1213" name="line-1213"></a><span class="nf">message_area_create_error_box</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-1214" name="line-1214"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">message_area</span><span class="p">)</span> +<a id="line-1215" name="line-1215"></a><span class="p">{</span> +<a id="line-1216" name="line-1216"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hbox_content</span><span class="p">;</span> +<a id="line-1217" name="line-1217"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">image</span><span class="p">;</span> +<a id="line-1218" name="line-1218"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">vbox</span><span class="p">;</span> +<a id="line-1219" name="line-1219"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">primary_label</span><span class="p">;</span> +<a id="line-1220" name="line-1220"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">secondary_label</span><span class="p">;</span> +<a id="line-1221" name="line-1221"></a> +<a id="line-1222" name="line-1222"></a><span class="w"> </span><span class="n">hbox_content</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">);</span> +<a id="line-1223" name="line-1223"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">hbox_content</span><span class="p">);</span> +<a id="line-1224" name="line-1224"></a> +<a id="line-1225" name="line-1225"></a><span class="w"> </span><span class="n">image</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"dialog-error"</span><span class="p">,</span> +<a id="line-1226" name="line-1226"></a><span class="w"> </span><span class="n">GTK_ICON_SIZE_DIALOG</span><span class="p">);</span> +<a id="line-1227" name="line-1227"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">image</span><span class="p">);</span> +<a id="line-1228" name="line-1228"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox_content</span><span class="p">),</span><span class="w"> </span><span class="n">image</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1229" name="line-1229"></a><span class="w"> </span><span class="n">gtk_widget_set_halign</span><span class="w"> </span><span class="p">(</span><span class="n">image</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ALIGN_CENTER</span><span class="p">);</span> +<a id="line-1230" name="line-1230"></a><span class="w"> </span><span class="n">gtk_widget_set_valign</span><span class="w"> </span><span class="p">(</span><span class="n">image</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ALIGN_START</span><span class="p">);</span> +<a id="line-1231" name="line-1231"></a> +<a id="line-1232" name="line-1232"></a><span class="w"> </span><span class="n">vbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1233" name="line-1233"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">);</span> +<a id="line-1234" name="line-1234"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox_content</span><span class="p">),</span><span class="w"> </span><span class="n">vbox</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1235" name="line-1235"></a> +<a id="line-1236" name="line-1236"></a><span class="w"> </span><span class="n">primary_label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1237" name="line-1237"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">primary_label</span><span class="p">);</span> +<a id="line-1238" name="line-1238"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">primary_label</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1239" name="line-1239"></a><span class="w"> </span><span class="n">gtk_label_set_use_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">primary_label</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1240" name="line-1240"></a><span class="w"> </span><span class="n">gtk_label_set_line_wrap</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">primary_label</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1241" name="line-1241"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">primary_label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-1242" name="line-1242"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">primary_label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-1243" name="line-1243"></a><span class="w"> </span><span class="n">gtk_widget_set_can_focus</span><span class="w"> </span><span class="p">(</span><span class="n">primary_label</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1244" name="line-1244"></a><span class="w"> </span><span class="n">gtk_label_set_selectable</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">primary_label</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1245" name="line-1245"></a> +<a id="line-1246" name="line-1246"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">message_primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">primary_label</span><span class="p">;</span> +<a id="line-1247" name="line-1247"></a> +<a id="line-1248" name="line-1248"></a><span class="w"> </span><span class="n">secondary_label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1249" name="line-1249"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">secondary_label</span><span class="p">);</span> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">secondary_label</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1251" name="line-1251"></a><span class="w"> </span><span class="n">gtk_widget_set_can_focus</span><span class="w"> </span><span class="p">(</span><span class="n">secondary_label</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1252" name="line-1252"></a><span class="w"> </span><span class="n">gtk_label_set_use_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">secondary_label</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1253" name="line-1253"></a><span class="w"> </span><span class="n">gtk_label_set_line_wrap</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">secondary_label</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1254" name="line-1254"></a><span class="w"> </span><span class="n">gtk_label_set_selectable</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">secondary_label</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1255" name="line-1255"></a><span class="w"> </span><span class="n">gtk_label_set_xalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">secondary_label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-1256" name="line-1256"></a><span class="w"> </span><span class="n">gtk_label_set_yalign</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">secondary_label</span><span class="p">),</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-1257" name="line-1257"></a> +<a id="line-1258" name="line-1258"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">message_secondary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">secondary_label</span><span class="p">;</span> +<a id="line-1259" name="line-1259"></a> +<a id="line-1260" name="line-1260"></a><span class="w"> </span><span class="n">gtk_container_add</span> +<a id="line-1261" name="line-1261"></a><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_info_bar_get_content_area</span> +<a id="line-1262" name="line-1262"></a><span class="w"> </span><span class="p">(</span><span class="n">GTK_INFO_BAR</span><span class="w"> </span><span class="p">(</span><span class="n">message_area</span><span class="p">))),</span> +<a id="line-1263" name="line-1263"></a><span class="w"> </span><span class="n">hbox_content</span><span class="p">);</span> +<a id="line-1264" name="line-1264"></a><span class="p">}</span> +<a id="line-1265" name="line-1265"></a> +<a id="line-1266" name="line-1266"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1267" name="line-1267"></a><span class="nf">message_area_set_labels</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-1268" name="line-1268"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">primary</span><span class="p">,</span> +<a id="line-1269" name="line-1269"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">secondary</span><span class="p">)</span> +<a id="line-1270" name="line-1270"></a><span class="p">{</span> +<a id="line-1271" name="line-1271"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">primary_markup</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">secondary_markup</span><span class="p">;</span> +<a id="line-1272" name="line-1272"></a> +<a id="line-1273" name="line-1273"></a><span class="w"> </span><span class="n">primary_markup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_markup_printf_escaped</span><span class="w"> </span><span class="p">(</span><span class="s">"<b>%s</b>"</span><span class="p">,</span><span class="w"> </span><span class="n">primary</span><span class="p">);</span> +<a id="line-1274" name="line-1274"></a><span class="w"> </span><span class="n">secondary_markup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_markup_printf_escaped</span><span class="w"> </span><span class="p">(</span><span class="s">"<small>%s</small>"</span><span class="p">,</span> +<a id="line-1275" name="line-1275"></a><span class="w"> </span><span class="n">secondary</span><span class="p">);</span> +<a id="line-1276" name="line-1276"></a> +<a id="line-1277" name="line-1277"></a><span class="w"> </span><span class="n">gtk_label_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">message_primary</span><span class="p">),</span> +<a id="line-1278" name="line-1278"></a><span class="w"> </span><span class="n">primary_markup</span><span class="p">);</span> +<a id="line-1279" name="line-1279"></a><span class="w"> </span><span class="n">gtk_label_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">message_secondary</span><span class="p">),</span> +<a id="line-1280" name="line-1280"></a><span class="w"> </span><span class="n">secondary_markup</span><span class="p">);</span> +<a id="line-1281" name="line-1281"></a> +<a id="line-1282" name="line-1282"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary_markup</span><span class="p">);</span> +<a id="line-1283" name="line-1283"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">secondary_markup</span><span class="p">);</span> +<a id="line-1284" name="line-1284"></a><span class="p">}</span> +<a id="line-1285" name="line-1285"></a> +<a id="line-1286" name="line-1286"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1287" name="line-1287"></a><span class="nf">message_area_response_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkInfoBar</span><span class="w"> </span><span class="o">*</span><span class="n">message_area</span><span class="p">,</span> +<a id="line-1288" name="line-1288"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">response_id</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1289" name="line-1289"></a><span class="p">{</span> +<a id="line-1290" name="line-1290"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">message_area</span><span class="p">));</span> +<a id="line-1291" name="line-1291"></a> +<a id="line-1292" name="line-1292"></a><span class="w"> </span><span class="n">g_signal_handlers_disconnect_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">message_area</span><span class="p">,</span> +<a id="line-1293" name="line-1293"></a><span class="w"> </span><span class="n">message_area_response_cb</span><span class="p">,</span> +<a id="line-1294" name="line-1294"></a><span class="w"> </span><span class="n">user_data</span><span class="p">);</span> +<a id="line-1295" name="line-1295"></a><span class="p">}</span> +<a id="line-1296" name="line-1296"></a> +<a id="line-1297" name="line-1297"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1298" name="line-1298"></a><span class="nf">logview_window_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-1299" name="line-1299"></a><span class="p">{</span> +<a id="line-1300" name="line-1300"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LOGVIEW_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-1301" name="line-1301"></a> +<a id="line-1302" name="line-1302"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">read_cancellable</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1303" name="line-1303"></a><span class="w"> </span><span class="n">g_cancellable_cancel</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">read_cancellable</span><span class="p">);</span> +<a id="line-1304" name="line-1304"></a><span class="w"> </span><span class="n">g_clear_object</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">read_cancellable</span><span class="p">);</span> +<a id="line-1305" name="line-1305"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1306" name="line-1306"></a> +<a id="line-1307" name="line-1307"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">);</span> +<a id="line-1308" name="line-1308"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">logview_window_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-1309" name="line-1309"></a><span class="p">}</span> +<a id="line-1310" name="line-1310"></a> +<a id="line-1311" name="line-1311"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1312" name="line-1312"></a><span class="nf">logview_window_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">)</span> +<a id="line-1313" name="line-1313"></a><span class="p">{</span> +<a id="line-1314" name="line-1314"></a><span class="w"> </span><span class="n">GActionGroup</span><span class="w"> </span><span class="o">*</span><span class="n">action_group</span><span class="p">;</span> +<a id="line-1315" name="line-1315"></a><span class="w"> </span><span class="n">GtkAccelGroup</span><span class="w"> </span><span class="o">*</span><span class="n">accel_group</span><span class="p">;</span> +<a id="line-1316" name="line-1316"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1317" name="line-1317"></a><span class="hll"><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hpaned</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">main_view</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">vbox</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'item' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'item' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1318" name="line-1318"></a><span class="w"> </span><span class="n">PangoContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-1319" name="line-1319"></a><span class="w"> </span><span class="n">PangoFontDescription</span><span class="w"> </span><span class="o">*</span><span class="n">fontdesc</span><span class="p">;</span> +<a id="line-1320" name="line-1320"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">monospace_font_name</span><span class="p">;</span> +<a id="line-1321" name="line-1321"></a><span class="w"> </span><span class="n">LogviewWindowPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1322" name="line-1322"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-1323" name="line-1323"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-1324" name="line-1324"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-1325" name="line-1325"></a> +<a id="line-1326" name="line-1326"></a><span class="w"> </span><span class="n">GtkStyleContext</span><span class="w"> </span><span class="o">*</span><span class="n">s_context</span><span class="p">;</span> +<a id="line-1327" name="line-1327"></a> +<a id="line-1328" name="line-1328"></a><span class="w"> </span><span class="n">s_context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_style_context</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">));</span> +<a id="line-1329" name="line-1329"></a><span class="w"> </span><span class="n">gtk_style_context_add_class</span><span class="w"> </span><span class="p">(</span><span class="n">s_context</span><span class="p">,</span><span class="w"> </span><span class="s">"logview-window"</span><span class="p">);</span> +<a id="line-1330" name="line-1330"></a> +<a id="line-1331" name="line-1331"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_window_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">);</span> +<a id="line-1332" name="line-1332"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get</span><span class="w"> </span><span class="p">();</span> +<a id="line-1333" name="line-1333"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_manager_get</span><span class="w"> </span><span class="p">();</span> +<a id="line-1334" name="line-1334"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">monitor_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1335" name="line-1335"></a> +<a id="line-1336" name="line-1336"></a><span class="w"> </span><span class="n">logview_prefs_get_stored_window_size</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">height</span><span class="p">);</span> +<a id="line-1337" name="line-1337"></a><span class="w"> </span><span class="n">gtk_window_set_default_size</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">),</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">);</span> +<a id="line-1338" name="line-1338"></a> +<a id="line-1339" name="line-1339"></a><span class="w"> </span><span class="n">vbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1340" name="line-1340"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">),</span><span class="w"> </span><span class="n">vbox</span><span class="p">);</span> +<a id="line-1341" name="line-1341"></a> +<a id="line-1342" name="line-1342"></a><span class="w"> </span><span class="cm">/* create menus */</span> +<a id="line-1343" name="line-1343"></a><span class="w"> </span><span class="n">action_group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GActionGroup</span><span class="o">*</span><span class="p">)</span><span class="n">g_simple_action_group_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1344" name="line-1344"></a><span class="w"> </span><span class="n">g_action_map_add_action_entries</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION_MAP</span><span class="w"> </span><span class="p">(</span><span class="n">action_group</span><span class="p">),</span> +<a id="line-1345" name="line-1345"></a><span class="w"> </span><span class="n">win_entries</span><span class="p">,</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">win_entries</span><span class="p">),</span> +<a id="line-1346" name="line-1346"></a><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1347" name="line-1347"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">action_group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">action_group</span><span class="p">;</span> +<a id="line-1348" name="line-1348"></a> +<a id="line-1349" name="line-1349"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">ui_manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_builder_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1350" name="line-1350"></a> +<a id="line-1351" name="line-1351"></a><span class="w"> </span><span class="n">gtk_widget_insert_action_group</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">),</span><span class="w"> </span><span class="s">"win"</span><span class="p">,</span><span class="w"> </span><span class="n">action_group</span><span class="p">);</span> +<a id="line-1352" name="line-1352"></a><span class="w"> </span><span class="n">accel_group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_accel_group_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1353" name="line-1353"></a><span class="w"> </span><span class="n">gtk_window_add_accel_group</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">),</span><span class="w"> </span><span class="n">accel_group</span><span class="p">);</span> +<a id="line-1354" name="line-1354"></a> +<a id="line-1355" name="line-1355"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_builder_add_from_resource</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">,</span> +<a id="line-1356" name="line-1356"></a><span class="w"> </span><span class="s">"/org/mate/system-log/logview-toolbar.xml"</span><span class="p">,</span> +<a id="line-1357" name="line-1357"></a><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-1358" name="line-1358"></a> +<a id="line-1359" name="line-1359"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">FALSE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1360" name="line-1360"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">ui_manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1361" name="line-1361"></a><span class="w"> </span><span class="n">g_critical</span><span class="w"> </span><span class="p">(</span><span class="s">"Can't load the UI description: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1362" name="line-1362"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-1363" name="line-1363"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1364" name="line-1364"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1365" name="line-1365"></a> +<a id="line-1366" name="line-1366"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">gtk_builder_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">,</span><span class="w"> </span><span class="s">"logmenubar"</span><span class="p">);</span> +<a id="line-1367" name="line-1367"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1368" name="line-1368"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">);</span> +<a id="line-1369" name="line-1369"></a> +<a id="line-1370" name="line-1370"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">menu_keybindings</span><span class="p">);</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-1371" name="line-1371"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1372" name="line-1372"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="o">*</span><span class="p">)</span><span class="n">gtk_builder_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">,</span><span class="w"> </span><span class="n">menu_keybindings</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">widget_id</span><span class="p">);</span> +<a id="line-1373" name="line-1373"></a><span class="w"> </span><span class="n">gtk_widget_add_accelerator</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span><span class="w"> </span><span class="n">accel_group</span><span class="p">,</span> +<a id="line-1374" name="line-1374"></a><span class="w"> </span><span class="n">menu_keybindings</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">keyval</span><span class="p">,</span> +<a id="line-1375" name="line-1375"></a><span class="w"> </span><span class="n">menu_keybindings</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">modifier</span><span class="p">,</span> +<a id="line-1376" name="line-1376"></a><span class="w"> </span><span class="n">GTK_ACCEL_VISIBLE</span><span class="p">);</span> +<a id="line-1377" name="line-1377"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1378" name="line-1378"></a><span class="w"> </span><span class="cm">/* panes */</span> +<a id="line-1379" name="line-1379"></a><span class="w"> </span><span class="n">hpaned</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_paned_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">);</span> +<a id="line-1380" name="line-1380"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">hpaned</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1381" name="line-1381"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hpaned</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hpaned</span><span class="p">;</span> +<a id="line-1382" name="line-1382"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">hpaned</span><span class="p">);</span> +<a id="line-1383" name="line-1383"></a> +<a id="line-1384" name="line-1384"></a><span class="w"> </span><span class="cm">/* first pane : sidebar (list of logs) */</span> +<a id="line-1385" name="line-1385"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">sidebar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1386" name="line-1386"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">sidebar</span><span class="p">);</span> +<a id="line-1387" name="line-1387"></a> +<a id="line-1388" name="line-1388"></a><span class="w"> </span><span class="cm">/* first pane: log list */</span> +<a id="line-1389" name="line-1389"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_scrolled_window_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1390" name="line-1390"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_policy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">),</span> +<a id="line-1391" name="line-1391"></a><span class="w"> </span><span class="n">GTK_POLICY_NEVER</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">);</span> +<a id="line-1392" name="line-1392"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_shadow_type</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">),</span> +<a id="line-1393" name="line-1393"></a><span class="w"> </span><span class="n">GTK_SHADOW_ETCHED_IN</span><span class="p">);</span> +<a id="line-1394" name="line-1394"></a> +<a id="line-1395" name="line-1395"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">loglist</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_loglist_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1396" name="line-1396"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">loglist</span><span class="p">);</span> +<a id="line-1397" name="line-1397"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1398" name="line-1398"></a><span class="w"> </span><span class="n">gtk_paned_pack1</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_PANED</span><span class="w"> </span><span class="p">(</span><span class="n">hpaned</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">sidebar</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1399" name="line-1399"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">);</span> +<a id="line-1400" name="line-1400"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loglist</span><span class="p">);</span> +<a id="line-1401" name="line-1401"></a> +<a id="line-1402" name="line-1402"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loglist</span><span class="p">,</span><span class="w"> </span><span class="s">"day_selected"</span><span class="p">,</span> +<a id="line-1403" name="line-1403"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">loglist_day_selected_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1404" name="line-1404"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loglist</span><span class="p">,</span><span class="w"> </span><span class="s">"day_cleared"</span><span class="p">,</span> +<a id="line-1405" name="line-1405"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">loglist_day_cleared_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1406" name="line-1406"></a> +<a id="line-1407" name="line-1407"></a><span class="w"> </span><span class="cm">/* second pane: log */</span> +<a id="line-1408" name="line-1408"></a><span class="w"> </span><span class="n">main_view</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1409" name="line-1409"></a><span class="w"> </span><span class="n">gtk_paned_pack2</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_PANED</span><span class="w"> </span><span class="p">(</span><span class="n">hpaned</span><span class="p">),</span><span class="w"> </span><span class="n">main_view</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1410" name="line-1410"></a> +<a id="line-1411" name="line-1411"></a><span class="w"> </span><span class="cm">/* second pane: error message area */</span> +<a id="line-1412" name="line-1412"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">message_area</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_info_bar_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1413" name="line-1413"></a><span class="w"> </span><span class="n">message_area_create_error_box</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">message_area</span><span class="p">);</span> +<a id="line-1414" name="line-1414"></a><span class="w"> </span><span class="n">gtk_info_bar_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_INFO_BAR</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">message_area</span><span class="p">),</span> +<a id="line-1415" name="line-1415"></a><span class="w"> </span><span class="s">"gtk-close"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_CLOSE</span><span class="p">);</span> +<a id="line-1416" name="line-1416"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">main_view</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">message_area</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1417" name="line-1417"></a> +<a id="line-1418" name="line-1418"></a><span class="w"> </span><span class="cm">/* second pane: text view */</span> +<a id="line-1419" name="line-1419"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_scrolled_window_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1420" name="line-1420"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_policy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">),</span> +<a id="line-1421" name="line-1421"></a><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">);</span> +<a id="line-1422" name="line-1422"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_shadow_type</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_SHADOW_IN</span><span class="p">);</span> +<a id="line-1423" name="line-1423"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">main_view</span><span class="p">),</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1424" name="line-1424"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">);</span> +<a id="line-1425" name="line-1425"></a> +<a id="line-1426" name="line-1426"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">tag_table</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_tag_table_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1427" name="line-1427"></a><span class="w"> </span><span class="n">populate_tag_table</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">tag_table</span><span class="p">);</span> +<a id="line-1428" name="line-1428"></a> +<a id="line-1429" name="line-1429"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1430" name="line-1430"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">,</span><span class="w"> </span><span class="s">"editable"</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1431" name="line-1431"></a><span class="w"> </span><span class="n">populate_style_tag_table</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">);</span> +<a id="line-1432" name="line-1432"></a> +<a id="line-1433" name="line-1433"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">);</span> +<a id="line-1434" name="line-1434"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">);</span> +<a id="line-1435" name="line-1435"></a> +<a id="line-1436" name="line-1436"></a><span class="w"> </span><span class="cm">/* use the desktop monospace font */</span> +<a id="line-1437" name="line-1437"></a><span class="w"> </span><span class="n">monospace_font_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_monospace_font_name</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">);</span> +<a id="line-1438" name="line-1438"></a><span class="w"> </span><span class="n">logview_set_font</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">monospace_font_name</span><span class="p">);</span> +<a id="line-1439" name="line-1439"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">monospace_font_name</span><span class="p">);</span> +<a id="line-1440" name="line-1440"></a> +<a id="line-1441" name="line-1441"></a><span class="w"> </span><span class="cm">/* remember the original font size */</span> +<a id="line-1442" name="line-1442"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_pango_context</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">);</span> +<a id="line-1443" name="line-1443"></a><span class="w"> </span><span class="n">fontdesc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pango_context_get_font_description</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-1444" name="line-1444"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">original_fontsize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pango_font_description_get_size</span><span class="w"> </span><span class="p">(</span><span class="n">fontdesc</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">PANGO_SCALE</span><span class="p">;</span> +<a id="line-1445" name="line-1445"></a> +<a id="line-1446" name="line-1446"></a><span class="w"> </span><span class="cm">/* restore saved zoom */</span> +<a id="line-1447" name="line-1447"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">fontsize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_prefs_get_stored_fontsize</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">);</span> +<a id="line-1448" name="line-1448"></a> +<a id="line-1449" name="line-1449"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">fontsize</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1450" name="line-1450"></a><span class="w"> </span><span class="cm">/* restore the default */</span> +<a id="line-1451" name="line-1451"></a><span class="w"> </span><span class="n">logview_normal_text</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1452" name="line-1452"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1453" name="line-1453"></a><span class="w"> </span><span class="n">logview_set_fontsize</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1454" name="line-1454"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1455" name="line-1455"></a> +<a id="line-1456" name="line-1456"></a><span class="w"> </span><span class="cm">/* version selector */</span> +<a id="line-1457" name="line-1457"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">version_bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1458" name="line-1458"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">version_bar</span><span class="p">),</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span> +<a id="line-1459" name="line-1459"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">version_selector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_combo_box_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1460" name="line-1460"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">version_selector</span><span class="p">,</span><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span> +<a id="line-1461" name="line-1461"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">logview_version_selector_changed</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1462" name="line-1462"></a><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Version: "</span><span class="p">));</span> +<a id="line-1463" name="line-1463"></a> +<a id="line-1464" name="line-1464"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">version_bar</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">version_selector</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1465" name="line-1465"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">version_bar</span><span class="p">),</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1466" name="line-1466"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">main_view</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">version_bar</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1467" name="line-1467"></a> +<a id="line-1468" name="line-1468"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_findbar_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1469" name="line-1469"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">main_view</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1470" name="line-1470"></a> +<a id="line-1471" name="line-1471"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">,</span><span class="w"> </span><span class="s">"previous"</span><span class="p">,</span> +<a id="line-1472" name="line-1472"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">findbar_previous_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1473" name="line-1473"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">,</span><span class="w"> </span><span class="s">"next"</span><span class="p">,</span> +<a id="line-1474" name="line-1474"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">findbar_next_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1475" name="line-1475"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">,</span><span class="w"> </span><span class="s">"text_changed"</span><span class="p">,</span> +<a id="line-1476" name="line-1476"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">findbar_text_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1477" name="line-1477"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_bar</span><span class="p">,</span><span class="w"> </span><span class="s">"close"</span><span class="p">,</span> +<a id="line-1478" name="line-1478"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">findbar_close_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1479" name="line-1479"></a> +<a id="line-1480" name="line-1480"></a><span class="w"> </span><span class="cm">/* signal handlers</span> +<a id="line-1481" name="line-1481"></a><span class="cm"> * - first is used to remember/restore the window size on quit.</span> +<a id="line-1482" name="line-1482"></a><span class="cm"> */</span> +<a id="line-1483" name="line-1483"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="s">"configure_event"</span><span class="p">,</span> +<a id="line-1484" name="line-1484"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">window_size_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1485" name="line-1485"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">prefs</span><span class="p">,</span><span class="w"> </span><span class="s">"system-font-changed"</span><span class="p">,</span> +<a id="line-1486" name="line-1486"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">font_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1487" name="line-1487"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">manager</span><span class="p">,</span><span class="w"> </span><span class="s">"active-changed"</span><span class="p">,</span> +<a id="line-1488" name="line-1488"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">active_log_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1489" name="line-1489"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">,</span><span class="w"> </span><span class="s">"key-press-event"</span><span class="p">,</span> +<a id="line-1490" name="line-1490"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">key_press_event_cb</span><span class="p">),</span><span class="w"> </span><span class="n">logview</span><span class="p">);</span> +<a id="line-1491" name="line-1491"></a> +<a id="line-1492" name="line-1492"></a><span class="w"> </span><span class="cm">/* status area at bottom */</span> +<a id="line-1493" name="line-1493"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_statusbar_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1494" name="line-1494"></a><span class="w"> </span><span class="n">gtk_widget_set_margin_top</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1495" name="line-1495"></a><span class="w"> </span><span class="n">gtk_widget_set_margin_bottom</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1496" name="line-1496"></a> +<a id="line-1497" name="line-1497"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1498" name="line-1498"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">statusbar</span><span class="p">);</span> +<a id="line-1499" name="line-1499"></a> +<a id="line-1500" name="line-1500"></a><span class="w"> </span><span class="cm">/* Filter menu */</span> +<a id="line-1501" name="line-1501"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">filter_action_group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GActionGroup</span><span class="o">*</span><span class="p">)</span><span class="n">g_simple_action_group_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1502" name="line-1502"></a><span class="w"> </span><span class="n">gtk_widget_insert_action_group</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">),</span><span class="w"> </span><span class="s">"filter"</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">filter_action_group</span><span class="p">);</span> +<a id="line-1503" name="line-1503"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">active_filters</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1504" name="line-1504"></a><span class="w"> </span><span class="n">update_filter_menu</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">);</span> +<a id="line-1505" name="line-1505"></a> +<a id="line-1506" name="line-1506"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">);</span> +<a id="line-1507" name="line-1507"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">main_view</span><span class="p">);</span> +<a id="line-1508" name="line-1508"></a><span class="p">}</span> +<a id="line-1509" name="line-1509"></a> +<a id="line-1510" name="line-1510"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1511" name="line-1511"></a><span class="nf">logview_window_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindowClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-1512" name="line-1512"></a><span class="p">{</span> +<a id="line-1513" name="line-1513"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">object_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">klass</span><span class="p">;</span> +<a id="line-1514" name="line-1514"></a> +<a id="line-1515" name="line-1515"></a><span class="w"> </span><span class="n">object_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">logview_window_finalize</span><span class="p">;</span> +<a id="line-1516" name="line-1516"></a><span class="p">}</span> +<a id="line-1517" name="line-1517"></a> +<a id="line-1518" name="line-1518"></a><span class="cm">/* public methods */</span> +<a id="line-1519" name="line-1519"></a> +<a id="line-1520" name="line-1520"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-1521" name="line-1521"></a><span class="nf">logview_window_new</span><span class="w"> </span><span class="p">()</span> +<a id="line-1522" name="line-1522"></a><span class="p">{</span> +<a id="line-1523" name="line-1523"></a><span class="w"> </span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">logview</span><span class="p">;</span> +<a id="line-1524" name="line-1524"></a> +<a id="line-1525" name="line-1525"></a><span class="w"> </span><span class="n">logview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_TYPE_WINDOW</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1526" name="line-1526"></a> +<a id="line-1527" name="line-1527"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">ui_manager</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1528" name="line-1528"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1529" name="line-1529"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1530" name="line-1530"></a> +<a id="line-1531" name="line-1531"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">logview</span><span class="p">);</span> +<a id="line-1532" name="line-1532"></a><span class="p">}</span> +<a id="line-1533" name="line-1533"></a> +<a id="line-1534" name="line-1534"></a><span class="kt">void</span> +<a id="line-1535" name="line-1535"></a><span class="nf">logview_window_add_error</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-1536" name="line-1536"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">primary</span><span class="p">,</span> +<a id="line-1537" name="line-1537"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">secondary</span><span class="p">)</span> +<a id="line-1538" name="line-1538"></a><span class="p">{</span> +<a id="line-1539" name="line-1539"></a><span class="w"> </span><span class="n">LogviewWindowPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1540" name="line-1540"></a> +<a id="line-1541" name="line-1541"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1542" name="line-1542"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1543" name="line-1543"></a> +<a id="line-1544" name="line-1544"></a><span class="w"> </span><span class="n">message_area_set_labels</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span> +<a id="line-1545" name="line-1545"></a><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="n">secondary</span><span class="p">);</span> +<a id="line-1546" name="line-1546"></a> +<a id="line-1547" name="line-1547"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">message_area</span><span class="p">);</span> +<a id="line-1548" name="line-1548"></a> +<a id="line-1549" name="line-1549"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">message_area</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-1550" name="line-1550"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">message_area_response_cb</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1551" name="line-1551"></a><span class="p">}</span> +<a id="line-1552" name="line-1552"></a> +<a id="line-1553" name="line-1553"></a><span class="kt">void</span> +<a id="line-1554" name="line-1554"></a><span class="nf">logview_window_add_errors</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-1555" name="line-1555"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">errors</span><span class="p">)</span> +<a id="line-1556" name="line-1556"></a><span class="p">{</span> +<a id="line-1557" name="line-1557"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">secondary</span><span class="p">;</span> +<a id="line-1558" name="line-1558"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">;</span> +<a id="line-1559" name="line-1559"></a><span class="hll"><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">err</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'err' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'err' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1560" name="line-1560"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-1561" name="line-1561"></a> +<a id="line-1562" name="line-1562"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">LOGVIEW_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1563" name="line-1563"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">errors</span><span class="o">-></span><span class="n">len</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1564" name="line-1564"></a> +<a id="line-1565" name="line-1565"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not open the following files:"</span><span class="p">));</span> +<a id="line-1566" name="line-1566"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1567" name="line-1567"></a> +<a id="line-1568" name="line-1568"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">errors</span><span class="o">-></span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1569" name="line-1569"></a><span class="w"> </span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">g_ptr_array_index</span><span class="w"> </span><span class="p">(</span><span class="n">errors</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span> +<a id="line-1570" name="line-1570"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span> +<a id="line-1571" name="line-1571"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">": "</span><span class="p">);</span> +<a id="line-1572" name="line-1572"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span> +<a id="line-1573" name="line-1573"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> +<a id="line-1574" name="line-1574"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1575" name="line-1575"></a> +<a id="line-1576" name="line-1576"></a><span class="w"> </span><span class="n">secondary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1577" name="line-1577"></a> +<a id="line-1578" name="line-1578"></a><span class="w"> </span><span class="n">message_area_set_labels</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">primary</span><span class="p">,</span><span class="w"> </span><span class="n">secondary</span><span class="p">);</span> +<a id="line-1579" name="line-1579"></a> +<a id="line-1580" name="line-1580"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">message_area</span><span class="p">);</span> +<a id="line-1581" name="line-1581"></a> +<a id="line-1582" name="line-1582"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">message_area</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-1583" name="line-1583"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">message_area_response_cb</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1584" name="line-1584"></a> +<a id="line-1585" name="line-1585"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-1586" name="line-1586"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">secondary</span><span class="p">);</span> +<a id="line-1587" name="line-1587"></a><span class="p">}</span> +<a id="line-1588" name="line-1588"></a> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/26.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/26.html new file mode 100644 index 00000000..59ad7c76 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/26.html @@ -0,0 +1,479 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: logview/src/tests/test-reader.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> test-reader.c</p> +<a href="26.html#line-37"> unusedVariable 37</a><a href="26.html#line-38"> variableScope 38</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* This file is part of MATE Utils.</span> +<a id="line-2" name="line-2"></a><span class="cm"> *</span> +<a id="line-3" name="line-3"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-4" name="line-4"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-5" name="line-5"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-6" name="line-6"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-7" name="line-7"></a><span class="cm"> *</span> +<a id="line-8" name="line-8"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-9" name="line-9"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-10" name="line-10"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-11" name="line-11"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-12" name="line-12"></a><span class="cm"> *</span> +<a id="line-13" name="line-13"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-14" name="line-14"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-15" name="line-15"></a><span class="cm"> */</span> +<a id="line-16" name="line-16"></a> +<a id="line-17" name="line-17"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-18" name="line-18"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-19" name="line-19"></a><span class="cp">#endif</span> +<a id="line-20" name="line-20"></a> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"../logview-log.h"</span> +<a id="line-22" name="line-22"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"../logview-utils.h"</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-26" name="line-26"></a> +<a id="line-27" name="line-27"></a><span class="k">static</span><span class="w"> </span><span class="n">GMainLoop</span><span class="w"> </span><span class="o">*</span><span class="n">loop</span><span class="p">;</span> +<a id="line-28" name="line-28"></a> +<a id="line-29" name="line-29"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-30" name="line-30"></a><span class="nf">new_lines_cb</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-31" name="line-31"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="p">,</span> +<a id="line-32" name="line-32"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">new_days</span><span class="p">,</span> +<a id="line-33" name="line-33"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">,</span> +<a id="line-34" name="line-34"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-35" name="line-35"></a><span class="p">{</span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-37" name="line-37"></a><span class="hll"><span class="w"> </span><span class="n">guint8</span><span class="w"> </span><span class="n">day</span><span class="p">;</span><span class="error2"><--- Unused variable: day</span> +</span><a id="line-38" name="line-38"></a><span class="hll"><span class="w"> </span><span class="n">Day</span><span class="w"> </span><span class="o">*</span><span class="n">day_s</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'day_s' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'day_s' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-39" name="line-39"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">days</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-42" name="line-42"></a><span class="w"> </span><span class="n">g_print</span><span class="w"> </span><span class="p">(</span><span class="s">"line %d: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">lines</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-43" name="line-43"></a><span class="w"> </span><span class="p">}</span> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="n">g_print</span><span class="w"> </span><span class="p">(</span><span class="s">"outside read, lines no %u</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">logview_log_get_cached_lines_number</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-45" name="line-45"></a> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="n">days</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">log_read_dates</span><span class="w"> </span><span class="p">(</span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="n">logview_log_get_timestamp</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">));</span> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="n">g_print</span><span class="w"> </span><span class="p">(</span><span class="s">"</span><span class="se">\n</span><span class="s">days %p</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">days</span><span class="p">);</span> +<a id="line-48" name="line-48"></a> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">days</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">day_s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">g_print</span><span class="w"> </span><span class="p">(</span><span class="s">"</span><span class="se">\n</span><span class="s">day %u month %u</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">g_date_get_day</span><span class="w"> </span><span class="p">(</span><span class="n">day_s</span><span class="o">-></span><span class="n">date</span><span class="p">),</span><span class="w"> </span><span class="n">g_date_get_month</span><span class="w"> </span><span class="p">(</span><span class="n">day_s</span><span class="o">-></span><span class="n">date</span><span class="p">));</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="p">}</span> +<a id="line-53" name="line-53"></a> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">);</span> +<a id="line-55" name="line-55"></a> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">g_main_loop_quit</span><span class="w"> </span><span class="p">(</span><span class="n">loop</span><span class="p">);</span> +<a id="line-57" name="line-57"></a><span class="p">}</span> +<a id="line-58" name="line-58"></a> +<a id="line-59" name="line-59"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-60" name="line-60"></a><span class="nf">callback</span><span class="w"> </span><span class="p">(</span><span class="n">LogviewLog</span><span class="w"> </span><span class="o">*</span><span class="n">log</span><span class="p">,</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">,</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-63" name="line-63"></a><span class="p">{</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">g_print</span><span class="w"> </span><span class="p">(</span><span class="s">"callback! err %p, log %p</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">log</span><span class="p">);</span> +<a id="line-65" name="line-65"></a> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">logview_log_read_new_lines</span><span class="w"> </span><span class="p">(</span><span class="n">log</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">new_lines_cb</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-67" name="line-67"></a><span class="p">}</span> +<a id="line-68" name="line-68"></a> +<a id="line-69" name="line-69"></a><span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">)</span> +<a id="line-70" name="line-70"></a><span class="p">{</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">log_filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">usage</span><span class="p">;</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">GOptionContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">GOptionEntry</span><span class="w"> </span><span class="n">entries</span><span class="w"> </span><span class="p">[]</span><span class="w"> </span><span class="o">=</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"file"</span><span class="p">,</span><span class="w"> </span><span class="sc">'f'</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_FILENAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">log_filename</span><span class="p">,</span><span class="w"> </span><span class="s">"The log file, e.g. /var/log/dpkg.log.2.gz"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">};</span> +<a id="line-78" name="line-78"></a> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_option_context_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">g_option_context_add_main_entries</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">entries</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-81" name="line-81"></a> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_option_context_parse</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">g_printerr</span><span class="w"> </span><span class="p">(</span><span class="s">"%s</span><span class="se">\n\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="p">}</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">arg_error</span><span class="p">;</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="p">}</span> +<a id="line-89" name="line-89"></a> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">log_filename</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="n">g_printerr</span><span class="w"> </span><span class="p">(</span><span class="s">"ERROR: You must specify the log file.</span><span class="se">\n\n</span><span class="s">"</span><span class="p">);</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">arg_error</span><span class="p">;</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="p">}</span> +<a id="line-94" name="line-94"></a> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">g_option_context_free</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-96" name="line-96"></a> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">loop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_main_loop_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">logview_log_create</span><span class="w"> </span><span class="p">(</span><span class="n">log_filename</span><span class="p">,</span><span class="w"> </span><span class="n">callback</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-99" name="line-99"></a> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">g_main_loop_run</span><span class="w"> </span><span class="p">(</span><span class="n">loop</span><span class="p">);</span> +<a id="line-101" name="line-101"></a> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">g_main_loop_unref</span><span class="w"> </span><span class="p">(</span><span class="n">loop</span><span class="p">);</span> +<a id="line-103" name="line-103"></a> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">log_filename</span><span class="p">);</span> +<a id="line-105" name="line-105"></a> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-107" name="line-107"></a> +<a id="line-108" name="line-108"></a><span class="nl">arg_error</span><span class="p">:</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">usage</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_option_context_get_help</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">g_printerr</span><span class="w"> </span><span class="p">(</span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">usage</span><span class="p">);</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">usage</span><span class="p">);</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">g_option_context_free</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-113" name="line-113"></a> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-115" name="line-115"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/27.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/27.html new file mode 100644 index 00000000..6c720716 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/27.html @@ -0,0 +1,4543 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-dictionary/libgdict/gdict-client-context.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gdict-client-context.c</p> +<a href="27.html#line-196"> unknownMacro 196</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span> +<span class="normal">1328</span> +<span class="normal">1329</span> +<span class="normal">1330</span> +<span class="normal">1331</span> +<span class="normal">1332</span> +<span class="normal">1333</span> +<span class="normal">1334</span> +<span class="normal">1335</span> +<span class="normal">1336</span> +<span class="normal">1337</span> +<span class="normal">1338</span> +<span class="normal">1339</span> +<span class="normal">1340</span> +<span class="normal">1341</span> +<span class="normal">1342</span> +<span class="normal">1343</span> +<span class="normal">1344</span> +<span class="normal">1345</span> +<span class="normal">1346</span> +<span class="normal">1347</span> +<span class="normal">1348</span> +<span class="normal">1349</span> +<span class="normal">1350</span> +<span class="normal">1351</span> +<span class="normal">1352</span> +<span class="normal">1353</span> +<span class="normal">1354</span> +<span class="normal">1355</span> +<span class="normal">1356</span> +<span class="normal">1357</span> +<span class="normal">1358</span> +<span class="normal">1359</span> +<span class="normal">1360</span> +<span class="normal">1361</span> +<span class="normal">1362</span> +<span class="normal">1363</span> +<span class="normal">1364</span> +<span class="normal">1365</span> +<span class="normal">1366</span> +<span class="normal">1367</span> +<span class="normal">1368</span> +<span class="normal">1369</span> +<span class="normal">1370</span> +<span class="normal">1371</span> +<span class="normal">1372</span> +<span class="normal">1373</span> +<span class="normal">1374</span> +<span class="normal">1375</span> +<span class="normal">1376</span> +<span class="normal">1377</span> +<span class="normal">1378</span> +<span class="normal">1379</span> +<span class="normal">1380</span> +<span class="normal">1381</span> +<span class="normal">1382</span> +<span class="normal">1383</span> +<span class="normal">1384</span> +<span class="normal">1385</span> +<span class="normal">1386</span> +<span class="normal">1387</span> +<span class="normal">1388</span> +<span class="normal">1389</span> +<span class="normal">1390</span> +<span class="normal">1391</span> +<span class="normal">1392</span> +<span class="normal">1393</span> +<span class="normal">1394</span> +<span class="normal">1395</span> +<span class="normal">1396</span> +<span class="normal">1397</span> +<span class="normal">1398</span> +<span class="normal">1399</span> +<span class="normal">1400</span> +<span class="normal">1401</span> +<span class="normal">1402</span> +<span class="normal">1403</span> +<span class="normal">1404</span> +<span class="normal">1405</span> +<span class="normal">1406</span> +<span class="normal">1407</span> +<span class="normal">1408</span> +<span class="normal">1409</span> +<span class="normal">1410</span> +<span class="normal">1411</span> +<span class="normal">1412</span> +<span class="normal">1413</span> +<span class="normal">1414</span> +<span class="normal">1415</span> +<span class="normal">1416</span> +<span class="normal">1417</span> +<span class="normal">1418</span> +<span class="normal">1419</span> +<span class="normal">1420</span> +<span class="normal">1421</span> +<span class="normal">1422</span> +<span class="normal">1423</span> +<span class="normal">1424</span> +<span class="normal">1425</span> +<span class="normal">1426</span> +<span class="normal">1427</span> +<span class="normal">1428</span> +<span class="normal">1429</span> +<span class="normal">1430</span> +<span class="normal">1431</span> +<span class="normal">1432</span> +<span class="normal">1433</span> +<span class="normal">1434</span> +<span class="normal">1435</span> +<span class="normal">1436</span> +<span class="normal">1437</span> +<span class="normal">1438</span> +<span class="normal">1439</span> +<span class="normal">1440</span> +<span class="normal">1441</span> +<span class="normal">1442</span> +<span class="normal">1443</span> +<span class="normal">1444</span> +<span class="normal">1445</span> +<span class="normal">1446</span> +<span class="normal">1447</span> +<span class="normal">1448</span> +<span class="normal">1449</span> +<span class="normal">1450</span> +<span class="normal">1451</span> +<span class="normal">1452</span> +<span class="normal">1453</span> +<span class="normal">1454</span> +<span class="normal">1455</span> +<span class="normal">1456</span> +<span class="normal">1457</span> +<span class="normal">1458</span> +<span class="normal">1459</span> +<span class="normal">1460</span> +<span class="normal">1461</span> +<span class="normal">1462</span> +<span class="normal">1463</span> +<span class="normal">1464</span> +<span class="normal">1465</span> +<span class="normal">1466</span> +<span class="normal">1467</span> +<span class="normal">1468</span> +<span class="normal">1469</span> +<span class="normal">1470</span> +<span class="normal">1471</span> +<span class="normal">1472</span> +<span class="normal">1473</span> +<span class="normal">1474</span> +<span class="normal">1475</span> +<span class="normal">1476</span> +<span class="normal">1477</span> +<span class="normal">1478</span> +<span class="normal">1479</span> +<span class="normal">1480</span> +<span class="normal">1481</span> +<span class="normal">1482</span> +<span class="normal">1483</span> +<span class="normal">1484</span> +<span class="normal">1485</span> +<span class="normal">1486</span> +<span class="normal">1487</span> +<span class="normal">1488</span> +<span class="normal">1489</span> +<span class="normal">1490</span> +<span class="normal">1491</span> +<span class="normal">1492</span> +<span class="normal">1493</span> +<span class="normal">1494</span> +<span class="normal">1495</span> +<span class="normal">1496</span> +<span class="normal">1497</span> +<span class="normal">1498</span> +<span class="normal">1499</span> +<span class="normal">1500</span> +<span class="normal">1501</span> +<span class="normal">1502</span> +<span class="normal">1503</span> +<span class="normal">1504</span> +<span class="normal">1505</span> +<span class="normal">1506</span> +<span class="normal">1507</span> +<span class="normal">1508</span> +<span class="normal">1509</span> +<span class="normal">1510</span> +<span class="normal">1511</span> +<span class="normal">1512</span> +<span class="normal">1513</span> +<span class="normal">1514</span> +<span class="normal">1515</span> +<span class="normal">1516</span> +<span class="normal">1517</span> +<span class="normal">1518</span> +<span class="normal">1519</span> +<span class="normal">1520</span> +<span class="normal">1521</span> +<span class="normal">1522</span> +<span class="normal">1523</span> +<span class="normal">1524</span> +<span class="normal">1525</span> +<span class="normal">1526</span> +<span class="normal">1527</span> +<span class="normal">1528</span> +<span class="normal">1529</span> +<span class="normal">1530</span> +<span class="normal">1531</span> +<span class="normal">1532</span> +<span class="normal">1533</span> +<span class="normal">1534</span> +<span class="normal">1535</span> +<span class="normal">1536</span> +<span class="normal">1537</span> +<span class="normal">1538</span> +<span class="normal">1539</span> +<span class="normal">1540</span> +<span class="normal">1541</span> +<span class="normal">1542</span> +<span class="normal">1543</span> +<span class="normal">1544</span> +<span class="normal">1545</span> +<span class="normal">1546</span> +<span class="normal">1547</span> +<span class="normal">1548</span> +<span class="normal">1549</span> +<span class="normal">1550</span> +<span class="normal">1551</span> +<span class="normal">1552</span> +<span class="normal">1553</span> +<span class="normal">1554</span> +<span class="normal">1555</span> +<span class="normal">1556</span> +<span class="normal">1557</span> +<span class="normal">1558</span> +<span class="normal">1559</span> +<span class="normal">1560</span> +<span class="normal">1561</span> +<span class="normal">1562</span> +<span class="normal">1563</span> +<span class="normal">1564</span> +<span class="normal">1565</span> +<span class="normal">1566</span> +<span class="normal">1567</span> +<span class="normal">1568</span> +<span class="normal">1569</span> +<span class="normal">1570</span> +<span class="normal">1571</span> +<span class="normal">1572</span> +<span class="normal">1573</span> +<span class="normal">1574</span> +<span class="normal">1575</span> +<span class="normal">1576</span> +<span class="normal">1577</span> +<span class="normal">1578</span> +<span class="normal">1579</span> +<span class="normal">1580</span> +<span class="normal">1581</span> +<span class="normal">1582</span> +<span class="normal">1583</span> +<span class="normal">1584</span> +<span class="normal">1585</span> +<span class="normal">1586</span> +<span class="normal">1587</span> +<span class="normal">1588</span> +<span class="normal">1589</span> +<span class="normal">1590</span> +<span class="normal">1591</span> +<span class="normal">1592</span> +<span class="normal">1593</span> +<span class="normal">1594</span> +<span class="normal">1595</span> +<span class="normal">1596</span> +<span class="normal">1597</span> +<span class="normal">1598</span> +<span class="normal">1599</span> +<span class="normal">1600</span> +<span class="normal">1601</span> +<span class="normal">1602</span> +<span class="normal">1603</span> +<span class="normal">1604</span> +<span class="normal">1605</span> +<span class="normal">1606</span> +<span class="normal">1607</span> +<span class="normal">1608</span> +<span class="normal">1609</span> +<span class="normal">1610</span> +<span class="normal">1611</span> +<span class="normal">1612</span> +<span class="normal">1613</span> +<span class="normal">1614</span> +<span class="normal">1615</span> +<span class="normal">1616</span> +<span class="normal">1617</span> +<span class="normal">1618</span> +<span class="normal">1619</span> +<span class="normal">1620</span> +<span class="normal">1621</span> +<span class="normal">1622</span> +<span class="normal">1623</span> +<span class="normal">1624</span> +<span class="normal">1625</span> +<span class="normal">1626</span> +<span class="normal">1627</span> +<span class="normal">1628</span> +<span class="normal">1629</span> +<span class="normal">1630</span> +<span class="normal">1631</span> +<span class="normal">1632</span> +<span class="normal">1633</span> +<span class="normal">1634</span> +<span class="normal">1635</span> +<span class="normal">1636</span> +<span class="normal">1637</span> +<span class="normal">1638</span> +<span class="normal">1639</span> +<span class="normal">1640</span> +<span class="normal">1641</span> +<span class="normal">1642</span> +<span class="normal">1643</span> +<span class="normal">1644</span> +<span class="normal">1645</span> +<span class="normal">1646</span> +<span class="normal">1647</span> +<span class="normal">1648</span> +<span class="normal">1649</span> +<span class="normal">1650</span> +<span class="normal">1651</span> +<span class="normal">1652</span> +<span class="normal">1653</span> +<span class="normal">1654</span> +<span class="normal">1655</span> +<span class="normal">1656</span> +<span class="normal">1657</span> +<span class="normal">1658</span> +<span class="normal">1659</span> +<span class="normal">1660</span> +<span class="normal">1661</span> +<span class="normal">1662</span> +<span class="normal">1663</span> +<span class="normal">1664</span> +<span class="normal">1665</span> +<span class="normal">1666</span> +<span class="normal">1667</span> +<span class="normal">1668</span> +<span class="normal">1669</span> +<span class="normal">1670</span> +<span class="normal">1671</span> +<span class="normal">1672</span> +<span class="normal">1673</span> +<span class="normal">1674</span> +<span class="normal">1675</span> +<span class="normal">1676</span> +<span class="normal">1677</span> +<span class="normal">1678</span> +<span class="normal">1679</span> +<span class="normal">1680</span> +<span class="normal">1681</span> +<span class="normal">1682</span> +<span class="normal">1683</span> +<span class="normal">1684</span> +<span class="normal">1685</span> +<span class="normal">1686</span> +<span class="normal">1687</span> +<span class="normal">1688</span> +<span class="normal">1689</span> +<span class="normal">1690</span> +<span class="normal">1691</span> +<span class="normal">1692</span> +<span class="normal">1693</span> +<span class="normal">1694</span> +<span class="normal">1695</span> +<span class="normal">1696</span> +<span class="normal">1697</span> +<span class="normal">1698</span> +<span class="normal">1699</span> +<span class="normal">1700</span> +<span class="normal">1701</span> +<span class="normal">1702</span> +<span class="normal">1703</span> +<span class="normal">1704</span> +<span class="normal">1705</span> +<span class="normal">1706</span> +<span class="normal">1707</span> +<span class="normal">1708</span> +<span class="normal">1709</span> +<span class="normal">1710</span> +<span class="normal">1711</span> +<span class="normal">1712</span> +<span class="normal">1713</span> +<span class="normal">1714</span> +<span class="normal">1715</span> +<span class="normal">1716</span> +<span class="normal">1717</span> +<span class="normal">1718</span> +<span class="normal">1719</span> +<span class="normal">1720</span> +<span class="normal">1721</span> +<span class="normal">1722</span> +<span class="normal">1723</span> +<span class="normal">1724</span> +<span class="normal">1725</span> +<span class="normal">1726</span> +<span class="normal">1727</span> +<span class="normal">1728</span> +<span class="normal">1729</span> +<span class="normal">1730</span> +<span class="normal">1731</span> +<span class="normal">1732</span> +<span class="normal">1733</span> +<span class="normal">1734</span> +<span class="normal">1735</span> +<span class="normal">1736</span> +<span class="normal">1737</span> +<span class="normal">1738</span> +<span class="normal">1739</span> +<span class="normal">1740</span> +<span class="normal">1741</span> +<span class="normal">1742</span> +<span class="normal">1743</span> +<span class="normal">1744</span> +<span class="normal">1745</span> +<span class="normal">1746</span> +<span class="normal">1747</span> +<span class="normal">1748</span> +<span class="normal">1749</span> +<span class="normal">1750</span> +<span class="normal">1751</span> +<span class="normal">1752</span> +<span class="normal">1753</span> +<span class="normal">1754</span> +<span class="normal">1755</span> +<span class="normal">1756</span> +<span class="normal">1757</span> +<span class="normal">1758</span> +<span class="normal">1759</span> +<span class="normal">1760</span> +<span class="normal">1761</span> +<span class="normal">1762</span> +<span class="normal">1763</span> +<span class="normal">1764</span> +<span class="normal">1765</span> +<span class="normal">1766</span> +<span class="normal">1767</span> +<span class="normal">1768</span> +<span class="normal">1769</span> +<span class="normal">1770</span> +<span class="normal">1771</span> +<span class="normal">1772</span> +<span class="normal">1773</span> +<span class="normal">1774</span> +<span class="normal">1775</span> +<span class="normal">1776</span> +<span class="normal">1777</span> +<span class="normal">1778</span> +<span class="normal">1779</span> +<span class="normal">1780</span> +<span class="normal">1781</span> +<span class="normal">1782</span> +<span class="normal">1783</span> +<span class="normal">1784</span> +<span class="normal">1785</span> +<span class="normal">1786</span> +<span class="normal">1787</span> +<span class="normal">1788</span> +<span class="normal">1789</span> +<span class="normal">1790</span> +<span class="normal">1791</span> +<span class="normal">1792</span> +<span class="normal">1793</span> +<span class="normal">1794</span> +<span class="normal">1795</span> +<span class="normal">1796</span> +<span class="normal">1797</span> +<span class="normal">1798</span> +<span class="normal">1799</span> +<span class="normal">1800</span> +<span class="normal">1801</span> +<span class="normal">1802</span> +<span class="normal">1803</span> +<span class="normal">1804</span> +<span class="normal">1805</span> +<span class="normal">1806</span> +<span class="normal">1807</span> +<span class="normal">1808</span> +<span class="normal">1809</span> +<span class="normal">1810</span> +<span class="normal">1811</span> +<span class="normal">1812</span> +<span class="normal">1813</span> +<span class="normal">1814</span> +<span class="normal">1815</span> +<span class="normal">1816</span> +<span class="normal">1817</span> +<span class="normal">1818</span> +<span class="normal">1819</span> +<span class="normal">1820</span> +<span class="normal">1821</span> +<span class="normal">1822</span> +<span class="normal">1823</span> +<span class="normal">1824</span> +<span class="normal">1825</span> +<span class="normal">1826</span> +<span class="normal">1827</span> +<span class="normal">1828</span> +<span class="normal">1829</span> +<span class="normal">1830</span> +<span class="normal">1831</span> +<span class="normal">1832</span> +<span class="normal">1833</span> +<span class="normal">1834</span> +<span class="normal">1835</span> +<span class="normal">1836</span> +<span class="normal">1837</span> +<span class="normal">1838</span> +<span class="normal">1839</span> +<span class="normal">1840</span> +<span class="normal">1841</span> +<span class="normal">1842</span> +<span class="normal">1843</span> +<span class="normal">1844</span> +<span class="normal">1845</span> +<span class="normal">1846</span> +<span class="normal">1847</span> +<span class="normal">1848</span> +<span class="normal">1849</span> +<span class="normal">1850</span> +<span class="normal">1851</span> +<span class="normal">1852</span> +<span class="normal">1853</span> +<span class="normal">1854</span> +<span class="normal">1855</span> +<span class="normal">1856</span> +<span class="normal">1857</span> +<span class="normal">1858</span> +<span class="normal">1859</span> +<span class="normal">1860</span> +<span class="normal">1861</span> +<span class="normal">1862</span> +<span class="normal">1863</span> +<span class="normal">1864</span> +<span class="normal">1865</span> +<span class="normal">1866</span> +<span class="normal">1867</span> +<span class="normal">1868</span> +<span class="normal">1869</span> +<span class="normal">1870</span> +<span class="normal">1871</span> +<span class="normal">1872</span> +<span class="normal">1873</span> +<span class="normal">1874</span> +<span class="normal">1875</span> +<span class="normal">1876</span> +<span class="normal">1877</span> +<span class="normal">1878</span> +<span class="normal">1879</span> +<span class="normal">1880</span> +<span class="normal">1881</span> +<span class="normal">1882</span> +<span class="normal">1883</span> +<span class="normal">1884</span> +<span class="normal">1885</span> +<span class="normal">1886</span> +<span class="normal">1887</span> +<span class="normal">1888</span> +<span class="normal">1889</span> +<span class="normal">1890</span> +<span class="normal">1891</span> +<span class="normal">1892</span> +<span class="normal">1893</span> +<span class="normal">1894</span> +<span class="normal">1895</span> +<span class="normal">1896</span> +<span class="normal">1897</span> +<span class="normal">1898</span> +<span class="normal">1899</span> +<span class="normal">1900</span> +<span class="normal">1901</span> +<span class="normal">1902</span> +<span class="normal">1903</span> +<span class="normal">1904</span> +<span class="normal">1905</span> +<span class="normal">1906</span> +<span class="normal">1907</span> +<span class="normal">1908</span> +<span class="normal">1909</span> +<span class="normal">1910</span> +<span class="normal">1911</span> +<span class="normal">1912</span> +<span class="normal">1913</span> +<span class="normal">1914</span> +<span class="normal">1915</span> +<span class="normal">1916</span> +<span class="normal">1917</span> +<span class="normal">1918</span> +<span class="normal">1919</span> +<span class="normal">1920</span> +<span class="normal">1921</span> +<span class="normal">1922</span> +<span class="normal">1923</span> +<span class="normal">1924</span> +<span class="normal">1925</span> +<span class="normal">1926</span> +<span class="normal">1927</span> +<span class="normal">1928</span> +<span class="normal">1929</span> +<span class="normal">1930</span> +<span class="normal">1931</span> +<span class="normal">1932</span> +<span class="normal">1933</span> +<span class="normal">1934</span> +<span class="normal">1935</span> +<span class="normal">1936</span> +<span class="normal">1937</span> +<span class="normal">1938</span> +<span class="normal">1939</span> +<span class="normal">1940</span> +<span class="normal">1941</span> +<span class="normal">1942</span> +<span class="normal">1943</span> +<span class="normal">1944</span> +<span class="normal">1945</span> +<span class="normal">1946</span> +<span class="normal">1947</span> +<span class="normal">1948</span> +<span class="normal">1949</span> +<span class="normal">1950</span> +<span class="normal">1951</span> +<span class="normal">1952</span> +<span class="normal">1953</span> +<span class="normal">1954</span> +<span class="normal">1955</span> +<span class="normal">1956</span> +<span class="normal">1957</span> +<span class="normal">1958</span> +<span class="normal">1959</span> +<span class="normal">1960</span> +<span class="normal">1961</span> +<span class="normal">1962</span> +<span class="normal">1963</span> +<span class="normal">1964</span> +<span class="normal">1965</span> +<span class="normal">1966</span> +<span class="normal">1967</span> +<span class="normal">1968</span> +<span class="normal">1969</span> +<span class="normal">1970</span> +<span class="normal">1971</span> +<span class="normal">1972</span> +<span class="normal">1973</span> +<span class="normal">1974</span> +<span class="normal">1975</span> +<span class="normal">1976</span> +<span class="normal">1977</span> +<span class="normal">1978</span> +<span class="normal">1979</span> +<span class="normal">1980</span> +<span class="normal">1981</span> +<span class="normal">1982</span> +<span class="normal">1983</span> +<span class="normal">1984</span> +<span class="normal">1985</span> +<span class="normal">1986</span> +<span class="normal">1987</span> +<span class="normal">1988</span> +<span class="normal">1989</span> +<span class="normal">1990</span> +<span class="normal">1991</span> +<span class="normal">1992</span> +<span class="normal">1993</span> +<span class="normal">1994</span> +<span class="normal">1995</span> +<span class="normal">1996</span> +<span class="normal">1997</span> +<span class="normal">1998</span> +<span class="normal">1999</span> +<span class="normal">2000</span> +<span class="normal">2001</span> +<span class="normal">2002</span> +<span class="normal">2003</span> +<span class="normal">2004</span> +<span class="normal">2005</span> +<span class="normal">2006</span> +<span class="normal">2007</span> +<span class="normal">2008</span> +<span class="normal">2009</span> +<span class="normal">2010</span> +<span class="normal">2011</span> +<span class="normal">2012</span> +<span class="normal">2013</span> +<span class="normal">2014</span> +<span class="normal">2015</span> +<span class="normal">2016</span> +<span class="normal">2017</span> +<span class="normal">2018</span> +<span class="normal">2019</span> +<span class="normal">2020</span> +<span class="normal">2021</span> +<span class="normal">2022</span> +<span class="normal">2023</span> +<span class="normal">2024</span> +<span class="normal">2025</span> +<span class="normal">2026</span> +<span class="normal">2027</span> +<span class="normal">2028</span> +<span class="normal">2029</span> +<span class="normal">2030</span> +<span class="normal">2031</span> +<span class="normal">2032</span> +<span class="normal">2033</span> +<span class="normal">2034</span> +<span class="normal">2035</span> +<span class="normal">2036</span> +<span class="normal">2037</span> +<span class="normal">2038</span> +<span class="normal">2039</span> +<span class="normal">2040</span> +<span class="normal">2041</span> +<span class="normal">2042</span> +<span class="normal">2043</span> +<span class="normal">2044</span> +<span class="normal">2045</span> +<span class="normal">2046</span> +<span class="normal">2047</span> +<span class="normal">2048</span> +<span class="normal">2049</span> +<span class="normal">2050</span> +<span class="normal">2051</span> +<span class="normal">2052</span> +<span class="normal">2053</span> +<span class="normal">2054</span> +<span class="normal">2055</span> +<span class="normal">2056</span> +<span class="normal">2057</span> +<span class="normal">2058</span> +<span class="normal">2059</span> +<span class="normal">2060</span> +<span class="normal">2061</span> +<span class="normal">2062</span> +<span class="normal">2063</span> +<span class="normal">2064</span> +<span class="normal">2065</span> +<span class="normal">2066</span> +<span class="normal">2067</span> +<span class="normal">2068</span> +<span class="normal">2069</span> +<span class="normal">2070</span> +<span class="normal">2071</span> +<span class="normal">2072</span> +<span class="normal">2073</span> +<span class="normal">2074</span> +<span class="normal">2075</span> +<span class="normal">2076</span> +<span class="normal">2077</span> +<span class="normal">2078</span> +<span class="normal">2079</span> +<span class="normal">2080</span> +<span class="normal">2081</span> +<span class="normal">2082</span> +<span class="normal">2083</span> +<span class="normal">2084</span> +<span class="normal">2085</span> +<span class="normal">2086</span> +<span class="normal">2087</span> +<span class="normal">2088</span> +<span class="normal">2089</span> +<span class="normal">2090</span> +<span class="normal">2091</span> +<span class="normal">2092</span> +<span class="normal">2093</span> +<span class="normal">2094</span> +<span class="normal">2095</span> +<span class="normal">2096</span> +<span class="normal">2097</span> +<span class="normal">2098</span> +<span class="normal">2099</span> +<span class="normal">2100</span> +<span class="normal">2101</span> +<span class="normal">2102</span> +<span class="normal">2103</span> +<span class="normal">2104</span> +<span class="normal">2105</span> +<span class="normal">2106</span> +<span class="normal">2107</span> +<span class="normal">2108</span> +<span class="normal">2109</span> +<span class="normal">2110</span> +<span class="normal">2111</span> +<span class="normal">2112</span> +<span class="normal">2113</span> +<span class="normal">2114</span> +<span class="normal">2115</span> +<span class="normal">2116</span> +<span class="normal">2117</span> +<span class="normal">2118</span> +<span class="normal">2119</span> +<span class="normal">2120</span> +<span class="normal">2121</span> +<span class="normal">2122</span> +<span class="normal">2123</span> +<span class="normal">2124</span> +<span class="normal">2125</span> +<span class="normal">2126</span> +<span class="normal">2127</span> +<span class="normal">2128</span> +<span class="normal">2129</span> +<span class="normal">2130</span> +<span class="normal">2131</span> +<span class="normal">2132</span> +<span class="normal">2133</span> +<span class="normal">2134</span> +<span class="normal">2135</span> +<span class="normal">2136</span> +<span class="normal">2137</span> +<span class="normal">2138</span> +<span class="normal">2139</span> +<span class="normal">2140</span> +<span class="normal">2141</span> +<span class="normal">2142</span> +<span class="normal">2143</span> +<span class="normal">2144</span> +<span class="normal">2145</span> +<span class="normal">2146</span> +<span class="normal">2147</span> +<span class="normal">2148</span> +<span class="normal">2149</span> +<span class="normal">2150</span> +<span class="normal">2151</span> +<span class="normal">2152</span> +<span class="normal">2153</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2005 Emmanuele Bassi <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cm">/**</span> +<a id="line-21" name="line-21"></a><span class="cm"> * SECTION:gdict-client-context</span> +<a id="line-22" name="line-22"></a><span class="cm"> * @short_description: DICT client transport</span> +<a id="line-23" name="line-23"></a><span class="cm"> *</span> +<a id="line-24" name="line-24"></a><span class="cm"> * #GdictClientContext is an implementation of the #GdictContext interface.</span> +<a id="line-25" name="line-25"></a><span class="cm"> * It implements the Dictionary Protocol as defined by the RFC 2229 in order</span> +<a id="line-26" name="line-26"></a><span class="cm"> * to connect to a dictionary server.</span> +<a id="line-27" name="line-27"></a><span class="cm"> *</span> +<a id="line-28" name="line-28"></a><span class="cm"> * You should rarely instantiate this object directely: use an appropriate</span> +<a id="line-29" name="line-29"></a><span class="cm"> * #GdictSource instead.</span> +<a id="line-30" name="line-30"></a><span class="cm"> */</span> +<a id="line-31" name="line-31"></a> +<a id="line-32" name="line-32"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#endif</span> +<a id="line-35" name="line-35"></a> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><sys/types.h></span> +<a id="line-40" name="line-40"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><sys/socket.h></span> +<a id="line-41" name="line-41"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><netinet/in.h></span> +<a id="line-42" name="line-42"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><arpa/inet.h></span> +<a id="line-43" name="line-43"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><netdb.h></span> +<a id="line-44" name="line-44"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><fcntl.h></span> +<a id="line-45" name="line-45"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><errno.h></span> +<a id="line-46" name="line-46"></a><span class="cp">#ifdef HAVE_UNISTD_H</span> +<a id="line-47" name="line-47"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><unistd.h></span> +<a id="line-48" name="line-48"></a><span class="cp">#endif</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<a id="line-51" name="line-51"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n-lib.h></span> +<a id="line-52" name="line-52"></a> +<a id="line-53" name="line-53"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-context-private.h"</span> +<a id="line-54" name="line-54"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-context.h"</span> +<a id="line-55" name="line-55"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-client-context.h"</span> +<a id="line-56" name="line-56"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-enum-types.h"</span> +<a id="line-57" name="line-57"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-marshal.h"</span> +<a id="line-58" name="line-58"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-debug.h"</span> +<a id="line-59" name="line-59"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-utils.h"</span> +<a id="line-60" name="line-60"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-private.h"</span> +<a id="line-61" name="line-61"></a> +<a id="line-62" name="line-62"></a><span class="k">typedef</span><span class="w"> </span><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">CMD_CLIENT</span><span class="p">,</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">CMD_SHOW_DB</span><span class="p">,</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">CMD_SHOW_STRAT</span><span class="p">,</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">CMD_SHOW_INFO</span><span class="p">,</span><span class="w"> </span><span class="cm">/* not implemented */</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">CMD_SHOW_SERVER</span><span class="p">,</span><span class="w"> </span><span class="cm">/* not implemented */</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">CMD_MATCH</span><span class="p">,</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">CMD_DEFINE</span><span class="p">,</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">CMD_STATUS</span><span class="p">,</span><span class="w"> </span><span class="cm">/* not implemented */</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">CMD_OPTION_MIME</span><span class="p">,</span><span class="w"> </span><span class="cm">/* not implemented */</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">CMD_AUTH</span><span class="p">,</span><span class="w"> </span><span class="cm">/* not implemented */</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">CMD_HELP</span><span class="p">,</span><span class="w"> </span><span class="cm">/* not implemented */</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">CMD_QUIT</span><span class="p">,</span> +<a id="line-75" name="line-75"></a> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">CMD_INVALID</span> +<a id="line-77" name="line-77"></a><span class="p">}</span><span class="w"> </span><span class="n">GdictCommandType</span><span class="p">;</span> +<a id="line-78" name="line-78"></a><span class="cp">#define IS_VALID_CMD(cmd) (((cmd) >= CMD_CLIENT) || ((cmd) < CMD_INVALID))</span> +<a id="line-79" name="line-79"></a> +<a id="line-80" name="line-80"></a><span class="cm">/* command strings: keep synced with the enum above! */</span> +<a id="line-81" name="line-81"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">dict_command_strings</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="s">"CLIENT"</span><span class="p">,</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="s">"SHOW DB"</span><span class="p">,</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="s">"SHOW STRAT"</span><span class="p">,</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="s">"SHOW INFO"</span><span class="p">,</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="s">"SHOW SERVER"</span><span class="p">,</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="s">"MATCH"</span><span class="p">,</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="s">"DEFINE"</span><span class="p">,</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="s">"STATUS"</span><span class="p">,</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="s">"OPTION MIME"</span><span class="p">,</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="s">"AUTH"</span><span class="p">,</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="s">"HELP"</span><span class="p">,</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="s">"QUIT"</span><span class="p">,</span> +<a id="line-94" name="line-94"></a> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="nb">NULL</span> +<a id="line-96" name="line-96"></a><span class="p">};</span> +<a id="line-97" name="line-97"></a> +<a id="line-98" name="line-98"></a><span class="cm">/* command stata */</span> +<a id="line-99" name="line-99"></a><span class="k">enum</span> +<a id="line-100" name="line-100"></a><span class="p">{</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">S_START</span><span class="p">,</span> +<a id="line-102" name="line-102"></a> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">S_STATUS</span><span class="p">,</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">S_DATA</span><span class="p">,</span> +<a id="line-105" name="line-105"></a> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">S_FINISH</span> +<a id="line-107" name="line-107"></a><span class="p">};</span> +<a id="line-108" name="line-108"></a> +<a id="line-109" name="line-109"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span> +<a id="line-110" name="line-110"></a><span class="p">{</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">GdictCommandType</span><span class="w"> </span><span class="n">cmd_type</span><span class="p">;</span> +<a id="line-112" name="line-112"></a> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">cmd_string</span><span class="p">;</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">state</span><span class="p">;</span> +<a id="line-115" name="line-115"></a> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="cm">/* optional parameters passed to the command */</span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">;</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">strategy</span><span class="p">;</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">;</span> +<a id="line-120" name="line-120"></a> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="cm">/* buffer used to hold the reply from the server */</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">GDestroyNotify</span><span class="w"> </span><span class="n">data_destroy</span><span class="p">;</span> +<a id="line-126" name="line-126"></a><span class="p">}</span><span class="w"> </span><span class="n">GdictCommand</span><span class="p">;</span> +<a id="line-127" name="line-127"></a> +<a id="line-128" name="line-128"></a><span class="cm">/* The default string to be passed to the CLIENT command */</span> +<a id="line-129" name="line-129"></a><span class="cp">#define GDICT_DEFAULT_CLIENT "MATE Dictionary (" VERSION ")"</span> +<a id="line-130" name="line-130"></a> +<a id="line-131" name="line-131"></a><span class="cm">/* Default server:port couple */</span> +<a id="line-132" name="line-132"></a><span class="cp">#define GDICT_DEFAULT_HOSTNAME "dict.org"</span> +<a id="line-133" name="line-133"></a><span class="cp">#define GDICT_DEFAULT_PORT 2628</span> +<a id="line-134" name="line-134"></a> +<a id="line-135" name="line-135"></a><span class="cm">/* make the hostname lookup expire every five minutes */</span> +<a id="line-136" name="line-136"></a><span class="cp">#define HOSTNAME_LOOKUP_EXPIRE 300</span> +<a id="line-137" name="line-137"></a> +<a id="line-138" name="line-138"></a><span class="cm">/* wait 30 seconds between connection and receiving data on the line */</span> +<a id="line-139" name="line-139"></a><span class="cp">#define CONNECTION_TIMEOUT_SEC 30</span> +<a id="line-140" name="line-140"></a> +<a id="line-141" name="line-141"></a><span class="k">enum</span> +<a id="line-142" name="line-142"></a><span class="p">{</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">PROP_0</span><span class="p">,</span> +<a id="line-144" name="line-144"></a> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">PROP_HOSTNAME</span><span class="p">,</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">PROP_PORT</span><span class="p">,</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">PROP_STATUS</span><span class="p">,</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">PROP_CLIENT_NAME</span> +<a id="line-149" name="line-149"></a><span class="p">};</span> +<a id="line-150" name="line-150"></a> +<a id="line-151" name="line-151"></a><span class="k">enum</span> +<a id="line-152" name="line-152"></a><span class="p">{</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">CONNECTED</span><span class="p">,</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">DISCONNECTED</span><span class="p">,</span> +<a id="line-155" name="line-155"></a> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-157" name="line-157"></a><span class="p">};</span> +<a id="line-158" name="line-158"></a> +<a id="line-159" name="line-159"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">gdict_client_context_signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-160" name="line-160"></a> +<a id="line-161" name="line-161"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_GdictClientContextPrivate</span> +<a id="line-162" name="line-162"></a><span class="p">{</span> +<a id="line-163" name="line-163"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_storage</span><span class="w"> </span><span class="n">sockaddr</span><span class="p">;</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">addrinfo</span><span class="w"> </span><span class="o">*</span><span class="n">host6info</span><span class="p">;</span> +<a id="line-166" name="line-166"></a><span class="cp">#else</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in</span><span class="w"> </span><span class="n">sockaddr</span><span class="p">;</span> +<a id="line-168" name="line-168"></a><span class="cp">#endif</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">hostent</span><span class="w"> </span><span class="o">*</span><span class="n">hostinfo</span><span class="p">;</span> +<a id="line-170" name="line-170"></a> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="kt">time_t</span><span class="w"> </span><span class="n">last_lookup</span><span class="p">;</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">hostname</span><span class="p">;</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">port</span><span class="p">;</span> +<a id="line-175" name="line-175"></a> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="n">channel</span><span class="p">;</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">source_id</span><span class="p">;</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">timeout_id</span><span class="p">;</span> +<a id="line-179" name="line-179"></a> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">command</span><span class="p">;</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">GQueue</span><span class="w"> </span><span class="o">*</span><span class="n">commands_queue</span><span class="p">;</span> +<a id="line-182" name="line-182"></a> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">client_name</span><span class="p">;</span> +<a id="line-184" name="line-184"></a> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">GdictStatusCode</span><span class="w"> </span><span class="n">status_code</span><span class="p">;</span> +<a id="line-186" name="line-186"></a> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">local_only</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">is_connecting</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-189" name="line-189"></a><span class="p">};</span> +<a id="line-190" name="line-190"></a> +<a id="line-191" name="line-191"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">gdict_client_context_iface_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContextIface</span><span class="w"> </span><span class="o">*</span><span class="n">iface</span><span class="p">);</span> +<a id="line-192" name="line-192"></a> +<a id="line-193" name="line-193"></a><span class="n">G_DEFINE_TYPE_WITH_CODE</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="p">,</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">gdict_client_context</span><span class="p">,</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">G_TYPE_OBJECT</span><span class="p">,</span> +<a id="line-196" name="line-196"></a><span class="hll"><span class="w"> </span><span class="n">G_ADD_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="p">)</span><span class="error2"><--- There is an unknown macro here somewhere. Configuration is required. If G_ADD_PRIVATE is a macro then please configure it.</span> +</span><a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">G_IMPLEMENT_INTERFACE</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_CONTEXT</span><span class="p">,</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="n">gdict_client_context_iface_init</span><span class="p">));</span> +<a id="line-199" name="line-199"></a> +<a id="line-200" name="line-200"></a><span class="cm">/* GObject methods */</span> +<a id="line-201" name="line-201"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">gdict_client_context_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">);</span> +<a id="line-205" name="line-205"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">gdict_client_context_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">);</span> +<a id="line-209" name="line-209"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">gdict_client_context_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">);</span> +<a id="line-210" name="line-210"></a> +<a id="line-211" name="line-211"></a><span class="cm">/* GdictContext methods */</span> +<a id="line-212" name="line-212"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">gdict_client_context_get_databases</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">);</span> +<a id="line-214" name="line-214"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">gdict_client_context_get_strategies</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">);</span> +<a id="line-216" name="line-216"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">gdict_client_context_define_word</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">,</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">,</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">);</span> +<a id="line-220" name="line-220"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">gdict_client_context_match_word</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">,</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">strategy</span><span class="p">,</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">,</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">);</span> +<a id="line-225" name="line-225"></a> +<a id="line-226" name="line-226"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">gdict_client_context_clear_hostinfo</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">);</span> +<a id="line-227" name="line-227"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">gdict_client_context_lookup_server</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">);</span> +<a id="line-229" name="line-229"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">gdict_client_context_io_watch_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">GIOCondition</span><span class="w"> </span><span class="n">condition</span><span class="p">,</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">);</span> +<a id="line-232" name="line-232"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">gdict_client_context_parse_line</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">);</span> +<a id="line-234" name="line-234"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">gdict_client_context_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">);</span> +<a id="line-235" name="line-235"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">gdict_client_context_force_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">);</span> +<a id="line-236" name="line-236"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">gdict_client_context_real_connected</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">);</span> +<a id="line-237" name="line-237"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">gdict_client_context_real_disconnected</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">);</span> +<a id="line-238" name="line-238"></a> +<a id="line-239" name="line-239"></a><span class="k">static</span><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="nf">gdict_command_new</span><span class="w"> </span><span class="p">(</span><span class="n">GdictCommandType</span><span class="w"> </span><span class="n">cmd_type</span><span class="p">);</span> +<a id="line-240" name="line-240"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">gdict_command_free</span><span class="w"> </span><span class="p">(</span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">cmd</span><span class="p">);</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="n">GQuark</span> +<a id="line-243" name="line-243"></a><span class="nf">gdict_client_context_error_quark</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-244" name="line-244"></a><span class="p">{</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_quark_from_static_string</span><span class="w"> </span><span class="p">(</span><span class="s">"gdict-client-context-error-quark"</span><span class="p">);</span> +<a id="line-246" name="line-246"></a><span class="p">}</span> +<a id="line-247" name="line-247"></a> +<a id="line-248" name="line-248"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-249" name="line-249"></a><span class="nf">gdict_client_context_iface_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContextIface</span><span class="w"> </span><span class="o">*</span><span class="n">iface</span><span class="p">)</span> +<a id="line-250" name="line-250"></a><span class="p">{</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">iface</span><span class="o">-></span><span class="n">get_databases</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_get_databases</span><span class="p">;</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">iface</span><span class="o">-></span><span class="n">get_strategies</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_get_strategies</span><span class="p">;</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">iface</span><span class="o">-></span><span class="n">match_word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_match_word</span><span class="p">;</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">iface</span><span class="o">-></span><span class="n">define_word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_define_word</span><span class="p">;</span> +<a id="line-255" name="line-255"></a><span class="p">}</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-258" name="line-258"></a><span class="nf">gdict_client_context_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContextClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-259" name="line-259"></a><span class="p">{</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">gobject_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-261" name="line-261"></a> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">set_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_set_property</span><span class="p">;</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">get_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_get_property</span><span class="p">;</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_finalize</span><span class="p">;</span> +<a id="line-265" name="line-265"></a> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">g_object_class_override_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">GDICT_CONTEXT_PROP_LOCAL_ONLY</span><span class="p">,</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="s">"local-only"</span><span class="p">);</span> +<a id="line-269" name="line-269"></a> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-271" name="line-271"></a><span class="cm"> * GdictClientContext:client-name</span> +<a id="line-272" name="line-272"></a><span class="cm"> *</span> +<a id="line-273" name="line-273"></a><span class="cm"> * The name of the client using this context; it will be advertised when</span> +<a id="line-274" name="line-274"></a><span class="cm"> * connecting to the dictionary server.</span> +<a id="line-275" name="line-275"></a><span class="cm"> *</span> +<a id="line-276" name="line-276"></a><span class="cm"> * Since: 1.0</span> +<a id="line-277" name="line-277"></a><span class="cm"> */</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">PROP_CLIENT_NAME</span><span class="p">,</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"client-name"</span><span class="p">,</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Client Name"</span><span class="p">),</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The name of the client of the context object"</span><span class="p">),</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-286" name="line-286"></a><span class="cm"> * GdictClientContext:hostname</span> +<a id="line-287" name="line-287"></a><span class="cm"> *</span> +<a id="line-288" name="line-288"></a><span class="cm"> * The hostname of the dictionary server to connect to.</span> +<a id="line-289" name="line-289"></a><span class="cm"> *</span> +<a id="line-290" name="line-290"></a><span class="cm"> * Since: 1.0</span> +<a id="line-291" name="line-291"></a><span class="cm"> */</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">PROP_HOSTNAME</span><span class="p">,</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"hostname"</span><span class="p">,</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Hostname"</span><span class="p">),</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The hostname of the dictionary server to connect to"</span><span class="p">),</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-300" name="line-300"></a><span class="cm"> * GdictClientContext:port</span> +<a id="line-301" name="line-301"></a><span class="cm"> *</span> +<a id="line-302" name="line-302"></a><span class="cm"> * The port of the dictionary server to connect to.</span> +<a id="line-303" name="line-303"></a><span class="cm"> *</span> +<a id="line-304" name="line-304"></a><span class="cm"> * Since: 1.0</span> +<a id="line-305" name="line-305"></a><span class="cm"> */</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">PROP_PORT</span><span class="p">,</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">g_param_spec_uint</span><span class="w"> </span><span class="p">(</span><span class="s">"port"</span><span class="p">,</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Port"</span><span class="p">),</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The port of the dictionary server to connect to"</span><span class="p">),</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="mi">65535</span><span class="p">,</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">GDICT_DEFAULT_PORT</span><span class="p">,</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-316" name="line-316"></a><span class="cm"> * GdictClientContext:status</span> +<a id="line-317" name="line-317"></a><span class="cm"> *</span> +<a id="line-318" name="line-318"></a><span class="cm"> * The status code as returned by the dictionary server.</span> +<a id="line-319" name="line-319"></a><span class="cm"> *</span> +<a id="line-320" name="line-320"></a><span class="cm"> * Since: 1.0</span> +<a id="line-321" name="line-321"></a><span class="cm"> */</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="n">PROP_STATUS</span><span class="p">,</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">g_param_spec_enum</span><span class="w"> </span><span class="p">(</span><span class="s">"status"</span><span class="p">,</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Status"</span><span class="p">),</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The status code as returned by the dictionary server"</span><span class="p">),</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">GDICT_TYPE_STATUS_CODE</span><span class="p">,</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">GDICT_STATUS_INVALID</span><span class="p">,</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="n">G_PARAM_READABLE</span><span class="p">));</span> +<a id="line-330" name="line-330"></a> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-332" name="line-332"></a><span class="cm"> * GdictClientContext::connected</span> +<a id="line-333" name="line-333"></a><span class="cm"> * @client: the object which received the signal</span> +<a id="line-334" name="line-334"></a><span class="cm"> *</span> +<a id="line-335" name="line-335"></a><span class="cm"> * Emitted when a #GdictClientContext has successfully established a</span> +<a id="line-336" name="line-336"></a><span class="cm"> * connection with a dictionary server.</span> +<a id="line-337" name="line-337"></a><span class="cm"> *</span> +<a id="line-338" name="line-338"></a><span class="cm"> * Since: 1.0</span> +<a id="line-339" name="line-339"></a><span class="cm"> */</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">gdict_client_context_signals</span><span class="p">[</span><span class="n">CONNECTED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"connected"</span><span class="p">,</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContextClass</span><span class="p">,</span><span class="w"> </span><span class="n">connected</span><span class="p">),</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">gdict_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-349" name="line-349"></a><span class="cm"> * GdictClientContext::disconnected</span> +<a id="line-350" name="line-350"></a><span class="cm"> * @client: the object which received the signal</span> +<a id="line-351" name="line-351"></a><span class="cm"> *</span> +<a id="line-352" name="line-352"></a><span class="cm"> * Emitted when a #GdictClientContext has disconnected from a dictionary</span> +<a id="line-353" name="line-353"></a><span class="cm"> * server.</span> +<a id="line-354" name="line-354"></a><span class="cm"> *</span> +<a id="line-355" name="line-355"></a><span class="cm"> * Since: 1.0</span> +<a id="line-356" name="line-356"></a><span class="cm"> */</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">gdict_client_context_signals</span><span class="p">[</span><span class="n">DISCONNECTED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"disconnected"</span><span class="p">,</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContextClass</span><span class="p">,</span><span class="w"> </span><span class="n">disconnected</span><span class="p">),</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">gdict_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-365" name="line-365"></a> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="n">klass</span><span class="o">-></span><span class="n">connected</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_real_connected</span><span class="p">;</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">klass</span><span class="o">-></span><span class="n">disconnected</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_real_disconnected</span><span class="p">;</span> +<a id="line-368" name="line-368"></a><span class="p">}</span> +<a id="line-369" name="line-369"></a> +<a id="line-370" name="line-370"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-371" name="line-371"></a><span class="nf">gdict_client_context_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-372" name="line-372"></a><span class="p">{</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-374" name="line-374"></a> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-376" name="line-376"></a><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="p">;</span> +<a id="line-377" name="line-377"></a> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-380" name="line-380"></a> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostinfo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-382" name="line-382"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">host6info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-384" name="line-384"></a><span class="cp">#endif</span> +<a id="line-385" name="line-385"></a> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">last_lookup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">time_t</span><span class="p">)</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-387" name="line-387"></a> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_connecting</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">local_only</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-390" name="line-390"></a> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_STATUS_INVALID</span><span class="p">;</span> +<a id="line-392" name="line-392"></a> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">client_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-394" name="line-394"></a> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">commands_queue</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_queue_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-397" name="line-397"></a><span class="p">}</span> +<a id="line-398" name="line-398"></a> +<a id="line-399" name="line-399"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-400" name="line-400"></a><span class="nf">gdict_client_context_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-404" name="line-404"></a><span class="p">{</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">));</span> +<a id="line-406" name="line-406"></a> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="p">{</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_HOSTNAME</span><span class="p">:</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">gdict_client_context_clear_hostinfo</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">));</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_PORT</span><span class="p">:</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_value_get_uint</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_CLIENT_NAME</span><span class="p">:</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">client_name</span><span class="p">);</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">client_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_CONTEXT_PROP_LOCAL_ONLY</span><span class="p">:</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">local_only</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">g_value_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="p">}</span> +<a id="line-428" name="line-428"></a><span class="p">}</span> +<a id="line-429" name="line-429"></a> +<a id="line-430" name="line-430"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-431" name="line-431"></a><span class="nf">gdict_client_context_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-435" name="line-435"></a><span class="p">{</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">));</span> +<a id="line-437" name="line-437"></a> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="p">{</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_STATUS</span><span class="p">:</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">g_value_set_enum</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="p">);</span> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_HOSTNAME</span><span class="p">:</span> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_PORT</span><span class="p">:</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">g_value_set_uint</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="p">);</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_CLIENT_NAME</span><span class="p">:</span> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">client_name</span><span class="p">);</span> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_CONTEXT_PROP_LOCAL_ONLY</span><span class="p">:</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">g_value_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">local_only</span><span class="p">);</span> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="p">}</span> +<a id="line-459" name="line-459"></a><span class="p">}</span> +<a id="line-460" name="line-460"></a> +<a id="line-461" name="line-461"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-462" name="line-462"></a><span class="nf">gdict_client_context_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-463" name="line-463"></a><span class="p">{</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-466" name="line-466"></a> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="cm">/* force disconnection */</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="n">gdict_client_context_force_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-469" name="line-469"></a> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">gdict_command_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="p">);</span> +<a id="line-471" name="line-471"></a> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">commands_queue</span><span class="p">)</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="p">{</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="n">g_queue_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">commands_queue</span><span class="p">,</span> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gdict_command_free</span><span class="p">);</span> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">commands_queue</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="p">}</span> +<a id="line-478" name="line-478"></a> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">client_name</span><span class="p">);</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-481" name="line-481"></a> +<a id="line-482" name="line-482"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">host6info</span><span class="p">)</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">freeaddrinfo</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">host6info</span><span class="p">);</span> +<a id="line-485" name="line-485"></a><span class="cp">#endif</span> +<a id="line-486" name="line-486"></a> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="cm">/* chain up parent's finalize method */</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_client_context_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-489" name="line-489"></a><span class="p">}</span> +<a id="line-490" name="line-490"></a> +<a id="line-491" name="line-491"></a><span class="cm">/**</span> +<a id="line-492" name="line-492"></a><span class="cm"> * gdict_client_context_new:</span> +<a id="line-493" name="line-493"></a><span class="cm"> * @hostname: the hostname of a dictionary server, or %NULL for the</span> +<a id="line-494" name="line-494"></a><span class="cm"> * default server</span> +<a id="line-495" name="line-495"></a><span class="cm"> * @port: port to be used when connecting to the dictionary server,</span> +<a id="line-496" name="line-496"></a><span class="cm"> * or -1 for the default port</span> +<a id="line-497" name="line-497"></a><span class="cm"> *</span> +<a id="line-498" name="line-498"></a><span class="cm"> * Creates a new #GdictClientContext object for @hostname. Use this</span> +<a id="line-499" name="line-499"></a><span class="cm"> * object to connect and query the dictionary server using the Dictionary</span> +<a id="line-500" name="line-500"></a><span class="cm"> * Protocol as defined by RFC 2229.</span> +<a id="line-501" name="line-501"></a><span class="cm"> *</span> +<a id="line-502" name="line-502"></a><span class="cm"> * Return value: the newly created #GdictClientContext object. You should</span> +<a id="line-503" name="line-503"></a><span class="cm"> * free it using g_object_unref().</span> +<a id="line-504" name="line-504"></a><span class="cm"> */</span> +<a id="line-505" name="line-505"></a><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span> +<a id="line-506" name="line-506"></a><span class="nf">gdict_client_context_new</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">hostname</span><span class="p">,</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">port</span><span class="p">)</span> +<a id="line-508" name="line-508"></a><span class="p">{</span> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_CLIENT_CONTEXT</span><span class="p">,</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="s">"hostname"</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">hostname</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">hostname</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">GDICT_DEFAULT_HOSTNAME</span><span class="p">),</span> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="s">"port"</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">port</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">-1</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">port</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">GDICT_DEFAULT_PORT</span><span class="p">),</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="s">"client-name"</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_DEFAULT_CLIENT</span><span class="p">,</span> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-514" name="line-514"></a><span class="p">}</span> +<a id="line-515" name="line-515"></a> +<a id="line-516" name="line-516"></a><span class="cm">/**</span> +<a id="line-517" name="line-517"></a><span class="cm"> * gdict_client_context_set_hostname:</span> +<a id="line-518" name="line-518"></a><span class="cm"> * @context: a #GdictClientContext</span> +<a id="line-519" name="line-519"></a><span class="cm"> * @hostname: the hostname of a Dictionary server, or %NULL</span> +<a id="line-520" name="line-520"></a><span class="cm"> *</span> +<a id="line-521" name="line-521"></a><span class="cm"> * Sets @hostname as the hostname of the dictionary server to be used.</span> +<a id="line-522" name="line-522"></a><span class="cm"> * If @hostname is %NULL, the default dictionary server will be used.</span> +<a id="line-523" name="line-523"></a><span class="cm"> */</span> +<a id="line-524" name="line-524"></a><span class="kt">void</span> +<a id="line-525" name="line-525"></a><span class="nf">gdict_client_context_set_hostname</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">hostname</span><span class="p">)</span> +<a id="line-527" name="line-527"></a><span class="p">{</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-529" name="line-529"></a> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="s">"hostname"</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">hostname</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">hostname</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">GDICT_DEFAULT_HOSTNAME</span><span class="p">),</span> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-533" name="line-533"></a><span class="p">}</span> +<a id="line-534" name="line-534"></a> +<a id="line-535" name="line-535"></a><span class="cm">/**</span> +<a id="line-536" name="line-536"></a><span class="cm"> * gdict_client_context_get_hostname:</span> +<a id="line-537" name="line-537"></a><span class="cm"> * @context: a #GdictClientContext</span> +<a id="line-538" name="line-538"></a><span class="cm"> *</span> +<a id="line-539" name="line-539"></a><span class="cm"> * Gets the hostname of the dictionary server used by @context.</span> +<a id="line-540" name="line-540"></a><span class="cm"> *</span> +<a id="line-541" name="line-541"></a><span class="cm"> * Return value: the hostname of a dictionary server. The returned string is</span> +<a id="line-542" name="line-542"></a><span class="cm"> * owned by the #GdictClientContext object and should never be modified or</span> +<a id="line-543" name="line-543"></a><span class="cm"> * freed.</span> +<a id="line-544" name="line-544"></a><span class="cm"> */</span> +<a id="line-545" name="line-545"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-546" name="line-546"></a><span class="nf">gdict_client_context_get_hostname</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-547" name="line-547"></a><span class="p">{</span> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">hostname</span><span class="p">;</span> +<a id="line-549" name="line-549"></a> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-551" name="line-551"></a> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="s">"hostname"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">hostname</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-553" name="line-553"></a> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">hostname</span><span class="p">;</span> +<a id="line-555" name="line-555"></a><span class="p">}</span> +<a id="line-556" name="line-556"></a> +<a id="line-557" name="line-557"></a><span class="cm">/**</span> +<a id="line-558" name="line-558"></a><span class="cm"> * gdict_client_context_set_port:</span> +<a id="line-559" name="line-559"></a><span class="cm"> * @context: a #GdictClientContext</span> +<a id="line-560" name="line-560"></a><span class="cm"> * @port: port of the dictionary server to be used, or -1</span> +<a id="line-561" name="line-561"></a><span class="cm"> *</span> +<a id="line-562" name="line-562"></a><span class="cm"> * Sets the port of the dictionary server to be used when connecting.</span> +<a id="line-563" name="line-563"></a><span class="cm"> *</span> +<a id="line-564" name="line-564"></a><span class="cm"> * If @port is -1, the default port will be used.</span> +<a id="line-565" name="line-565"></a><span class="cm"> */</span> +<a id="line-566" name="line-566"></a><span class="kt">void</span> +<a id="line-567" name="line-567"></a><span class="nf">gdict_client_context_set_port</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">port</span><span class="p">)</span> +<a id="line-569" name="line-569"></a><span class="p">{</span> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-571" name="line-571"></a> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="s">"port"</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">port</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">-1</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">port</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">GDICT_DEFAULT_PORT</span><span class="p">),</span> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-575" name="line-575"></a><span class="p">}</span> +<a id="line-576" name="line-576"></a> +<a id="line-577" name="line-577"></a><span class="cm">/**</span> +<a id="line-578" name="line-578"></a><span class="cm"> * gdict_client_context_get_port:</span> +<a id="line-579" name="line-579"></a><span class="cm"> * @context: a #GdictClientContext</span> +<a id="line-580" name="line-580"></a><span class="cm"> *</span> +<a id="line-581" name="line-581"></a><span class="cm"> * Gets the port of the dictionary server used by @context.</span> +<a id="line-582" name="line-582"></a><span class="cm"> *</span> +<a id="line-583" name="line-583"></a><span class="cm"> * Return value: the number of the port.</span> +<a id="line-584" name="line-584"></a><span class="cm"> */</span> +<a id="line-585" name="line-585"></a><span class="n">guint</span> +<a id="line-586" name="line-586"></a><span class="nf">gdict_client_context_get_port</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-587" name="line-587"></a><span class="p">{</span> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">port</span><span class="p">;</span> +<a id="line-589" name="line-589"></a> +<a id="line-590" name="line-590"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-591" name="line-591"></a> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="s">"port"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">port</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-593" name="line-593"></a> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">port</span><span class="p">;</span> +<a id="line-595" name="line-595"></a><span class="p">}</span> +<a id="line-596" name="line-596"></a> +<a id="line-597" name="line-597"></a><span class="cm">/**</span> +<a id="line-598" name="line-598"></a><span class="cm"> * gdict_client_context_set_client:</span> +<a id="line-599" name="line-599"></a><span class="cm"> * @context: a #GdictClientContext</span> +<a id="line-600" name="line-600"></a><span class="cm"> * @client: the client name to use, or %NULL</span> +<a id="line-601" name="line-601"></a><span class="cm"> *</span> +<a id="line-602" name="line-602"></a><span class="cm"> * Sets @client as the client name to be used when advertising ourselves when</span> +<a id="line-603" name="line-603"></a><span class="cm"> * a connection the the dictionary server has been established.</span> +<a id="line-604" name="line-604"></a><span class="cm"> * If @client is %NULL, the default client name will be used.</span> +<a id="line-605" name="line-605"></a><span class="cm"> */</span> +<a id="line-606" name="line-606"></a><span class="kt">void</span> +<a id="line-607" name="line-607"></a><span class="nf">gdict_client_context_set_client</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">)</span> +<a id="line-609" name="line-609"></a><span class="p">{</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-611" name="line-611"></a> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="s">"client-name"</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">client</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">GDICT_DEFAULT_CLIENT</span><span class="p">),</span> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-615" name="line-615"></a><span class="p">}</span> +<a id="line-616" name="line-616"></a> +<a id="line-617" name="line-617"></a><span class="cm">/**</span> +<a id="line-618" name="line-618"></a><span class="cm"> * gdict_client_context_get_client:</span> +<a id="line-619" name="line-619"></a><span class="cm"> * @context: a #GdictClientContext</span> +<a id="line-620" name="line-620"></a><span class="cm"> *</span> +<a id="line-621" name="line-621"></a><span class="cm"> * Gets the client name used by @context. See gdict_client_context_set_client().</span> +<a id="line-622" name="line-622"></a><span class="cm"> *</span> +<a id="line-623" name="line-623"></a><span class="cm"> * Return value: the client name. The returned string is owned by the</span> +<a id="line-624" name="line-624"></a><span class="cm"> * #GdictClientContext object and should never be modified or freed.</span> +<a id="line-625" name="line-625"></a><span class="cm"> */</span> +<a id="line-626" name="line-626"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-627" name="line-627"></a><span class="nf">gdict_client_context_get_client</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-628" name="line-628"></a><span class="p">{</span> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">client_name</span><span class="p">;</span> +<a id="line-630" name="line-630"></a> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-632" name="line-632"></a> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="s">"client-name"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">client_name</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-634" name="line-634"></a> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">client_name</span><span class="p">;</span> +<a id="line-636" name="line-636"></a><span class="p">}</span> +<a id="line-637" name="line-637"></a> +<a id="line-638" name="line-638"></a><span class="cm">/* creates a new command to be sent to the dictionary server */</span> +<a id="line-639" name="line-639"></a><span class="k">static</span><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span> +<a id="line-640" name="line-640"></a><span class="nf">gdict_command_new</span><span class="w"> </span><span class="p">(</span><span class="n">GdictCommandType</span><span class="w"> </span><span class="n">cmd_type</span><span class="p">)</span> +<a id="line-641" name="line-641"></a><span class="p">{</span> +<a id="line-642" name="line-642"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-643" name="line-643"></a> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">IS_VALID_CMD</span><span class="w"> </span><span class="p">(</span><span class="n">cmd_type</span><span class="p">));</span> +<a id="line-645" name="line-645"></a> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">GdictCommand</span><span class="p">);</span> +<a id="line-647" name="line-647"></a> +<a id="line-648" name="line-648"></a><span class="w"> </span><span class="n">retval</span><span class="o">-></span><span class="n">cmd_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cmd_type</span><span class="p">;</span> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="n">retval</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_START</span><span class="p">;</span> +<a id="line-650" name="line-650"></a> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-652" name="line-652"></a><span class="p">}</span> +<a id="line-653" name="line-653"></a> +<a id="line-654" name="line-654"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-655" name="line-655"></a><span class="nf">gdict_command_free</span><span class="w"> </span><span class="p">(</span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">cmd</span><span class="p">)</span> +<a id="line-656" name="line-656"></a><span class="p">{</span> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">cmd</span><span class="p">)</span> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-659" name="line-659"></a> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">cmd_string</span><span class="p">);</span> +<a id="line-661" name="line-661"></a> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">)</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="p">{</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_CLIENT</span><span class="p">:</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_QUIT</span><span class="p">:</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_SHOW_DB</span><span class="p">:</span> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_SHOW_STRAT</span><span class="p">:</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-670" name="line-670"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_MATCH</span><span class="p">:</span> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-675" name="line-675"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_DEFINE</span><span class="p">:</span> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="p">}</span> +<a id="line-682" name="line-682"></a> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">buffer</span><span class="p">)</span> +<a id="line-684" name="line-684"></a><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-685" name="line-685"></a> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">data_destroy</span><span class="p">)</span> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="n">cmd</span><span class="o">-></span><span class="n">data_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">cmd</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-688" name="line-688"></a> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">GdictCommand</span><span class="p">,</span><span class="w"> </span><span class="n">cmd</span><span class="p">);</span> +<a id="line-690" name="line-690"></a><span class="p">}</span> +<a id="line-691" name="line-691"></a> +<a id="line-692" name="line-692"></a><span class="cm">/* push @command into the head of the commands queue; the command queue is</span> +<a id="line-693" name="line-693"></a><span class="cm"> * a FIFO-like pipe: commands go into the head and are retrieved from the</span> +<a id="line-694" name="line-694"></a><span class="cm"> * tail.</span> +<a id="line-695" name="line-695"></a><span class="cm"> */</span> +<a id="line-696" name="line-696"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-697" name="line-697"></a><span class="nf">gdict_client_context_push_command</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">command</span><span class="p">)</span> +<a id="line-699" name="line-699"></a><span class="p">{</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-701" name="line-701"></a> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-703" name="line-703"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-704" name="line-704"></a> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-706" name="line-706"></a> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="cm">/* avoid pushing a command twice */</span> +<a id="line-708" name="line-708"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_queue_find</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">commands_queue</span><span class="p">,</span><span class="w"> </span><span class="n">command</span><span class="p">))</span> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="p">{</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"gdict_client_context_push_command() called on a command already in queue</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> +<a id="line-711" name="line-711"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="p">}</span> +<a id="line-713" name="line-713"></a> +<a id="line-714" name="line-714"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Pushing command ('%s') into the queue..."</span><span class="p">,</span> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">]);</span> +<a id="line-716" name="line-716"></a> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="n">g_queue_push_head</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">commands_queue</span><span class="p">,</span><span class="w"> </span><span class="n">command</span><span class="p">);</span> +<a id="line-718" name="line-718"></a> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-720" name="line-720"></a><span class="p">}</span> +<a id="line-721" name="line-721"></a> +<a id="line-722" name="line-722"></a><span class="k">static</span><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span> +<a id="line-723" name="line-723"></a><span class="nf">gdict_client_context_pop_command</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-724" name="line-724"></a><span class="p">{</span> +<a id="line-725" name="line-725"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-726" name="line-726"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-727" name="line-727"></a> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-729" name="line-729"></a> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-731" name="line-731"></a> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">g_queue_pop_tail</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">commands_queue</span><span class="p">);</span> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">retval</span><span class="p">)</span> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-735" name="line-735"></a> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Getting command ('%s') from the queue..."</span><span class="p">,</span> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">retval</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">]);</span> +<a id="line-738" name="line-738"></a> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-740" name="line-740"></a><span class="p">}</span> +<a id="line-741" name="line-741"></a> +<a id="line-742" name="line-742"></a><span class="cm">/* send @command on the wire */</span> +<a id="line-743" name="line-743"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-744" name="line-744"></a><span class="nf">gdict_client_context_send_command</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">command</span><span class="p">,</span> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-747" name="line-747"></a><span class="p">{</span> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">write_error</span><span class="p">;</span> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">written_bytes</span><span class="p">;</span> +<a id="line-751" name="line-751"></a><span class="w"> </span><span class="n">GIOStatus</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-752" name="line-752"></a> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">cmd_string</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-755" name="line-755"></a> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-757" name="line-757"></a> +<a id="line-758" name="line-758"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">)</span> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="p">{</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"No connection established"</span><span class="p">);</span> +<a id="line-761" name="line-761"></a> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_NO_CONNECTION</span><span class="p">,</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"No connection to the dictionary server at '%s:%d'"</span><span class="p">),</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">,</span> +<a id="line-766" name="line-766"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="p">);</span> +<a id="line-767" name="line-767"></a> +<a id="line-768" name="line-768"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="p">}</span> +<a id="line-770" name="line-770"></a> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="n">write_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_write_chars</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">,</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">cmd_string</span><span class="p">,</span> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="mi">-1</span><span class="p">,</span> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="o">&</span><span class="n">written_bytes</span><span class="p">,</span> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="o">&</span><span class="n">write_error</span><span class="p">);</span> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_IO_STATUS_NORMAL</span><span class="p">)</span> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="p">{</span> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">write_error</span><span class="p">);</span> +<a id="line-780" name="line-780"></a> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-782" name="line-782"></a><span class="w"> </span><span class="p">}</span> +<a id="line-783" name="line-783"></a> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="cm">/* force flushing of the write buffer */</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="n">g_io_channel_flush</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-786" name="line-786"></a> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Wrote %"</span><span class="n">G_GSIZE_FORMAT</span><span class="s">" bytes to the channel"</span><span class="p">,</span><span class="w"> </span><span class="n">written_bytes</span><span class="p">);</span> +<a id="line-788" name="line-788"></a> +<a id="line-789" name="line-789"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-790" name="line-790"></a><span class="p">}</span> +<a id="line-791" name="line-791"></a> +<a id="line-792" name="line-792"></a><span class="cm">/* gdict_client_context_run_command: runs @command inside @context; this</span> +<a id="line-793" name="line-793"></a><span class="cm"> * function builds the command string and then passes it to the dictionary</span> +<a id="line-794" name="line-794"></a><span class="cm"> * server.</span> +<a id="line-795" name="line-795"></a><span class="cm"> */</span> +<a id="line-796" name="line-796"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-797" name="line-797"></a><span class="nf">gdict_client_context_run_command</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-798" name="line-798"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">command</span><span class="p">,</span> +<a id="line-799" name="line-799"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-800" name="line-800"></a><span class="p">{</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-802" name="line-802"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">payload</span><span class="p">;</span> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">send_error</span><span class="p">;</span> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-805" name="line-805"></a> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-808" name="line-808"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">IS_VALID_CMD</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">));</span> +<a id="line-809" name="line-809"></a> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"GdictCommand command =</span><span class="se">\n</span><span class="s">"</span> +<a id="line-811" name="line-811"></a><span class="w"> </span><span class="s">"{</span><span class="se">\n</span><span class="s">"</span> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="s">" .cmd_type = '%02d' ('%s');</span><span class="se">\n</span><span class="s">"</span> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="s">" .database = '%s';</span><span class="se">\n</span><span class="s">"</span> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="s">" .strategy = '%s';</span><span class="se">\n</span><span class="s">"</span> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="s">" .word = '%s';</span><span class="se">\n</span><span class="s">"</span> +<a id="line-816" name="line-816"></a><span class="w"> </span><span class="s">"}</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">,</span><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">],</span> +<a id="line-818" name="line-818"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"<none>"</span><span class="p">,</span> +<a id="line-819" name="line-819"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"<none>"</span><span class="p">,</span> +<a id="line-820" name="line-820"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"<none>"</span><span class="p">);</span> +<a id="line-821" name="line-821"></a> +<a id="line-822" name="line-822"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-823" name="line-823"></a> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-825" name="line-825"></a> +<a id="line-826" name="line-826"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">command</span><span class="p">;</span> +<a id="line-827" name="line-827"></a> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="cm">/* build the command string to be sent to the server */</span> +<a id="line-829" name="line-829"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">)</span> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="p">{</span> +<a id="line-831" name="line-831"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_CLIENT</span><span class="p">:</span> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="n">payload</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">client_name</span><span class="p">);</span> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">cmd_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s %s</span><span class="se">\r\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">CMD_CLIENT</span><span class="p">],</span> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="n">payload</span><span class="p">);</span> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">payload</span><span class="p">);</span> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_QUIT</span><span class="p">:</span> +<a id="line-839" name="line-839"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">cmd_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s</span><span class="se">\r\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">CMD_QUIT</span><span class="p">]);</span> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_SHOW_DB</span><span class="p">:</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">cmd_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s</span><span class="se">\r\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-844" name="line-844"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">CMD_SHOW_DB</span><span class="p">]);</span> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_SHOW_STRAT</span><span class="p">:</span> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">cmd_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s</span><span class="se">\r\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">CMD_SHOW_STRAT</span><span class="p">]);</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-850" name="line-850"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_MATCH</span><span class="p">:</span> +<a id="line-851" name="line-851"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-852" name="line-852"></a><span class="w"> </span><span class="n">payload</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-853" name="line-853"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">cmd_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s %s %s %s</span><span class="se">\r\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-854" name="line-854"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">CMD_MATCH</span><span class="p">],</span> +<a id="line-855" name="line-855"></a><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"!"</span><span class="p">),</span> +<a id="line-856" name="line-856"></a><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"*"</span><span class="p">),</span> +<a id="line-857" name="line-857"></a><span class="w"> </span><span class="n">payload</span><span class="p">);</span> +<a id="line-858" name="line-858"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">payload</span><span class="p">);</span> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-860" name="line-860"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_DEFINE</span><span class="p">:</span> +<a id="line-861" name="line-861"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-862" name="line-862"></a><span class="w"> </span><span class="n">payload</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_shell_quote</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-863" name="line-863"></a><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">cmd_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s %s %s</span><span class="se">\r\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-864" name="line-864"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">CMD_DEFINE</span><span class="p">],</span> +<a id="line-865" name="line-865"></a><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">command</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"!"</span><span class="p">),</span> +<a id="line-866" name="line-866"></a><span class="w"> </span><span class="n">payload</span><span class="p">);</span> +<a id="line-867" name="line-867"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">payload</span><span class="p">);</span> +<a id="line-868" name="line-868"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-869" name="line-869"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-870" name="line-870"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-871" name="line-871"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-872" name="line-872"></a><span class="w"> </span><span class="p">}</span> +<a id="line-873" name="line-873"></a> +<a id="line-874" name="line-874"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="o">-></span><span class="n">cmd_string</span><span class="p">);</span> +<a id="line-875" name="line-875"></a> +<a id="line-876" name="line-876"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Sending command ('%s') to the server"</span><span class="p">,</span> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">]);</span> +<a id="line-878" name="line-878"></a> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="n">send_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-880" name="line-880"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_send_command</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">command</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">send_error</span><span class="p">);</span> +<a id="line-881" name="line-881"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">res</span><span class="p">)</span> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="p">{</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">send_error</span><span class="p">);</span> +<a id="line-884" name="line-884"></a> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-886" name="line-886"></a><span class="w"> </span><span class="p">}</span> +<a id="line-887" name="line-887"></a> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-889" name="line-889"></a><span class="p">}</span> +<a id="line-890" name="line-890"></a> +<a id="line-891" name="line-891"></a><span class="cm">/* we use this signal to advertise ourselves to the dictionary server */</span> +<a id="line-892" name="line-892"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-893" name="line-893"></a><span class="nf">gdict_client_context_real_connected</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-894" name="line-894"></a><span class="p">{</span> +<a id="line-895" name="line-895"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">cmd</span><span class="p">;</span> +<a id="line-896" name="line-896"></a> +<a id="line-897" name="line-897"></a><span class="w"> </span><span class="n">cmd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_command_new</span><span class="w"> </span><span class="p">(</span><span class="n">CMD_CLIENT</span><span class="p">);</span> +<a id="line-898" name="line-898"></a><span class="w"> </span><span class="n">cmd</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-899" name="line-899"></a> +<a id="line-900" name="line-900"></a><span class="w"> </span><span class="cm">/* the CLIENT command should be the first one in our queue, so we place</span> +<a id="line-901" name="line-901"></a><span class="cm"> * it above all other commands the user might have issued between the</span> +<a id="line-902" name="line-902"></a><span class="cm"> * first and the emission of the "connected" signal, by calling it</span> +<a id="line-903" name="line-903"></a><span class="cm"> * directely.</span> +<a id="line-904" name="line-904"></a><span class="cm"> */</span> +<a id="line-905" name="line-905"></a><span class="w"> </span><span class="n">gdict_client_context_run_command</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">cmd</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-906" name="line-906"></a><span class="p">}</span> +<a id="line-907" name="line-907"></a> +<a id="line-908" name="line-908"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-909" name="line-909"></a><span class="nf">clear_command_queue</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-910" name="line-910"></a><span class="p">{</span> +<a id="line-911" name="line-911"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-912" name="line-912"></a> +<a id="line-913" name="line-913"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">commands_queue</span><span class="p">)</span> +<a id="line-914" name="line-914"></a><span class="w"> </span><span class="p">{</span> +<a id="line-915" name="line-915"></a><span class="w"> </span><span class="n">g_queue_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">commands_queue</span><span class="p">,</span> +<a id="line-916" name="line-916"></a><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gdict_command_free</span><span class="p">);</span> +<a id="line-917" name="line-917"></a><span class="w"> </span><span class="p">}</span> +<a id="line-918" name="line-918"></a> +<a id="line-919" name="line-919"></a><span class="w"> </span><span class="cm">/* renew */</span> +<a id="line-920" name="line-920"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">commands_queue</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_queue_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-921" name="line-921"></a><span class="p">}</span> +<a id="line-922" name="line-922"></a> +<a id="line-923" name="line-923"></a><span class="cm">/* force a disconnection from the server */</span> +<a id="line-924" name="line-924"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-925" name="line-925"></a><span class="nf">gdict_client_context_force_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-926" name="line-926"></a><span class="p">{</span> +<a id="line-927" name="line-927"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-928" name="line-928"></a> +<a id="line-929" name="line-929"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">timeout_id</span><span class="p">)</span> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="p">{</span> +<a id="line-931" name="line-931"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">timeout_id</span><span class="p">);</span> +<a id="line-932" name="line-932"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">timeout_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-933" name="line-933"></a><span class="w"> </span><span class="p">}</span> +<a id="line-934" name="line-934"></a> +<a id="line-935" name="line-935"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">source_id</span><span class="p">)</span> +<a id="line-936" name="line-936"></a><span class="w"> </span><span class="p">{</span> +<a id="line-937" name="line-937"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">source_id</span><span class="p">);</span> +<a id="line-938" name="line-938"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">source_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-939" name="line-939"></a><span class="w"> </span><span class="p">}</span> +<a id="line-940" name="line-940"></a> +<a id="line-941" name="line-941"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">)</span> +<a id="line-942" name="line-942"></a><span class="w"> </span><span class="p">{</span> +<a id="line-943" name="line-943"></a><span class="w"> </span><span class="n">g_io_channel_shutdown</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-944" name="line-944"></a><span class="w"> </span><span class="n">g_io_channel_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">);</span> +<a id="line-945" name="line-945"></a> +<a id="line-946" name="line-946"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="p">}</span> +<a id="line-948" name="line-948"></a> +<a id="line-949" name="line-949"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="p">)</span> +<a id="line-950" name="line-950"></a><span class="w"> </span><span class="p">{</span> +<a id="line-951" name="line-951"></a><span class="w"> </span><span class="n">gdict_command_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="p">);</span> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-953" name="line-953"></a><span class="w"> </span><span class="p">}</span> +<a id="line-954" name="line-954"></a> +<a id="line-955" name="line-955"></a><span class="w"> </span><span class="n">clear_command_queue</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-956" name="line-956"></a><span class="p">}</span> +<a id="line-957" name="line-957"></a> +<a id="line-958" name="line-958"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-959" name="line-959"></a><span class="nf">gdict_client_context_real_disconnected</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-960" name="line-960"></a><span class="p">{</span> +<a id="line-961" name="line-961"></a><span class="w"> </span><span class="n">gdict_client_context_force_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-962" name="line-962"></a><span class="p">}</span> +<a id="line-963" name="line-963"></a> +<a id="line-964" name="line-964"></a><span class="cm">/* clear the lookup data */</span> +<a id="line-965" name="line-965"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-966" name="line-966"></a><span class="nf">gdict_client_context_clear_hostinfo</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-967" name="line-967"></a><span class="p">{</span> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-969" name="line-969"></a> +<a id="line-970" name="line-970"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-971" name="line-971"></a> +<a id="line-972" name="line-972"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-973" name="line-973"></a> +<a id="line-974" name="line-974"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-975" name="line-975"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">host6info</span><span class="p">)</span> +<a id="line-976" name="line-976"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-977" name="line-977"></a><span class="cp">#endif</span> +<a id="line-978" name="line-978"></a> +<a id="line-979" name="line-979"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">hostinfo</span><span class="p">)</span> +<a id="line-980" name="line-980"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-981" name="line-981"></a> +<a id="line-982" name="line-982"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-983" name="line-983"></a><span class="w"> </span><span class="n">freeaddrinfo</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">host6info</span><span class="p">);</span> +<a id="line-984" name="line-984"></a><span class="cp">#endif</span> +<a id="line-985" name="line-985"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostinfo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-986" name="line-986"></a><span class="p">}</span> +<a id="line-987" name="line-987"></a> +<a id="line-988" name="line-988"></a><span class="cm">/* gdict_client_context_lookup_server: perform an hostname lookup in order to</span> +<a id="line-989" name="line-989"></a><span class="cm"> * connect to the dictionary server</span> +<a id="line-990" name="line-990"></a><span class="cm"> */</span> +<a id="line-991" name="line-991"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-992" name="line-992"></a><span class="nf">gdict_client_context_lookup_server</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-994" name="line-994"></a><span class="p">{</span> +<a id="line-995" name="line-995"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-996" name="line-996"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_expired</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-997" name="line-997"></a><span class="w"> </span><span class="kt">time_t</span><span class="w"> </span><span class="n">now</span><span class="p">;</span> +<a id="line-998" name="line-998"></a> +<a id="line-999" name="line-999"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-1000" name="line-1000"></a> +<a id="line-1001" name="line-1001"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1002" name="line-1002"></a> +<a id="line-1003" name="line-1003"></a><span class="w"> </span><span class="cm">/* we need the hostname, at this point */</span> +<a id="line-1004" name="line-1004"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1005" name="line-1005"></a> +<a id="line-1006" name="line-1006"></a><span class="w"> </span><span class="n">time</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">now</span><span class="p">);</span> +<a id="line-1007" name="line-1007"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">now</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">last_lookup</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">HOSTNAME_LOOKUP_EXPIRE</span><span class="p">))</span> +<a id="line-1008" name="line-1008"></a><span class="w"> </span><span class="n">is_expired</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1009" name="line-1009"></a> +<a id="line-1010" name="line-1010"></a><span class="w"> </span><span class="cm">/* we already have resolved the hostname */</span> +<a id="line-1011" name="line-1011"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-1012" name="line-1012"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">host6info</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">is_expired</span><span class="p">)</span> +<a id="line-1013" name="line-1013"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1014" name="line-1014"></a><span class="cp">#endif</span> +<a id="line-1015" name="line-1015"></a> +<a id="line-1016" name="line-1016"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hostinfo</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">is_expired</span><span class="p">)</span> +<a id="line-1017" name="line-1017"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1018" name="line-1018"></a> +<a id="line-1019" name="line-1019"></a><span class="w"> </span><span class="cm">/* clear any previously acquired lookup data */</span> +<a id="line-1020" name="line-1020"></a><span class="w"> </span><span class="n">gdict_client_context_clear_hostinfo</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-1021" name="line-1021"></a> +<a id="line-1022" name="line-1022"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Looking up hostname '%s'"</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-1023" name="line-1023"></a> +<a id="line-1024" name="line-1024"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-1025" name="line-1025"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">_gdict_has_ipv6</span><span class="w"> </span><span class="p">())</span> +<a id="line-1026" name="line-1026"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1027" name="line-1027"></a><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">addrinfo</span><span class="w"> </span><span class="n">hints</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">res</span><span class="p">;</span> +<a id="line-1028" name="line-1028"></a> +<a id="line-1029" name="line-1029"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Hostname '%s' look-up (using IPv6)"</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-1030" name="line-1030"></a> +<a id="line-1031" name="line-1031"></a><span class="w"> </span><span class="n">memset</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">hints</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">hints</span><span class="p">));</span> +<a id="line-1032" name="line-1032"></a><span class="w"> </span><span class="n">hints</span><span class="p">.</span><span class="n">ai_socktype</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SOCK_STREAM</span><span class="p">;</span> +<a id="line-1033" name="line-1033"></a> +<a id="line-1034" name="line-1034"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">getaddrinfo</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">hints</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">host6info</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-1035" name="line-1035"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1036" name="line-1036"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">host6info</span><span class="p">;</span><span class="w"> </span><span class="n">res</span><span class="p">;</span><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">res</span><span class="o">-></span><span class="n">ai_next</span><span class="p">)</span> +<a id="line-1037" name="line-1037"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="o">-></span><span class="n">ai_family</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">AF_INET6</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">res</span><span class="o">-></span><span class="n">ai_family</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">AF_INET</span><span class="p">)</span> +<a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1039" name="line-1039"></a> +<a id="line-1040" name="line-1040"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">res</span><span class="p">)</span> +<a id="line-1041" name="line-1041"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1042" name="line-1042"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1043" name="line-1043"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_LOOKUP</span><span class="p">,</span> +<a id="line-1044" name="line-1044"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Lookup failed for hostname '%s': no suitable resources found"</span><span class="p">),</span> +<a id="line-1045" name="line-1045"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-1046" name="line-1046"></a> +<a id="line-1047" name="line-1047"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1048" name="line-1048"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1049" name="line-1049"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1050" name="line-1050"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="o">-></span><span class="n">ai_family</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">AF_INET6</span><span class="p">)</span> +<a id="line-1052" name="line-1052"></a><span class="w"> </span><span class="n">memcpy</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="p">((</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in6</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="o">&</span><span class="n">priv</span><span class="o">-></span><span class="n">sockaddr</span><span class="p">)</span><span class="o">-></span><span class="n">sin6_addr</span><span class="p">,</span> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="o">&</span><span class="p">((</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in6</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">res</span><span class="o">-></span><span class="n">ai_addr</span><span class="p">)</span><span class="o">-></span><span class="n">sin6_addr</span><span class="p">,</span> +<a id="line-1054" name="line-1054"></a><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="k">struct</span><span class="w"> </span><span class="nc">in6_addr</span><span class="p">));</span> +<a id="line-1055" name="line-1055"></a> +<a id="line-1056" name="line-1056"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="o">-></span><span class="n">ai_family</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">AF_INET</span><span class="p">)</span> +<a id="line-1057" name="line-1057"></a><span class="w"> </span><span class="n">memcpy</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="p">((</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="o">&</span><span class="n">priv</span><span class="o">-></span><span class="n">sockaddr</span><span class="p">)</span><span class="o">-></span><span class="n">sin_addr</span><span class="p">,</span> +<a id="line-1058" name="line-1058"></a><span class="w"> </span><span class="o">&</span><span class="p">((</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">res</span><span class="o">-></span><span class="n">ai_addr</span><span class="p">)</span><span class="o">-></span><span class="n">sin_addr</span><span class="p">,</span> +<a id="line-1059" name="line-1059"></a><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="k">struct</span><span class="w"> </span><span class="nc">in_addr</span><span class="p">));</span> +<a id="line-1060" name="line-1060"></a> +<a id="line-1061" name="line-1061"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">sockaddr</span><span class="p">.</span><span class="n">ss_family</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">res</span><span class="o">-></span><span class="n">ai_family</span><span class="p">;</span> +<a id="line-1062" name="line-1062"></a> +<a id="line-1063" name="line-1063"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Hostname '%s' found (using IPv6)"</span><span class="p">,</span> +<a id="line-1064" name="line-1064"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-1065" name="line-1065"></a> +<a id="line-1066" name="line-1066"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">last_lookup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">time</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1067" name="line-1067"></a> +<a id="line-1068" name="line-1068"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1069" name="line-1069"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1070" name="line-1070"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1071" name="line-1071"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1072" name="line-1072"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1073" name="line-1073"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1074" name="line-1074"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_LOOKUP</span><span class="p">,</span> +<a id="line-1075" name="line-1075"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Lookup failed for host '%s': %s"</span><span class="p">),</span> +<a id="line-1076" name="line-1076"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">,</span> +<a id="line-1077" name="line-1077"></a><span class="w"> </span><span class="n">gai_strerror</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="p">));</span> +<a id="line-1078" name="line-1078"></a> +<a id="line-1079" name="line-1079"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1080" name="line-1080"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1081" name="line-1081"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1082" name="line-1082"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1083" name="line-1083"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1084" name="line-1084"></a><span class="cp">#endif </span><span class="cm">/* ENABLE_IPV6 */</span> +<a id="line-1085" name="line-1085"></a><span class="w"> </span><span class="cm">/* if we don't support IPv6, fallback to usual IPv4 lookup */</span> +<a id="line-1086" name="line-1086"></a> +<a id="line-1087" name="line-1087"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Hostname '%s' look-up (using IPv4)"</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-1088" name="line-1088"></a> +<a id="line-1089" name="line-1089"></a><span class="w"> </span><span class="p">((</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="o">&</span><span class="n">priv</span><span class="o">-></span><span class="n">sockaddr</span><span class="p">)</span><span class="o">-></span><span class="n">sin_family</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AF_INET</span><span class="p">;</span> +<a id="line-1090" name="line-1090"></a> +<a id="line-1091" name="line-1091"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostinfo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gethostbyname</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-1092" name="line-1092"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hostinfo</span><span class="p">)</span> +<a id="line-1093" name="line-1093"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1094" name="line-1094"></a><span class="w"> </span><span class="n">memcpy</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="p">((</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="o">&</span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">sockaddr</span><span class="p">))</span><span class="o">-></span><span class="n">sin_addr</span><span class="p">,</span> +<a id="line-1095" name="line-1095"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostinfo</span><span class="o">-></span><span class="n">h_addr</span><span class="p">,</span> +<a id="line-1096" name="line-1096"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostinfo</span><span class="o">-></span><span class="n">h_length</span><span class="p">);</span> +<a id="line-1097" name="line-1097"></a> +<a id="line-1098" name="line-1098"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Hostname '%s' found (using IPv4)"</span><span class="p">,</span> +<a id="line-1099" name="line-1099"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-1100" name="line-1100"></a> +<a id="line-1101" name="line-1101"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">last_lookup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">time</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1102" name="line-1102"></a> +<a id="line-1103" name="line-1103"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1104" name="line-1104"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1105" name="line-1105"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1106" name="line-1106"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1107" name="line-1107"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1108" name="line-1108"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_LOOKUP</span><span class="p">,</span> +<a id="line-1109" name="line-1109"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Lookup failed for host '%s': host not found"</span><span class="p">),</span> +<a id="line-1110" name="line-1110"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-1111" name="line-1111"></a> +<a id="line-1112" name="line-1112"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1113" name="line-1113"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1114" name="line-1114"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-1115" name="line-1115"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1116" name="line-1116"></a><span class="cp">#endif</span> +<a id="line-1117" name="line-1117"></a> +<a id="line-1118" name="line-1118"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-1119" name="line-1119"></a> +<a id="line-1120" name="line-1120"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1121" name="line-1121"></a><span class="p">}</span> +<a id="line-1122" name="line-1122"></a> +<a id="line-1123" name="line-1123"></a><span class="cm">/* gdict_client_context_parse_line: parses a line from the dictionary server</span> +<a id="line-1124" name="line-1124"></a><span class="cm"> * this is the core of the RFC2229 protocol implementation, here's where</span> +<a id="line-1125" name="line-1125"></a><span class="cm"> * the magic happens.</span> +<a id="line-1126" name="line-1126"></a><span class="cm"> */</span> +<a id="line-1127" name="line-1127"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1128" name="line-1128"></a><span class="nf">gdict_client_context_parse_line</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-1129" name="line-1129"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">)</span> +<a id="line-1130" name="line-1130"></a><span class="p">{</span> +<a id="line-1131" name="line-1131"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1132" name="line-1132"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">server_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1133" name="line-1133"></a> +<a id="line-1134" name="line-1134"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-1135" name="line-1135"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1136" name="line-1136"></a> +<a id="line-1137" name="line-1137"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1138" name="line-1138"></a> +<a id="line-1139" name="line-1139"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"parse buffer: '%s'"</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">);</span> +<a id="line-1140" name="line-1140"></a> +<a id="line-1141" name="line-1141"></a><span class="w"> </span><span class="cm">/* connection is a special case: we don't have a command, so we just</span> +<a id="line-1142" name="line-1142"></a><span class="cm"> * make sure that the server replied with the correct code. WARNING:</span> +<a id="line-1143" name="line-1143"></a><span class="cm"> * the server might be shutting down or not available, so we must</span> +<a id="line-1144" name="line-1144"></a><span class="cm"> * take into account those responses too!</span> +<a id="line-1145" name="line-1145"></a><span class="cm"> */</span> +<a id="line-1146" name="line-1146"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="p">)</span> +<a id="line-1147" name="line-1147"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1148" name="line-1148"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_CONNECT</span><span class="p">)</span> +<a id="line-1149" name="line-1149"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1150" name="line-1150"></a><span class="w"> </span><span class="cm">/* the server accepts our connection */</span> +<a id="line-1151" name="line-1151"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_client_context_signals</span><span class="p">[</span><span class="n">CONNECTED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1152" name="line-1152"></a> +<a id="line-1153" name="line-1153"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1154" name="line-1154"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1155" name="line-1155"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_SERVER_DOWN</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-1156" name="line-1156"></a><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_SHUTDOWN</span><span class="p">))</span> +<a id="line-1157" name="line-1157"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1158" name="line-1158"></a><span class="w"> </span><span class="cm">/* the server is shutting down or is not available */</span> +<a id="line-1159" name="line-1159"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">server_error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1160" name="line-1160"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_SERVER_DOWN</span><span class="p">,</span> +<a id="line-1161" name="line-1161"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to connect to the dictionary server "</span> +<a id="line-1162" name="line-1162"></a><span class="w"> </span><span class="s">"at '%s:%d'. The server replied with "</span> +<a id="line-1163" name="line-1163"></a><span class="w"> </span><span class="s">"code %d (server down)"</span><span class="p">),</span> +<a id="line-1164" name="line-1164"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">,</span> +<a id="line-1165" name="line-1165"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="p">,</span> +<a id="line-1166" name="line-1166"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="p">);</span> +<a id="line-1167" name="line-1167"></a> +<a id="line-1168" name="line-1168"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1169" name="line-1169"></a> +<a id="line-1170" name="line-1170"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1171" name="line-1171"></a> +<a id="line-1172" name="line-1172"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1173" name="line-1173"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1174" name="line-1174"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1175" name="line-1175"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1176" name="line-1176"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">parse_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1177" name="line-1177"></a> +<a id="line-1178" name="line-1178"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">parse_error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1179" name="line-1179"></a><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR_PARSE</span><span class="p">,</span> +<a id="line-1180" name="line-1180"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to parse the dictionary server reply</span><span class="se">\n</span><span class="s">: '%s'"</span><span class="p">),</span> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="n">buffer</span><span class="p">);</span> +<a id="line-1182" name="line-1182"></a> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-1184" name="line-1184"></a> +<a id="line-1185" name="line-1185"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-1186" name="line-1186"></a> +<a id="line-1187" name="line-1187"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1188" name="line-1188"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1189" name="line-1189"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1190" name="line-1190"></a> +<a id="line-1191" name="line-1191"></a><span class="w"> </span><span class="cm">/* disconnection is another special case: the server replies with code</span> +<a id="line-1192" name="line-1192"></a><span class="cm"> * 221, and closes the connection; we emit the "disconnected" signal</span> +<a id="line-1193" name="line-1193"></a><span class="cm"> * and close the connection on our side.</span> +<a id="line-1194" name="line-1194"></a><span class="cm"> */</span> +<a id="line-1195" name="line-1195"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_QUIT</span><span class="p">)</span> +<a id="line-1196" name="line-1196"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1197" name="line-1197"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_client_context_signals</span><span class="p">[</span><span class="n">DISCONNECTED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1198" name="line-1198"></a> +<a id="line-1199" name="line-1199"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1200" name="line-1200"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1201" name="line-1201"></a> +<a id="line-1202" name="line-1202"></a><span class="w"> </span><span class="cm">/* here we catch all the errors codes that the server might give us */</span> +<a id="line-1203" name="line-1203"></a><span class="w"> </span><span class="n">server_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1204" name="line-1204"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="p">)</span> +<a id="line-1205" name="line-1205"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1206" name="line-1206"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_STATUS_NO_MATCH</span><span class="p">:</span> +<a id="line-1207" name="line-1207"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">server_error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1208" name="line-1208"></a><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR_NO_MATCH</span><span class="p">,</span> +<a id="line-1209" name="line-1209"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"No definitions found for '%s'"</span><span class="p">),</span> +<a id="line-1210" name="line-1210"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-1211" name="line-1211"></a> +<a id="line-1212" name="line-1212"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"No match: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1213" name="line-1213"></a> +<a id="line-1214" name="line-1214"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1215" name="line-1215"></a> +<a id="line-1216" name="line-1216"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1217" name="line-1217"></a><span class="w"> </span><span class="n">server_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1218" name="line-1218"></a> +<a id="line-1219" name="line-1219"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1220" name="line-1220"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1221" name="line-1221"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_STATUS_BAD_DATABASE</span><span class="p">:</span> +<a id="line-1222" name="line-1222"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">server_error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1223" name="line-1223"></a><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR_INVALID_DATABASE</span><span class="p">,</span> +<a id="line-1224" name="line-1224"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Invalid database '%s'"</span><span class="p">),</span> +<a id="line-1225" name="line-1225"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-1226" name="line-1226"></a> +<a id="line-1227" name="line-1227"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Bad DB: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1228" name="line-1228"></a> +<a id="line-1229" name="line-1229"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1230" name="line-1230"></a> +<a id="line-1231" name="line-1231"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1232" name="line-1232"></a><span class="w"> </span><span class="n">server_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1233" name="line-1233"></a> +<a id="line-1234" name="line-1234"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1235" name="line-1235"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1236" name="line-1236"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_STATUS_BAD_STRATEGY</span><span class="p">:</span> +<a id="line-1237" name="line-1237"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">server_error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1238" name="line-1238"></a><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR_INVALID_STRATEGY</span><span class="p">,</span> +<a id="line-1239" name="line-1239"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Invalid strategy '%s'"</span><span class="p">),</span> +<a id="line-1240" name="line-1240"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-1241" name="line-1241"></a> +<a id="line-1242" name="line-1242"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Bad strategy: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1243" name="line-1243"></a> +<a id="line-1244" name="line-1244"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1245" name="line-1245"></a> +<a id="line-1246" name="line-1246"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1247" name="line-1247"></a><span class="w"> </span><span class="n">server_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1248" name="line-1248"></a> +<a id="line-1249" name="line-1249"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1251" name="line-1251"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_STATUS_BAD_COMMAND</span><span class="p">:</span> +<a id="line-1252" name="line-1252"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">server_error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1253" name="line-1253"></a><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR_INVALID_COMMAND</span><span class="p">,</span> +<a id="line-1254" name="line-1254"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Bad command '%s'"</span><span class="p">),</span> +<a id="line-1255" name="line-1255"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">]);</span> +<a id="line-1256" name="line-1256"></a> +<a id="line-1257" name="line-1257"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Bad command: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1258" name="line-1258"></a> +<a id="line-1259" name="line-1259"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1260" name="line-1260"></a> +<a id="line-1261" name="line-1261"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1262" name="line-1262"></a><span class="w"> </span><span class="n">server_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1263" name="line-1263"></a> +<a id="line-1264" name="line-1264"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1265" name="line-1265"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1266" name="line-1266"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_STATUS_BAD_PARAMETERS</span><span class="p">:</span> +<a id="line-1267" name="line-1267"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">server_error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1268" name="line-1268"></a><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR_INVALID_COMMAND</span><span class="p">,</span> +<a id="line-1269" name="line-1269"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Bad parameters for command '%s'"</span><span class="p">),</span> +<a id="line-1270" name="line-1270"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">]);</span> +<a id="line-1271" name="line-1271"></a> +<a id="line-1272" name="line-1272"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Bad params: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1273" name="line-1273"></a> +<a id="line-1274" name="line-1274"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1275" name="line-1275"></a> +<a id="line-1276" name="line-1276"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1277" name="line-1277"></a><span class="w"> </span><span class="n">server_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1278" name="line-1278"></a> +<a id="line-1279" name="line-1279"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1280" name="line-1280"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1281" name="line-1281"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_STATUS_NO_DATABASES_PRESENT</span><span class="p">:</span> +<a id="line-1282" name="line-1282"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">server_error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1283" name="line-1283"></a><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR_NO_DATABASES</span><span class="p">,</span> +<a id="line-1284" name="line-1284"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"No databases found on dictionary server at '%s'"</span><span class="p">),</span> +<a id="line-1285" name="line-1285"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-1286" name="line-1286"></a> +<a id="line-1287" name="line-1287"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"No DB: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1288" name="line-1288"></a> +<a id="line-1289" name="line-1289"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1290" name="line-1290"></a> +<a id="line-1291" name="line-1291"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1292" name="line-1292"></a><span class="w"> </span><span class="n">server_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1293" name="line-1293"></a> +<a id="line-1294" name="line-1294"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1295" name="line-1295"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1296" name="line-1296"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_STATUS_NO_STRATEGIES_PRESENT</span><span class="p">:</span> +<a id="line-1297" name="line-1297"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">server_error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1298" name="line-1298"></a><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR_NO_STRATEGIES</span><span class="p">,</span> +<a id="line-1299" name="line-1299"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"No strategies found on dictionary server at '%s'"</span><span class="p">),</span> +<a id="line-1300" name="line-1300"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">);</span> +<a id="line-1301" name="line-1301"></a> +<a id="line-1302" name="line-1302"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"No strategies: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1303" name="line-1303"></a> +<a id="line-1304" name="line-1304"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1305" name="line-1305"></a> +<a id="line-1306" name="line-1306"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">server_error</span><span class="p">);</span> +<a id="line-1307" name="line-1307"></a><span class="w"> </span><span class="n">server_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1308" name="line-1308"></a> +<a id="line-1309" name="line-1309"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1310" name="line-1310"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1311" name="line-1311"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1312" name="line-1312"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"non-error code: %d"</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="p">);</span> +<a id="line-1313" name="line-1313"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1314" name="line-1314"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1315" name="line-1315"></a> +<a id="line-1316" name="line-1316"></a><span class="w"> </span><span class="cm">/* server replied with 'ok' or the command has reached its FINISH state,</span> +<a id="line-1317" name="line-1317"></a><span class="cm"> * so now we are clear for destroying the current command and check if</span> +<a id="line-1318" name="line-1318"></a><span class="cm"> * there are other commands on the queue, and run them.</span> +<a id="line-1319" name="line-1319"></a><span class="cm"> */</span> +<a id="line-1320" name="line-1320"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_OK</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-1321" name="line-1321"></a><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">))</span> +<a id="line-1322" name="line-1322"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1323" name="line-1323"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">new_command</span><span class="p">;</span> +<a id="line-1324" name="line-1324"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">run_error</span><span class="p">;</span> +<a id="line-1325" name="line-1325"></a><span class="w"> </span><span class="n">GdictCommandType</span><span class="w"> </span><span class="n">last_cmd</span><span class="p">;</span> +<a id="line-1326" name="line-1326"></a> +<a id="line-1327" name="line-1327"></a><span class="w"> </span><span class="n">last_cmd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">;</span> +<a id="line-1328" name="line-1328"></a> +<a id="line-1329" name="line-1329"></a><span class="w"> </span><span class="n">gdict_command_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="p">);</span> +<a id="line-1330" name="line-1330"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1331" name="line-1331"></a> +<a id="line-1332" name="line-1332"></a><span class="w"> </span><span class="cm">/* notify the end of a command - ignore CLIENT and QUIT commands, as</span> +<a id="line-1333" name="line-1333"></a><span class="cm"> * we issue them ourselves</span> +<a id="line-1334" name="line-1334"></a><span class="cm"> */</span> +<a id="line-1335" name="line-1335"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">last_cmd</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">CMD_CLIENT</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">last_cmd</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">CMD_QUIT</span><span class="p">))</span> +<a id="line-1336" name="line-1336"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-end"</span><span class="p">);</span> +<a id="line-1337" name="line-1337"></a> +<a id="line-1338" name="line-1338"></a><span class="w"> </span><span class="cm">/* pop the next command from the queue */</span> +<a id="line-1339" name="line-1339"></a><span class="w"> </span><span class="n">new_command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_pop_command</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-1340" name="line-1340"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">new_command</span><span class="p">)</span> +<a id="line-1341" name="line-1341"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1342" name="line-1342"></a><span class="w"> </span><span class="cm">/* if the queue is empty, quit */</span> +<a id="line-1343" name="line-1343"></a><span class="w"> </span><span class="n">gdict_client_context_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-1344" name="line-1344"></a><span class="w"> </span><span class="n">new_command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_pop_command</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-1345" name="line-1345"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1346" name="line-1346"></a> +<a id="line-1347" name="line-1347"></a><span class="w"> </span><span class="n">run_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1348" name="line-1348"></a><span class="w"> </span><span class="n">gdict_client_context_run_command</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">new_command</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">run_error</span><span class="p">);</span> +<a id="line-1349" name="line-1349"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">run_error</span><span class="p">)</span> +<a id="line-1350" name="line-1350"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1351" name="line-1351"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">run_error</span><span class="p">);</span> +<a id="line-1352" name="line-1352"></a> +<a id="line-1353" name="line-1353"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">run_error</span><span class="p">);</span> +<a id="line-1354" name="line-1354"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1355" name="line-1355"></a> +<a id="line-1356" name="line-1356"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1357" name="line-1357"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1358" name="line-1358"></a> +<a id="line-1359" name="line-1359"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"check command %d ('%s')[state:%d]"</span><span class="p">,</span> +<a id="line-1360" name="line-1360"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">,</span> +<a id="line-1361" name="line-1361"></a><span class="w"> </span><span class="n">dict_command_strings</span><span class="p">[</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">],</span> +<a id="line-1362" name="line-1362"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="p">);</span> +<a id="line-1363" name="line-1363"></a> +<a id="line-1364" name="line-1364"></a><span class="w"> </span><span class="cm">/* check command type */</span> +<a id="line-1365" name="line-1365"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">cmd_type</span><span class="p">)</span> +<a id="line-1366" name="line-1366"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1367" name="line-1367"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_CLIENT</span><span class="p">:</span> +<a id="line-1368" name="line-1368"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_QUIT</span><span class="p">:</span> +<a id="line-1369" name="line-1369"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1370" name="line-1370"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_SHOW_DB</span><span class="p">:</span> +<a id="line-1371" name="line-1371"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_N_DATABASES_PRESENT</span><span class="p">)</span> +<a id="line-1372" name="line-1372"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1373" name="line-1373"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-1374" name="line-1374"></a> +<a id="line-1375" name="line-1375"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_DATA</span><span class="p">;</span> +<a id="line-1376" name="line-1376"></a> +<a id="line-1377" name="line-1377"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-1378" name="line-1378"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1379" name="line-1379"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1380" name="line-1380"></a> +<a id="line-1381" name="line-1381"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"server replied: %d databases found"</span><span class="p">,</span><span class="w"> </span><span class="n">atoi</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">));</span> +<a id="line-1382" name="line-1382"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1383" name="line-1383"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"."</span><span class="p">))</span> +<a id="line-1384" name="line-1384"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1385" name="line-1385"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1386" name="line-1386"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1387" name="line-1387"></a><span class="w"> </span><span class="n">GdictDatabase</span><span class="w"> </span><span class="o">*</span><span class="n">db</span><span class="p">;</span> +<a id="line-1388" name="line-1388"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">full</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-1389" name="line-1389"></a> +<a id="line-1390" name="line-1390"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">S_DATA</span><span class="p">);</span> +<a id="line-1391" name="line-1391"></a> +<a id="line-1392" name="line-1392"></a><span class="w"> </span><span class="cm">/* first token: database name;</span> +<a id="line-1393" name="line-1393"></a><span class="cm"> * second token: database description;</span> +<a id="line-1394" name="line-1394"></a><span class="cm"> */</span> +<a id="line-1395" name="line-1395"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">buffer</span><span class="p">;</span> +<a id="line-1396" name="line-1396"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">name</span><span class="p">)</span> +<a id="line-1397" name="line-1397"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1398" name="line-1398"></a> +<a id="line-1399" name="line-1399"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-1400" name="line-1400"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1401" name="line-1401"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1402" name="line-1402"></a> +<a id="line-1403" name="line-1403"></a><span class="w"> </span><span class="n">full</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1404" name="line-1404"></a> +<a id="line-1405" name="line-1405"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">full</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">)</span> +<a id="line-1406" name="line-1406"></a><span class="w"> </span><span class="n">full</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">full</span><span class="p">);</span> +<a id="line-1407" name="line-1407"></a> +<a id="line-1408" name="line-1408"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">full</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">);</span> +<a id="line-1409" name="line-1409"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1410" name="line-1410"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1411" name="line-1411"></a> +<a id="line-1412" name="line-1412"></a><span class="w"> </span><span class="n">db</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_gdict_database_new</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-1413" name="line-1413"></a><span class="w"> </span><span class="n">db</span><span class="o">-></span><span class="n">full_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">full</span><span class="p">);</span> +<a id="line-1414" name="line-1414"></a> +<a id="line-1415" name="line-1415"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"database-found"</span><span class="p">,</span><span class="w"> </span><span class="n">db</span><span class="p">);</span> +<a id="line-1416" name="line-1416"></a> +<a id="line-1417" name="line-1417"></a><span class="w"> </span><span class="n">gdict_database_unref</span><span class="w"> </span><span class="p">(</span><span class="n">db</span><span class="p">);</span> +<a id="line-1418" name="line-1418"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1419" name="line-1419"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1420" name="line-1420"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_SHOW_STRAT</span><span class="p">:</span> +<a id="line-1421" name="line-1421"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_N_STRATEGIES_PRESENT</span><span class="p">)</span> +<a id="line-1422" name="line-1422"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1423" name="line-1423"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-1424" name="line-1424"></a> +<a id="line-1425" name="line-1425"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_DATA</span><span class="p">;</span> +<a id="line-1426" name="line-1426"></a> +<a id="line-1427" name="line-1427"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-1428" name="line-1428"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1429" name="line-1429"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1430" name="line-1430"></a> +<a id="line-1431" name="line-1431"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"server replied: %d strategies found"</span><span class="p">,</span><span class="w"> </span><span class="n">atoi</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">));</span> +<a id="line-1432" name="line-1432"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1433" name="line-1433"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"."</span><span class="p">))</span> +<a id="line-1434" name="line-1434"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1435" name="line-1435"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1436" name="line-1436"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1437" name="line-1437"></a><span class="w"> </span><span class="n">GdictStrategy</span><span class="w"> </span><span class="o">*</span><span class="n">strat</span><span class="p">;</span> +<a id="line-1438" name="line-1438"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">desc</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-1439" name="line-1439"></a> +<a id="line-1440" name="line-1440"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">S_DATA</span><span class="p">);</span> +<a id="line-1441" name="line-1441"></a> +<a id="line-1442" name="line-1442"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">buffer</span><span class="p">;</span> +<a id="line-1443" name="line-1443"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">name</span><span class="p">)</span> +<a id="line-1444" name="line-1444"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1445" name="line-1445"></a> +<a id="line-1446" name="line-1446"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-1447" name="line-1447"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1448" name="line-1448"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1449" name="line-1449"></a> +<a id="line-1450" name="line-1450"></a><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1451" name="line-1451"></a> +<a id="line-1452" name="line-1452"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">)</span> +<a id="line-1453" name="line-1453"></a><span class="w"> </span><span class="n">desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-1454" name="line-1454"></a> +<a id="line-1455" name="line-1455"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">);</span> +<a id="line-1456" name="line-1456"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1457" name="line-1457"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1458" name="line-1458"></a> +<a id="line-1459" name="line-1459"></a><span class="w"> </span><span class="n">strat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_gdict_strategy_new</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-1460" name="line-1460"></a><span class="w"> </span><span class="n">strat</span><span class="o">-></span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">desc</span><span class="p">);</span> +<a id="line-1461" name="line-1461"></a> +<a id="line-1462" name="line-1462"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"strategy-found"</span><span class="p">,</span><span class="w"> </span><span class="n">strat</span><span class="p">);</span> +<a id="line-1463" name="line-1463"></a> +<a id="line-1464" name="line-1464"></a><span class="w"> </span><span class="n">gdict_strategy_unref</span><span class="w"> </span><span class="p">(</span><span class="n">strat</span><span class="p">);</span> +<a id="line-1465" name="line-1465"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1466" name="line-1466"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1467" name="line-1467"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_DEFINE</span><span class="p">:</span> +<a id="line-1468" name="line-1468"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_N_DEFINITIONS_RETRIEVED</span><span class="p">)</span> +<a id="line-1469" name="line-1469"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1470" name="line-1470"></a><span class="w"> </span><span class="n">GdictDefinition</span><span class="w"> </span><span class="o">*</span><span class="n">def</span><span class="p">;</span> +<a id="line-1471" name="line-1471"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-1472" name="line-1472"></a> +<a id="line-1473" name="line-1473"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_STATUS</span><span class="p">;</span> +<a id="line-1474" name="line-1474"></a> +<a id="line-1475" name="line-1475"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-1476" name="line-1476"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1477" name="line-1477"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1478" name="line-1478"></a> +<a id="line-1479" name="line-1479"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"server replied: %d definitions found"</span><span class="p">,</span><span class="w"> </span><span class="n">atoi</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">));</span> +<a id="line-1480" name="line-1480"></a> +<a id="line-1481" name="line-1481"></a><span class="w"> </span><span class="n">def</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_gdict_definition_new</span><span class="w"> </span><span class="p">(</span><span class="n">atoi</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">));</span> +<a id="line-1482" name="line-1482"></a> +<a id="line-1483" name="line-1483"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">def</span><span class="p">;</span> +<a id="line-1484" name="line-1484"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">data_destroy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">gdict_definition_unref</span><span class="p">;</span> +<a id="line-1485" name="line-1485"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1486" name="line-1486"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_WORD_DB_NAME</span><span class="p">)</span> +<a id="line-1487" name="line-1487"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1488" name="line-1488"></a><span class="w"> </span><span class="n">GdictDefinition</span><span class="w"> </span><span class="o">*</span><span class="n">def</span><span class="p">;</span> +<a id="line-1489" name="line-1489"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">db_name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">db_full</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-1490" name="line-1490"></a> +<a id="line-1491" name="line-1491"></a><span class="w"> </span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">buffer</span><span class="p">;</span> +<a id="line-1492" name="line-1492"></a> +<a id="line-1493" name="line-1493"></a><span class="w"> </span><span class="cm">/* skip the status code */</span> +<a id="line-1494" name="line-1494"></a><span class="w"> </span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-1495" name="line-1495"></a><span class="w"> </span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-1496" name="line-1496"></a> +<a id="line-1497" name="line-1497"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">)</span> +<a id="line-1498" name="line-1498"></a><span class="w"> </span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-1499" name="line-1499"></a> +<a id="line-1500" name="line-1500"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">);</span> +<a id="line-1501" name="line-1501"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1502" name="line-1502"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1503" name="line-1503"></a> +<a id="line-1504" name="line-1504"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1505" name="line-1505"></a> +<a id="line-1506" name="line-1506"></a><span class="w"> </span><span class="cm">/* the database name is not protected by "" */</span> +<a id="line-1507" name="line-1507"></a><span class="w"> </span><span class="n">db_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1508" name="line-1508"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">db_name</span><span class="p">)</span> +<a id="line-1509" name="line-1509"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1510" name="line-1510"></a> +<a id="line-1511" name="line-1511"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">db_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-1512" name="line-1512"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1513" name="line-1513"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1514" name="line-1514"></a> +<a id="line-1515" name="line-1515"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1516" name="line-1516"></a> +<a id="line-1517" name="line-1517"></a><span class="w"> </span><span class="n">db_full</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1518" name="line-1518"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">db_full</span><span class="p">)</span> +<a id="line-1519" name="line-1519"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1520" name="line-1520"></a> +<a id="line-1521" name="line-1521"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">db_full</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">)</span> +<a id="line-1522" name="line-1522"></a><span class="w"> </span><span class="n">db_full</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">db_full</span><span class="p">);</span> +<a id="line-1523" name="line-1523"></a> +<a id="line-1524" name="line-1524"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">db_full</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">);</span> +<a id="line-1525" name="line-1525"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1526" name="line-1526"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1527" name="line-1527"></a> +<a id="line-1528" name="line-1528"></a><span class="w"> </span><span class="n">def</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefinition</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1529" name="line-1529"></a> +<a id="line-1530" name="line-1530"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"{ word = '%s', db_name = '%s', db_full = '%s' }"</span><span class="p">,</span> +<a id="line-1531" name="line-1531"></a><span class="w"> </span><span class="n">word</span><span class="p">,</span> +<a id="line-1532" name="line-1532"></a><span class="w"> </span><span class="n">db_name</span><span class="p">,</span> +<a id="line-1533" name="line-1533"></a><span class="w"> </span><span class="n">db_full</span><span class="p">);</span> +<a id="line-1534" name="line-1534"></a> +<a id="line-1535" name="line-1535"></a><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-1536" name="line-1536"></a><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">database_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">db_name</span><span class="p">);</span> +<a id="line-1537" name="line-1537"></a><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">database_full</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">db_full</span><span class="p">);</span> +<a id="line-1538" name="line-1538"></a><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1539" name="line-1539"></a> +<a id="line-1540" name="line-1540"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_DATA</span><span class="p">;</span> +<a id="line-1541" name="line-1541"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1542" name="line-1542"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"."</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-1543" name="line-1543"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1544" name="line-1544"></a><span class="w"> </span><span class="n">GdictDefinition</span><span class="w"> </span><span class="o">*</span><span class="n">def</span><span class="p">;</span> +<a id="line-1545" name="line-1545"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">num</span><span class="p">;</span> +<a id="line-1546" name="line-1546"></a> +<a id="line-1547" name="line-1547"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">S_DATA</span><span class="p">);</span> +<a id="line-1548" name="line-1548"></a> +<a id="line-1549" name="line-1549"></a><span class="w"> </span><span class="n">def</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefinition</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1550" name="line-1550"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">def</span><span class="p">)</span> +<a id="line-1551" name="line-1551"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1552" name="line-1552"></a> +<a id="line-1553" name="line-1553"></a><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1554" name="line-1554"></a> +<a id="line-1555" name="line-1555"></a><span class="w"> </span><span class="cm">/* store the numer of definitions */</span> +<a id="line-1556" name="line-1556"></a><span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">total</span><span class="p">;</span> +<a id="line-1557" name="line-1557"></a> +<a id="line-1558" name="line-1558"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"definition-found"</span><span class="p">,</span><span class="w"> </span><span class="n">def</span><span class="p">);</span> +<a id="line-1559" name="line-1559"></a> +<a id="line-1560" name="line-1560"></a><span class="w"> </span><span class="n">gdict_definition_unref</span><span class="w"> </span><span class="p">(</span><span class="n">def</span><span class="p">);</span> +<a id="line-1561" name="line-1561"></a> +<a id="line-1562" name="line-1562"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1563" name="line-1563"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_gdict_definition_new</span><span class="w"> </span><span class="p">(</span><span class="n">num</span><span class="p">);</span> +<a id="line-1564" name="line-1564"></a> +<a id="line-1565" name="line-1565"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_STATUS</span><span class="p">;</span> +<a id="line-1566" name="line-1566"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1567" name="line-1567"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1568" name="line-1568"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1569" name="line-1569"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">S_DATA</span><span class="p">);</span> +<a id="line-1570" name="line-1570"></a> +<a id="line-1571" name="line-1571"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">buffer</span><span class="p">)</span> +<a id="line-1572" name="line-1572"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1573" name="line-1573"></a> +<a id="line-1574" name="line-1574"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"appending to buffer:</span><span class="se">\n</span><span class="s"> %s"</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">);</span> +<a id="line-1575" name="line-1575"></a> +<a id="line-1576" name="line-1576"></a><span class="w"> </span><span class="cm">/* TODO - collapse '..' to '.' */</span> +<a id="line-1577" name="line-1577"></a><span class="w"> </span><span class="n">g_string_append_printf</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"%s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">);</span> +<a id="line-1578" name="line-1578"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1579" name="line-1579"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1580" name="line-1580"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">CMD_MATCH</span><span class="p">:</span> +<a id="line-1581" name="line-1581"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_N_MATCHES_FOUND</span><span class="p">)</span> +<a id="line-1582" name="line-1582"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1583" name="line-1583"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-1584" name="line-1584"></a> +<a id="line-1585" name="line-1585"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_DATA</span><span class="p">;</span> +<a id="line-1586" name="line-1586"></a> +<a id="line-1587" name="line-1587"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-1588" name="line-1588"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1589" name="line-1589"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1590" name="line-1590"></a> +<a id="line-1591" name="line-1591"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"server replied: %d matches found"</span><span class="p">,</span><span class="w"> </span><span class="n">atoi</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">));</span> +<a id="line-1592" name="line-1592"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1593" name="line-1593"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"."</span><span class="p">))</span> +<a id="line-1594" name="line-1594"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1595" name="line-1595"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1596" name="line-1596"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1597" name="line-1597"></a><span class="w"> </span><span class="n">GdictMatch</span><span class="w"> </span><span class="o">*</span><span class="n">match</span><span class="p">;</span> +<a id="line-1598" name="line-1598"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">db_name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-1599" name="line-1599"></a> +<a id="line-1600" name="line-1600"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">command</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">S_DATA</span><span class="p">);</span> +<a id="line-1601" name="line-1601"></a> +<a id="line-1602" name="line-1602"></a><span class="w"> </span><span class="n">db_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">buffer</span><span class="p">;</span> +<a id="line-1603" name="line-1603"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">db_name</span><span class="p">)</span> +<a id="line-1604" name="line-1604"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1605" name="line-1605"></a> +<a id="line-1606" name="line-1606"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">db_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-1607" name="line-1607"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1608" name="line-1608"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1609" name="line-1609"></a> +<a id="line-1610" name="line-1610"></a><span class="w"> </span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-1611" name="line-1611"></a> +<a id="line-1612" name="line-1612"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">)</span> +<a id="line-1613" name="line-1613"></a><span class="w"> </span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-1614" name="line-1614"></a> +<a id="line-1615" name="line-1615"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strchr</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">'\"'</span><span class="p">);</span> +<a id="line-1616" name="line-1616"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">)</span> +<a id="line-1617" name="line-1617"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1618" name="line-1618"></a> +<a id="line-1619" name="line-1619"></a><span class="w"> </span><span class="n">match</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_gdict_match_new</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-1620" name="line-1620"></a><span class="w"> </span><span class="n">match</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">db_name</span><span class="p">);</span> +<a id="line-1621" name="line-1621"></a> +<a id="line-1622" name="line-1622"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"match-found"</span><span class="p">,</span><span class="w"> </span><span class="n">match</span><span class="p">);</span> +<a id="line-1623" name="line-1623"></a> +<a id="line-1624" name="line-1624"></a><span class="w"> </span><span class="n">gdict_match_unref</span><span class="w"> </span><span class="p">(</span><span class="n">match</span><span class="p">);</span> +<a id="line-1625" name="line-1625"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1626" name="line-1626"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1627" name="line-1627"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1628" name="line-1628"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-1629" name="line-1629"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1630" name="line-1630"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1631" name="line-1631"></a> +<a id="line-1632" name="line-1632"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1633" name="line-1633"></a><span class="p">}</span> +<a id="line-1634" name="line-1634"></a> +<a id="line-1635" name="line-1635"></a><span class="cm">/* retrieve the status code from the server response line */</span> +<a id="line-1636" name="line-1636"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span> +<a id="line-1637" name="line-1637"></a><span class="nf">get_status_code</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">line</span><span class="p">,</span> +<a id="line-1638" name="line-1638"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">old_status</span><span class="p">)</span> +<a id="line-1639" name="line-1639"></a><span class="p">{</span> +<a id="line-1640" name="line-1640"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">status</span><span class="p">;</span> +<a id="line-1641" name="line-1641"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">possible_status</span><span class="p">,</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-1642" name="line-1642"></a> +<a id="line-1643" name="line-1643"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">line</span><span class="p">)</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">3</span><span class="p">)</span> +<a id="line-1644" name="line-1644"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1645" name="line-1645"></a> +<a id="line-1646" name="line-1646"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_unichar_isdigit</span><span class="w"> </span><span class="p">(</span><span class="n">line</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span><span class="w"> </span><span class="o">||</span> +<a id="line-1647" name="line-1647"></a><span class="w"> </span><span class="o">!</span><span class="n">g_unichar_isdigit</span><span class="w"> </span><span class="p">(</span><span class="n">line</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span><span class="w"> </span><span class="o">||</span> +<a id="line-1648" name="line-1648"></a><span class="w"> </span><span class="o">!</span><span class="n">g_unichar_isdigit</span><span class="w"> </span><span class="p">(</span><span class="n">line</span><span class="p">[</span><span class="mi">2</span><span class="p">]))</span> +<a id="line-1649" name="line-1649"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1650" name="line-1650"></a> +<a id="line-1651" name="line-1651"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_unichar_isspace</span><span class="w"> </span><span class="p">(</span><span class="n">line</span><span class="p">[</span><span class="mi">3</span><span class="p">]))</span> +<a id="line-1652" name="line-1652"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1653" name="line-1653"></a> +<a id="line-1654" name="line-1654"></a><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strndup</span><span class="w"> </span><span class="p">(</span><span class="n">line</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span> +<a id="line-1655" name="line-1655"></a><span class="w"> </span><span class="n">possible_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">atoi</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="p">);</span> +<a id="line-1656" name="line-1656"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="p">);</span> +<a id="line-1657" name="line-1657"></a> +<a id="line-1658" name="line-1658"></a><span class="w"> </span><span class="cm">/* status whitelisting: sometimes, a database *cough* moby-thes *cough*</span> +<a id="line-1659" name="line-1659"></a><span class="cm"> * might return a number as first word; we do a small check here for</span> +<a id="line-1660" name="line-1660"></a><span class="cm"> * invalid status codes based on the previously set status; we don't check</span> +<a id="line-1661" name="line-1661"></a><span class="cm"> * the whole line, as we need only to be sure that the status code is</span> +<a id="line-1662" name="line-1662"></a><span class="cm"> * consistent with what we expect.</span> +<a id="line-1663" name="line-1663"></a><span class="cm"> */</span> +<a id="line-1664" name="line-1664"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">old_status</span><span class="p">)</span> +<a id="line-1665" name="line-1665"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1666" name="line-1666"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_STATUS_WORD_DB_NAME</span><span class="p">:</span> +<a id="line-1667" name="line-1667"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_STATUS_N_MATCHES_FOUND</span><span class="p">:</span> +<a id="line-1668" name="line-1668"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">possible_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_OK</span><span class="p">)</span> +<a id="line-1669" name="line-1669"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">possible_status</span><span class="p">;</span> +<a id="line-1670" name="line-1670"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1671" name="line-1671"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1672" name="line-1672"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1673" name="line-1673"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_STATUS_N_DEFINITIONS_RETRIEVED</span><span class="p">:</span> +<a id="line-1674" name="line-1674"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">possible_status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_STATUS_WORD_DB_NAME</span><span class="p">)</span> +<a id="line-1675" name="line-1675"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">possible_status</span><span class="p">;</span> +<a id="line-1676" name="line-1676"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1677" name="line-1677"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1678" name="line-1678"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1679" name="line-1679"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1680" name="line-1680"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">possible_status</span><span class="p">;</span> +<a id="line-1681" name="line-1681"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1682" name="line-1682"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1683" name="line-1683"></a> +<a id="line-1684" name="line-1684"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-1685" name="line-1685"></a><span class="p">}</span> +<a id="line-1686" name="line-1686"></a> +<a id="line-1687" name="line-1687"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1688" name="line-1688"></a><span class="nf">gdict_client_context_io_watch_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="n">channel</span><span class="p">,</span> +<a id="line-1689" name="line-1689"></a><span class="w"> </span><span class="n">GIOCondition</span><span class="w"> </span><span class="n">condition</span><span class="p">,</span> +<a id="line-1690" name="line-1690"></a><span class="w"> </span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-1691" name="line-1691"></a><span class="p">{</span> +<a id="line-1692" name="line-1692"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1693" name="line-1693"></a> +<a id="line-1694" name="line-1694"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-1695" name="line-1695"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1696" name="line-1696"></a> +<a id="line-1697" name="line-1697"></a><span class="w"> </span><span class="cm">/* since this is an asynchronous channel, we might end up here</span> +<a id="line-1698" name="line-1698"></a><span class="cm"> * even though the channel has been shut down.</span> +<a id="line-1699" name="line-1699"></a><span class="cm"> */</span> +<a id="line-1700" name="line-1700"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">)</span> +<a id="line-1701" name="line-1701"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1702" name="line-1702"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"No channel available</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> +<a id="line-1703" name="line-1703"></a> +<a id="line-1704" name="line-1704"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1705" name="line-1705"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1706" name="line-1706"></a> +<a id="line-1707" name="line-1707"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">is_connecting</span><span class="p">)</span> +<a id="line-1708" name="line-1708"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1709" name="line-1709"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_connecting</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1710" name="line-1710"></a> +<a id="line-1711" name="line-1711"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">timeout_id</span><span class="p">)</span> +<a id="line-1712" name="line-1712"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1713" name="line-1713"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">timeout_id</span><span class="p">);</span> +<a id="line-1714" name="line-1714"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">timeout_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1715" name="line-1715"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1716" name="line-1716"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1717" name="line-1717"></a> +<a id="line-1718" name="line-1718"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">condition</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_ERR</span><span class="p">)</span> +<a id="line-1719" name="line-1719"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1720" name="line-1720"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1721" name="line-1721"></a> +<a id="line-1722" name="line-1722"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">err</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1723" name="line-1723"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_SOCKET</span><span class="p">,</span> +<a id="line-1724" name="line-1724"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Connection failed to the dictionary server at %s:%d"</span><span class="p">),</span> +<a id="line-1725" name="line-1725"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">,</span> +<a id="line-1726" name="line-1726"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="p">);</span> +<a id="line-1727" name="line-1727"></a> +<a id="line-1728" name="line-1728"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="p">);</span> +<a id="line-1729" name="line-1729"></a> +<a id="line-1730" name="line-1730"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">);</span> +<a id="line-1731" name="line-1731"></a> +<a id="line-1732" name="line-1732"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1733" name="line-1733"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1734" name="line-1734"></a> +<a id="line-1735" name="line-1735"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> +<a id="line-1736" name="line-1736"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1737" name="line-1737"></a><span class="w"> </span><span class="n">GIOStatus</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-1738" name="line-1738"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">status_code</span><span class="p">;</span> +<a id="line-1739" name="line-1739"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">read_err</span><span class="p">;</span> +<a id="line-1740" name="line-1740"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">len</span><span class="p">,</span><span class="w"> </span><span class="n">term</span><span class="p">;</span> +<a id="line-1741" name="line-1741"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">line</span><span class="p">;</span> +<a id="line-1742" name="line-1742"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">parse_res</span><span class="p">;</span> +<a id="line-1743" name="line-1743"></a> +<a id="line-1744" name="line-1744"></a><span class="w"> </span><span class="cm">/* we might sever the connection while still inside the read loop,</span> +<a id="line-1745" name="line-1745"></a><span class="cm"> * so we must check the state of the channel before actually doing</span> +<a id="line-1746" name="line-1746"></a><span class="cm"> * the line reading, otherwise we'll end up with death, destruction</span> +<a id="line-1747" name="line-1747"></a><span class="cm"> * and chaos on all earth. oh, and an assertion failed inside</span> +<a id="line-1748" name="line-1748"></a><span class="cm"> * g_io_channel_read_line().</span> +<a id="line-1749" name="line-1749"></a><span class="cm"> */</span> +<a id="line-1750" name="line-1750"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">)</span> +<a id="line-1751" name="line-1751"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1752" name="line-1752"></a> +<a id="line-1753" name="line-1753"></a><span class="w"> </span><span class="n">read_err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1754" name="line-1754"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_read_line</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">line</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">len</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">term</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">read_err</span><span class="p">);</span> +<a id="line-1755" name="line-1755"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_ERROR</span><span class="p">)</span> +<a id="line-1756" name="line-1756"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1757" name="line-1757"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">read_err</span><span class="p">)</span> +<a id="line-1758" name="line-1758"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1759" name="line-1759"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1760" name="line-1760"></a> +<a id="line-1761" name="line-1761"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">err</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1762" name="line-1762"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_SOCKET</span><span class="p">,</span> +<a id="line-1763" name="line-1763"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Error while reading reply from server:</span><span class="se">\n</span><span class="s">%s"</span><span class="p">),</span> +<a id="line-1764" name="line-1764"></a><span class="w"> </span><span class="n">read_err</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1765" name="line-1765"></a> +<a id="line-1766" name="line-1766"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="p">);</span> +<a id="line-1767" name="line-1767"></a> +<a id="line-1768" name="line-1768"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">);</span> +<a id="line-1769" name="line-1769"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">read_err</span><span class="p">);</span> +<a id="line-1770" name="line-1770"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1771" name="line-1771"></a> +<a id="line-1772" name="line-1772"></a><span class="w"> </span><span class="n">gdict_client_context_force_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-1773" name="line-1773"></a> +<a id="line-1774" name="line-1774"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1775" name="line-1775"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1776" name="line-1776"></a> +<a id="line-1777" name="line-1777"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">len</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-1778" name="line-1778"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1779" name="line-1779"></a> +<a id="line-1780" name="line-1780"></a><span class="w"> </span><span class="cm">/* truncate the line terminator before parsing */</span> +<a id="line-1781" name="line-1781"></a><span class="w"> </span><span class="n">line</span><span class="p">[</span><span class="n">term</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span> +<a id="line-1782" name="line-1782"></a> +<a id="line-1783" name="line-1783"></a><span class="w"> </span><span class="n">status_code</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_status_code</span><span class="w"> </span><span class="p">(</span><span class="n">line</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="p">);</span> +<a id="line-1784" name="line-1784"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">status_code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_VALID_STATUS_CODE</span><span class="w"> </span><span class="p">(</span><span class="n">status_code</span><span class="p">)))</span> +<a id="line-1785" name="line-1785"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1786" name="line-1786"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">status_code</span><span class="p">;</span> +<a id="line-1787" name="line-1787"></a> +<a id="line-1788" name="line-1788"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"new status = '%d'"</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="p">);</span> +<a id="line-1789" name="line-1789"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1790" name="line-1790"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1791" name="line-1791"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_STATUS_INVALID</span><span class="p">;</span> +<a id="line-1792" name="line-1792"></a> +<a id="line-1793" name="line-1793"></a><span class="w"> </span><span class="cm">/* notify changes only for valid status codes */</span> +<a id="line-1794" name="line-1794"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">status_code</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">GDICT_STATUS_INVALID</span><span class="p">)</span> +<a id="line-1795" name="line-1795"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="s">"status"</span><span class="p">);</span> +<a id="line-1796" name="line-1796"></a> +<a id="line-1797" name="line-1797"></a><span class="w"> </span><span class="n">parse_res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_parse_line</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">line</span><span class="p">);</span> +<a id="line-1798" name="line-1798"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">parse_res</span><span class="p">)</span> +<a id="line-1799" name="line-1799"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1800" name="line-1800"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">line</span><span class="p">);</span> +<a id="line-1801" name="line-1801"></a> +<a id="line-1802" name="line-1802"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Parsing failed"</span><span class="p">);</span> +<a id="line-1803" name="line-1803"></a> +<a id="line-1804" name="line-1804"></a><span class="w"> </span><span class="n">gdict_client_context_force_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-1805" name="line-1805"></a> +<a id="line-1806" name="line-1806"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1807" name="line-1807"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1808" name="line-1808"></a> +<a id="line-1809" name="line-1809"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">line</span><span class="p">);</span> +<a id="line-1810" name="line-1810"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1811" name="line-1811"></a> +<a id="line-1812" name="line-1812"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1813" name="line-1813"></a><span class="p">}</span> +<a id="line-1814" name="line-1814"></a> +<a id="line-1815" name="line-1815"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1816" name="line-1816"></a><span class="nf">check_for_connection</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1817" name="line-1817"></a><span class="p">{</span> +<a id="line-1818" name="line-1818"></a><span class="w"> </span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-1819" name="line-1819"></a> +<a id="line-1820" name="line-1820"></a><span class="cp">#if 0</span> +<a id="line-1821" name="line-1821"></a><span class="c"> g_debug (G_STRLOC ": checking for connection (is connecting:%s)",</span> +<a id="line-1822" name="line-1822"></a><span class="c"> context->priv->is_connecting ? "true" : "false");</span> +<a id="line-1823" name="line-1823"></a><span class="cp">#endif</span> +<a id="line-1824" name="line-1824"></a> +<a id="line-1825" name="line-1825"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1826" name="line-1826"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1827" name="line-1827"></a> +<a id="line-1828" name="line-1828"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">is_connecting</span><span class="p">)</span> +<a id="line-1829" name="line-1829"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1830" name="line-1830"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1831" name="line-1831"></a> +<a id="line-1832" name="line-1832"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DICT</span><span class="p">,</span><span class="w"> </span><span class="s">"Forcing a disconnection due to timeout"</span><span class="p">);</span> +<a id="line-1833" name="line-1833"></a> +<a id="line-1834" name="line-1834"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">err</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1835" name="line-1835"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_SOCKET</span><span class="p">,</span> +<a id="line-1836" name="line-1836"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Connection timeout for the dictionary server at '%s:%d'"</span><span class="p">),</span> +<a id="line-1837" name="line-1837"></a><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">,</span> +<a id="line-1838" name="line-1838"></a><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="p">);</span> +<a id="line-1839" name="line-1839"></a> +<a id="line-1840" name="line-1840"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="p">);</span> +<a id="line-1841" name="line-1841"></a> +<a id="line-1842" name="line-1842"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">);</span> +<a id="line-1843" name="line-1843"></a> +<a id="line-1844" name="line-1844"></a><span class="w"> </span><span class="n">gdict_client_context_force_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-1845" name="line-1845"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1846" name="line-1846"></a> +<a id="line-1847" name="line-1847"></a><span class="w"> </span><span class="cm">/* this is a one-off operation */</span> +<a id="line-1848" name="line-1848"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1849" name="line-1849"></a><span class="p">}</span> +<a id="line-1850" name="line-1850"></a> +<a id="line-1851" name="line-1851"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1852" name="line-1852"></a><span class="nf">gdict_client_context_connect</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-1853" name="line-1853"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-1854" name="line-1854"></a><span class="p">{</span> +<a id="line-1855" name="line-1855"></a><span class="w"> </span><span class="n">GdictClientContextPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1856" name="line-1856"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">lookup_error</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">flags_error</span><span class="p">;</span> +<a id="line-1857" name="line-1857"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-1858" name="line-1858"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">sock_fd</span><span class="p">,</span><span class="w"> </span><span class="n">sock_res</span><span class="p">;</span> +<a id="line-1859" name="line-1859"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">addrlen</span><span class="p">;</span> +<a id="line-1860" name="line-1860"></a><span class="w"> </span><span class="n">GIOFlags</span><span class="w"> </span><span class="n">flags</span><span class="p">;</span> +<a id="line-1861" name="line-1861"></a> +<a id="line-1862" name="line-1862"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1863" name="line-1863"></a> +<a id="line-1864" name="line-1864"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1865" name="line-1865"></a> +<a id="line-1866" name="line-1866"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">)</span> +<a id="line-1867" name="line-1867"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1868" name="line-1868"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1869" name="line-1869"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_LOOKUP</span><span class="p">,</span> +<a id="line-1870" name="line-1870"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"No hostname defined for the dictionary server"</span><span class="p">));</span> +<a id="line-1871" name="line-1871"></a> +<a id="line-1872" name="line-1872"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1873" name="line-1873"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1874" name="line-1874"></a> +<a id="line-1875" name="line-1875"></a><span class="w"> </span><span class="cm">/* forgive the absence of a port */</span> +<a id="line-1876" name="line-1876"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="p">)</span> +<a id="line-1877" name="line-1877"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFAULT_PORT</span><span class="p">;</span> +<a id="line-1878" name="line-1878"></a> +<a id="line-1879" name="line-1879"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_connecting</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1880" name="line-1880"></a> +<a id="line-1881" name="line-1881"></a><span class="w"> </span><span class="n">lookup_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1882" name="line-1882"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_lookup_server</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">lookup_error</span><span class="p">);</span> +<a id="line-1883" name="line-1883"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">res</span><span class="p">)</span> +<a id="line-1884" name="line-1884"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1885" name="line-1885"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">lookup_error</span><span class="p">);</span> +<a id="line-1886" name="line-1886"></a> +<a id="line-1887" name="line-1887"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1888" name="line-1888"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1889" name="line-1889"></a> +<a id="line-1890" name="line-1890"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-1891" name="line-1891"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">sockaddr</span><span class="p">.</span><span class="n">ss_family</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">AF_INET6</span><span class="p">)</span> +<a id="line-1892" name="line-1892"></a><span class="w"> </span><span class="p">((</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in6</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="o">&</span><span class="n">priv</span><span class="o">-></span><span class="n">sockaddr</span><span class="p">)</span><span class="o">-></span><span class="n">sin6_port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_htons</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="p">);</span> +<a id="line-1893" name="line-1893"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1894" name="line-1894"></a><span class="cp">#endif</span> +<a id="line-1895" name="line-1895"></a><span class="w"> </span><span class="p">((</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="o">&</span><span class="n">priv</span><span class="o">-></span><span class="n">sockaddr</span><span class="p">)</span><span class="o">-></span><span class="n">sin_port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_htons</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="p">);</span> +<a id="line-1896" name="line-1896"></a> +<a id="line-1897" name="line-1897"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-1898" name="line-1898"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">sockaddr</span><span class="p">.</span><span class="n">ss_family</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">AF_INET6</span><span class="p">)</span> +<a id="line-1899" name="line-1899"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1900" name="line-1900"></a><span class="w"> </span><span class="n">sock_fd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">socket</span><span class="w"> </span><span class="p">(</span><span class="n">AF_INET6</span><span class="p">,</span><span class="w"> </span><span class="n">SOCK_STREAM</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1901" name="line-1901"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sock_fd</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-1902" name="line-1902"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1903" name="line-1903"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1904" name="line-1904"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_SOCKET</span><span class="p">,</span> +<a id="line-1905" name="line-1905"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to create socket"</span><span class="p">));</span> +<a id="line-1906" name="line-1906"></a> +<a id="line-1907" name="line-1907"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1908" name="line-1908"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1909" name="line-1909"></a> +<a id="line-1910" name="line-1910"></a><span class="w"> </span><span class="n">addrlen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in6</span><span class="p">);</span> +<a id="line-1911" name="line-1911"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1912" name="line-1912"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1913" name="line-1913"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1914" name="line-1914"></a><span class="cp">#endif </span><span class="cm">/* ENABLE_IPV6 */</span> +<a id="line-1915" name="line-1915"></a><span class="w"> </span><span class="n">sock_fd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">socket</span><span class="w"> </span><span class="p">(</span><span class="n">AF_INET</span><span class="p">,</span><span class="w"> </span><span class="n">SOCK_STREAM</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1916" name="line-1916"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sock_fd</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-1917" name="line-1917"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1918" name="line-1918"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1919" name="line-1919"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_SOCKET</span><span class="p">,</span> +<a id="line-1920" name="line-1920"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to create socket"</span><span class="p">));</span> +<a id="line-1921" name="line-1921"></a> +<a id="line-1922" name="line-1922"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1923" name="line-1923"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1924" name="line-1924"></a> +<a id="line-1925" name="line-1925"></a><span class="w"> </span><span class="n">addrlen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr_in</span><span class="p">);</span> +<a id="line-1926" name="line-1926"></a><span class="cp">#ifdef ENABLE_IPV6</span> +<a id="line-1927" name="line-1927"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1928" name="line-1928"></a><span class="cp">#endif</span> +<a id="line-1929" name="line-1929"></a> +<a id="line-1930" name="line-1930"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_unix_new</span><span class="w"> </span><span class="p">(</span><span class="n">sock_fd</span><span class="p">);</span> +<a id="line-1931" name="line-1931"></a> +<a id="line-1932" name="line-1932"></a><span class="w"> </span><span class="cm">/* RFC2229 mandates the usage of UTF-8, so we force this encoding */</span> +<a id="line-1933" name="line-1933"></a><span class="w"> </span><span class="n">g_io_channel_set_encoding</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">,</span><span class="w"> </span><span class="s">"UTF-8"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1934" name="line-1934"></a> +<a id="line-1935" name="line-1935"></a><span class="w"> </span><span class="n">g_io_channel_set_line_term</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\r\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-1936" name="line-1936"></a> +<a id="line-1937" name="line-1937"></a><span class="w"> </span><span class="cm">/* make sure that the channel is non-blocking */</span> +<a id="line-1938" name="line-1938"></a><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_get_flags</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">);</span> +<a id="line-1939" name="line-1939"></a><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">|=</span><span class="w"> </span><span class="n">G_IO_FLAG_NONBLOCK</span><span class="p">;</span> +<a id="line-1940" name="line-1940"></a><span class="w"> </span><span class="n">flags_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1941" name="line-1941"></a><span class="w"> </span><span class="n">g_io_channel_set_flags</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">,</span><span class="w"> </span><span class="n">flags</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">flags_error</span><span class="p">);</span> +<a id="line-1942" name="line-1942"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">flags_error</span><span class="p">)</span> +<a id="line-1943" name="line-1943"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1944" name="line-1944"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1945" name="line-1945"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_SOCKET</span><span class="p">,</span> +<a id="line-1946" name="line-1946"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to set the channel as non-blocking: %s"</span><span class="p">),</span> +<a id="line-1947" name="line-1947"></a><span class="w"> </span><span class="n">flags_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1948" name="line-1948"></a> +<a id="line-1949" name="line-1949"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">flags_error</span><span class="p">);</span> +<a id="line-1950" name="line-1950"></a><span class="w"> </span><span class="n">g_io_channel_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">);</span> +<a id="line-1951" name="line-1951"></a> +<a id="line-1952" name="line-1952"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1953" name="line-1953"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1954" name="line-1954"></a> +<a id="line-1955" name="line-1955"></a><span class="w"> </span><span class="cm">/* let the magic begin */</span> +<a id="line-1956" name="line-1956"></a><span class="w"> </span><span class="n">sock_res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">connect</span><span class="w"> </span><span class="p">(</span><span class="n">sock_fd</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="k">struct</span><span class="w"> </span><span class="nc">sockaddr</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="o">&</span><span class="n">priv</span><span class="o">-></span><span class="n">sockaddr</span><span class="p">,</span><span class="w"> </span><span class="n">addrlen</span><span class="p">);</span> +<a id="line-1957" name="line-1957"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">sock_res</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">EINPROGRESS</span><span class="p">))</span> +<a id="line-1958" name="line-1958"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1959" name="line-1959"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR</span><span class="p">,</span> +<a id="line-1960" name="line-1960"></a><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT_ERROR_SOCKET</span><span class="p">,</span> +<a id="line-1961" name="line-1961"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to connect to the dictionary server at '%s:%d'"</span><span class="p">),</span> +<a id="line-1962" name="line-1962"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hostname</span><span class="p">,</span> +<a id="line-1963" name="line-1963"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">port</span><span class="p">);</span> +<a id="line-1964" name="line-1964"></a> +<a id="line-1965" name="line-1965"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1966" name="line-1966"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1967" name="line-1967"></a> +<a id="line-1968" name="line-1968"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">timeout_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add_seconds</span><span class="w"> </span><span class="p">(</span><span class="n">CONNECTION_TIMEOUT_SEC</span><span class="p">,</span> +<a id="line-1969" name="line-1969"></a><span class="w"> </span><span class="n">check_for_connection</span><span class="p">,</span> +<a id="line-1970" name="line-1970"></a><span class="w"> </span><span class="n">context</span><span class="p">);</span> +<a id="line-1971" name="line-1971"></a> +<a id="line-1972" name="line-1972"></a><span class="w"> </span><span class="cm">/* XXX - remember that g_io_add_watch() increases the reference count</span> +<a id="line-1973" name="line-1973"></a><span class="cm"> * of the GIOChannel we are using.</span> +<a id="line-1974" name="line-1974"></a><span class="cm"> */</span> +<a id="line-1975" name="line-1975"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">source_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_add_watch</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="p">,</span> +<a id="line-1976" name="line-1976"></a><span class="w"> </span><span class="p">(</span><span class="n">G_IO_IN</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_IO_ERR</span><span class="p">),</span> +<a id="line-1977" name="line-1977"></a><span class="w"> </span><span class="p">(</span><span class="n">GIOFunc</span><span class="p">)</span><span class="w"> </span><span class="n">gdict_client_context_io_watch_cb</span><span class="p">,</span> +<a id="line-1978" name="line-1978"></a><span class="w"> </span><span class="n">context</span><span class="p">);</span> +<a id="line-1979" name="line-1979"></a> +<a id="line-1980" name="line-1980"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1981" name="line-1981"></a><span class="p">}</span> +<a id="line-1982" name="line-1982"></a> +<a id="line-1983" name="line-1983"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1984" name="line-1984"></a><span class="nf">gdict_client_context_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-1985" name="line-1985"></a><span class="p">{</span> +<a id="line-1986" name="line-1986"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">cmd</span><span class="p">;</span> +<a id="line-1987" name="line-1987"></a> +<a id="line-1988" name="line-1988"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-1989" name="line-1989"></a> +<a id="line-1990" name="line-1990"></a><span class="w"> </span><span class="cm">/* instead of just breaking the connection to the server, we push</span> +<a id="line-1991" name="line-1991"></a><span class="cm"> * a QUIT command on the queue, and wait for every other scheduled</span> +<a id="line-1992" name="line-1992"></a><span class="cm"> * command to perform; this allows the creation of a batch of</span> +<a id="line-1993" name="line-1993"></a><span class="cm"> * commands.</span> +<a id="line-1994" name="line-1994"></a><span class="cm"> */</span> +<a id="line-1995" name="line-1995"></a><span class="w"> </span><span class="n">cmd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_command_new</span><span class="w"> </span><span class="p">(</span><span class="n">CMD_QUIT</span><span class="p">);</span> +<a id="line-1996" name="line-1996"></a><span class="w"> </span><span class="n">cmd</span><span class="o">-></span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">S_FINISH</span><span class="p">;</span> +<a id="line-1997" name="line-1997"></a> +<a id="line-1998" name="line-1998"></a><span class="w"> </span><span class="n">gdict_client_context_push_command</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">cmd</span><span class="p">);</span> +<a id="line-1999" name="line-1999"></a><span class="p">}</span> +<a id="line-2000" name="line-2000"></a> +<a id="line-2001" name="line-2001"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-2002" name="line-2002"></a><span class="nf">gdict_client_context_is_connected</span><span class="w"> </span><span class="p">(</span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-2003" name="line-2003"></a><span class="p">{</span> +<a id="line-2004" name="line-2004"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-2005" name="line-2005"></a> +<a id="line-2006" name="line-2006"></a><span class="w"> </span><span class="cm">/* we are in the middle of a connection attempt */</span> +<a id="line-2007" name="line-2007"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">is_connecting</span><span class="p">)</span> +<a id="line-2008" name="line-2008"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-2009" name="line-2009"></a> +<a id="line-2010" name="line-2010"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">channel</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">context</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">source_id</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2011" name="line-2011"></a><span class="p">}</span> +<a id="line-2012" name="line-2012"></a> +<a id="line-2013" name="line-2013"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-2014" name="line-2014"></a><span class="nf">gdict_client_context_get_databases</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-2015" name="line-2015"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-2016" name="line-2016"></a><span class="p">{</span> +<a id="line-2017" name="line-2017"></a><span class="w"> </span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">client_ctx</span><span class="p">;</span> +<a id="line-2018" name="line-2018"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">cmd</span><span class="p">;</span> +<a id="line-2019" name="line-2019"></a> +<a id="line-2020" name="line-2020"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2021" name="line-2021"></a> +<a id="line-2022" name="line-2022"></a><span class="w"> </span><span class="n">client_ctx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-2023" name="line-2023"></a> +<a id="line-2024" name="line-2024"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-start"</span><span class="p">);</span> +<a id="line-2025" name="line-2025"></a> +<a id="line-2026" name="line-2026"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gdict_client_context_is_connected</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">))</span> +<a id="line-2027" name="line-2027"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2028" name="line-2028"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">connect_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2029" name="line-2029"></a> +<a id="line-2030" name="line-2030"></a><span class="w"> </span><span class="n">gdict_client_context_connect</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">connect_error</span><span class="p">);</span> +<a id="line-2031" name="line-2031"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">connect_error</span><span class="p">)</span> +<a id="line-2032" name="line-2032"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2033" name="line-2033"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-end"</span><span class="p">);</span> +<a id="line-2034" name="line-2034"></a> +<a id="line-2035" name="line-2035"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">connect_error</span><span class="p">);</span> +<a id="line-2036" name="line-2036"></a> +<a id="line-2037" name="line-2037"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2038" name="line-2038"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2039" name="line-2039"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2040" name="line-2040"></a> +<a id="line-2041" name="line-2041"></a><span class="w"> </span><span class="n">cmd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_command_new</span><span class="w"> </span><span class="p">(</span><span class="n">CMD_SHOW_DB</span><span class="p">);</span> +<a id="line-2042" name="line-2042"></a> +<a id="line-2043" name="line-2043"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">gdict_client_context_push_command</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">,</span><span class="w"> </span><span class="n">cmd</span><span class="p">);</span> +<a id="line-2044" name="line-2044"></a><span class="p">}</span> +<a id="line-2045" name="line-2045"></a> +<a id="line-2046" name="line-2046"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-2047" name="line-2047"></a><span class="nf">gdict_client_context_get_strategies</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-2048" name="line-2048"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-2049" name="line-2049"></a><span class="p">{</span> +<a id="line-2050" name="line-2050"></a><span class="w"> </span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">client_ctx</span><span class="p">;</span> +<a id="line-2051" name="line-2051"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">cmd</span><span class="p">;</span> +<a id="line-2052" name="line-2052"></a> +<a id="line-2053" name="line-2053"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2054" name="line-2054"></a> +<a id="line-2055" name="line-2055"></a><span class="w"> </span><span class="n">client_ctx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-2056" name="line-2056"></a> +<a id="line-2057" name="line-2057"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-start"</span><span class="p">);</span> +<a id="line-2058" name="line-2058"></a> +<a id="line-2059" name="line-2059"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gdict_client_context_is_connected</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">))</span> +<a id="line-2060" name="line-2060"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2061" name="line-2061"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">connect_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2062" name="line-2062"></a> +<a id="line-2063" name="line-2063"></a><span class="w"> </span><span class="n">gdict_client_context_connect</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">connect_error</span><span class="p">);</span> +<a id="line-2064" name="line-2064"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">connect_error</span><span class="p">)</span> +<a id="line-2065" name="line-2065"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2066" name="line-2066"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-end"</span><span class="p">);</span> +<a id="line-2067" name="line-2067"></a> +<a id="line-2068" name="line-2068"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">connect_error</span><span class="p">);</span> +<a id="line-2069" name="line-2069"></a> +<a id="line-2070" name="line-2070"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2071" name="line-2071"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2072" name="line-2072"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2073" name="line-2073"></a> +<a id="line-2074" name="line-2074"></a><span class="w"> </span><span class="n">cmd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_command_new</span><span class="w"> </span><span class="p">(</span><span class="n">CMD_SHOW_STRAT</span><span class="p">);</span> +<a id="line-2075" name="line-2075"></a> +<a id="line-2076" name="line-2076"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">gdict_client_context_push_command</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">,</span><span class="w"> </span><span class="n">cmd</span><span class="p">);</span> +<a id="line-2077" name="line-2077"></a><span class="p">}</span> +<a id="line-2078" name="line-2078"></a> +<a id="line-2079" name="line-2079"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-2080" name="line-2080"></a><span class="nf">gdict_client_context_define_word</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-2081" name="line-2081"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">,</span> +<a id="line-2082" name="line-2082"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">,</span> +<a id="line-2083" name="line-2083"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-2084" name="line-2084"></a><span class="p">{</span> +<a id="line-2085" name="line-2085"></a><span class="w"> </span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">client_ctx</span><span class="p">;</span> +<a id="line-2086" name="line-2086"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">cmd</span><span class="p">;</span> +<a id="line-2087" name="line-2087"></a> +<a id="line-2088" name="line-2088"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2089" name="line-2089"></a> +<a id="line-2090" name="line-2090"></a><span class="w"> </span><span class="n">client_ctx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-2091" name="line-2091"></a> +<a id="line-2092" name="line-2092"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-start"</span><span class="p">);</span> +<a id="line-2093" name="line-2093"></a> +<a id="line-2094" name="line-2094"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gdict_client_context_is_connected</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">))</span> +<a id="line-2095" name="line-2095"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2096" name="line-2096"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">connect_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2097" name="line-2097"></a> +<a id="line-2098" name="line-2098"></a><span class="w"> </span><span class="n">gdict_client_context_connect</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">connect_error</span><span class="p">);</span> +<a id="line-2099" name="line-2099"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">connect_error</span><span class="p">)</span> +<a id="line-2100" name="line-2100"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2101" name="line-2101"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-end"</span><span class="p">);</span> +<a id="line-2102" name="line-2102"></a> +<a id="line-2103" name="line-2103"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">connect_error</span><span class="p">);</span> +<a id="line-2104" name="line-2104"></a> +<a id="line-2105" name="line-2105"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2106" name="line-2106"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2107" name="line-2107"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2108" name="line-2108"></a> +<a id="line-2109" name="line-2109"></a><span class="w"> </span><span class="n">cmd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_command_new</span><span class="w"> </span><span class="p">(</span><span class="n">CMD_DEFINE</span><span class="p">);</span> +<a id="line-2110" name="line-2110"></a><span class="w"> </span><span class="n">cmd</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">((</span><span class="n">database</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">database</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">GDICT_DEFAULT_DATABASE</span><span class="p">));</span> +<a id="line-2111" name="line-2111"></a><span class="w"> </span><span class="n">cmd</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_normalize</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">G_NORMALIZE_NFC</span><span class="p">);</span> +<a id="line-2112" name="line-2112"></a> +<a id="line-2113" name="line-2113"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">gdict_client_context_push_command</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">,</span><span class="w"> </span><span class="n">cmd</span><span class="p">);</span> +<a id="line-2114" name="line-2114"></a><span class="p">}</span> +<a id="line-2115" name="line-2115"></a> +<a id="line-2116" name="line-2116"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-2117" name="line-2117"></a><span class="nf">gdict_client_context_match_word</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-2118" name="line-2118"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">,</span> +<a id="line-2119" name="line-2119"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">strategy</span><span class="p">,</span> +<a id="line-2120" name="line-2120"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">,</span> +<a id="line-2121" name="line-2121"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-2122" name="line-2122"></a><span class="p">{</span> +<a id="line-2123" name="line-2123"></a><span class="w"> </span><span class="n">GdictClientContext</span><span class="w"> </span><span class="o">*</span><span class="n">client_ctx</span><span class="p">;</span> +<a id="line-2124" name="line-2124"></a><span class="w"> </span><span class="n">GdictCommand</span><span class="w"> </span><span class="o">*</span><span class="n">cmd</span><span class="p">;</span> +<a id="line-2125" name="line-2125"></a> +<a id="line-2126" name="line-2126"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2127" name="line-2127"></a> +<a id="line-2128" name="line-2128"></a><span class="w"> </span><span class="n">client_ctx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-2129" name="line-2129"></a> +<a id="line-2130" name="line-2130"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-start"</span><span class="p">);</span> +<a id="line-2131" name="line-2131"></a> +<a id="line-2132" name="line-2132"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gdict_client_context_is_connected</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">))</span> +<a id="line-2133" name="line-2133"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2134" name="line-2134"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">connect_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2135" name="line-2135"></a> +<a id="line-2136" name="line-2136"></a><span class="w"> </span><span class="n">gdict_client_context_connect</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">connect_error</span><span class="p">);</span> +<a id="line-2137" name="line-2137"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">connect_error</span><span class="p">)</span> +<a id="line-2138" name="line-2138"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2139" name="line-2139"></a><span class="w"> </span><span class="n">g_signal_emit_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-end"</span><span class="p">);</span> +<a id="line-2140" name="line-2140"></a> +<a id="line-2141" name="line-2141"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">connect_error</span><span class="p">);</span> +<a id="line-2142" name="line-2142"></a> +<a id="line-2143" name="line-2143"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2144" name="line-2144"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2145" name="line-2145"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2146" name="line-2146"></a> +<a id="line-2147" name="line-2147"></a><span class="w"> </span><span class="n">cmd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_command_new</span><span class="w"> </span><span class="p">(</span><span class="n">CMD_MATCH</span><span class="p">);</span> +<a id="line-2148" name="line-2148"></a><span class="w"> </span><span class="n">cmd</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">((</span><span class="n">database</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">database</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">GDICT_DEFAULT_DATABASE</span><span class="p">));</span> +<a id="line-2149" name="line-2149"></a><span class="w"> </span><span class="n">cmd</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">((</span><span class="n">strategy</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">strategy</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">GDICT_DEFAULT_STRATEGY</span><span class="p">));</span> +<a id="line-2150" name="line-2150"></a><span class="w"> </span><span class="n">cmd</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_normalize</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">G_NORMALIZE_NFC</span><span class="p">);</span> +<a id="line-2151" name="line-2151"></a> +<a id="line-2152" name="line-2152"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">gdict_client_context_push_command</span><span class="w"> </span><span class="p">(</span><span class="n">client_ctx</span><span class="p">,</span><span class="w"> </span><span class="n">cmd</span><span class="p">);</span> +<a id="line-2153" name="line-2153"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/28.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/28.html new file mode 100644 index 00000000..557bd4a4 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/28.html @@ -0,0 +1,5999 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-dictionary/libgdict/gdict-defbox.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gdict-defbox.c</p> +<a href="28.html#line-126"> unknownMacro 126</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span> +<span class="normal">1328</span> +<span class="normal">1329</span> +<span class="normal">1330</span> +<span class="normal">1331</span> +<span class="normal">1332</span> +<span class="normal">1333</span> +<span class="normal">1334</span> +<span class="normal">1335</span> +<span class="normal">1336</span> +<span class="normal">1337</span> +<span class="normal">1338</span> +<span class="normal">1339</span> +<span class="normal">1340</span> +<span class="normal">1341</span> +<span class="normal">1342</span> +<span class="normal">1343</span> +<span class="normal">1344</span> +<span class="normal">1345</span> +<span class="normal">1346</span> +<span class="normal">1347</span> +<span class="normal">1348</span> +<span class="normal">1349</span> +<span class="normal">1350</span> +<span class="normal">1351</span> +<span class="normal">1352</span> +<span class="normal">1353</span> +<span class="normal">1354</span> +<span class="normal">1355</span> +<span class="normal">1356</span> +<span class="normal">1357</span> +<span class="normal">1358</span> +<span class="normal">1359</span> +<span class="normal">1360</span> +<span class="normal">1361</span> +<span class="normal">1362</span> +<span class="normal">1363</span> +<span class="normal">1364</span> +<span class="normal">1365</span> +<span class="normal">1366</span> +<span class="normal">1367</span> +<span class="normal">1368</span> +<span class="normal">1369</span> +<span class="normal">1370</span> +<span class="normal">1371</span> +<span class="normal">1372</span> +<span class="normal">1373</span> +<span class="normal">1374</span> +<span class="normal">1375</span> +<span class="normal">1376</span> +<span class="normal">1377</span> +<span class="normal">1378</span> +<span class="normal">1379</span> +<span class="normal">1380</span> +<span class="normal">1381</span> +<span class="normal">1382</span> +<span class="normal">1383</span> +<span class="normal">1384</span> +<span class="normal">1385</span> +<span class="normal">1386</span> +<span class="normal">1387</span> +<span class="normal">1388</span> +<span class="normal">1389</span> +<span class="normal">1390</span> +<span class="normal">1391</span> +<span class="normal">1392</span> +<span class="normal">1393</span> +<span class="normal">1394</span> +<span class="normal">1395</span> +<span class="normal">1396</span> +<span class="normal">1397</span> +<span class="normal">1398</span> +<span class="normal">1399</span> +<span class="normal">1400</span> +<span class="normal">1401</span> +<span class="normal">1402</span> +<span class="normal">1403</span> +<span class="normal">1404</span> +<span class="normal">1405</span> +<span class="normal">1406</span> +<span class="normal">1407</span> +<span class="normal">1408</span> +<span class="normal">1409</span> +<span class="normal">1410</span> +<span class="normal">1411</span> +<span class="normal">1412</span> +<span class="normal">1413</span> +<span class="normal">1414</span> +<span class="normal">1415</span> +<span class="normal">1416</span> +<span class="normal">1417</span> +<span class="normal">1418</span> +<span class="normal">1419</span> +<span class="normal">1420</span> +<span class="normal">1421</span> +<span class="normal">1422</span> +<span class="normal">1423</span> +<span class="normal">1424</span> +<span class="normal">1425</span> +<span class="normal">1426</span> +<span class="normal">1427</span> +<span class="normal">1428</span> +<span class="normal">1429</span> +<span class="normal">1430</span> +<span class="normal">1431</span> +<span class="normal">1432</span> +<span class="normal">1433</span> +<span class="normal">1434</span> +<span class="normal">1435</span> +<span class="normal">1436</span> +<span class="normal">1437</span> +<span class="normal">1438</span> +<span class="normal">1439</span> +<span class="normal">1440</span> +<span class="normal">1441</span> +<span class="normal">1442</span> +<span class="normal">1443</span> +<span class="normal">1444</span> +<span class="normal">1445</span> +<span class="normal">1446</span> +<span class="normal">1447</span> +<span class="normal">1448</span> +<span class="normal">1449</span> +<span class="normal">1450</span> +<span class="normal">1451</span> +<span class="normal">1452</span> +<span class="normal">1453</span> +<span class="normal">1454</span> +<span class="normal">1455</span> +<span class="normal">1456</span> +<span class="normal">1457</span> +<span class="normal">1458</span> +<span class="normal">1459</span> +<span class="normal">1460</span> +<span class="normal">1461</span> +<span class="normal">1462</span> +<span class="normal">1463</span> +<span class="normal">1464</span> +<span class="normal">1465</span> +<span class="normal">1466</span> +<span class="normal">1467</span> +<span class="normal">1468</span> +<span class="normal">1469</span> +<span class="normal">1470</span> +<span class="normal">1471</span> +<span class="normal">1472</span> +<span class="normal">1473</span> +<span class="normal">1474</span> +<span class="normal">1475</span> +<span class="normal">1476</span> +<span class="normal">1477</span> +<span class="normal">1478</span> +<span class="normal">1479</span> +<span class="normal">1480</span> +<span class="normal">1481</span> +<span class="normal">1482</span> +<span class="normal">1483</span> +<span class="normal">1484</span> +<span class="normal">1485</span> +<span class="normal">1486</span> +<span class="normal">1487</span> +<span class="normal">1488</span> +<span class="normal">1489</span> +<span class="normal">1490</span> +<span class="normal">1491</span> +<span class="normal">1492</span> +<span class="normal">1493</span> +<span class="normal">1494</span> +<span class="normal">1495</span> +<span class="normal">1496</span> +<span class="normal">1497</span> +<span class="normal">1498</span> +<span class="normal">1499</span> +<span class="normal">1500</span> +<span class="normal">1501</span> +<span class="normal">1502</span> +<span class="normal">1503</span> +<span class="normal">1504</span> +<span class="normal">1505</span> +<span class="normal">1506</span> +<span class="normal">1507</span> +<span class="normal">1508</span> +<span class="normal">1509</span> +<span class="normal">1510</span> +<span class="normal">1511</span> +<span class="normal">1512</span> +<span class="normal">1513</span> +<span class="normal">1514</span> +<span class="normal">1515</span> +<span class="normal">1516</span> +<span class="normal">1517</span> +<span class="normal">1518</span> +<span class="normal">1519</span> +<span class="normal">1520</span> +<span class="normal">1521</span> +<span class="normal">1522</span> +<span class="normal">1523</span> +<span class="normal">1524</span> +<span class="normal">1525</span> +<span class="normal">1526</span> +<span class="normal">1527</span> +<span class="normal">1528</span> +<span class="normal">1529</span> +<span class="normal">1530</span> +<span class="normal">1531</span> +<span class="normal">1532</span> +<span class="normal">1533</span> +<span class="normal">1534</span> +<span class="normal">1535</span> +<span class="normal">1536</span> +<span class="normal">1537</span> +<span class="normal">1538</span> +<span class="normal">1539</span> +<span class="normal">1540</span> +<span class="normal">1541</span> +<span class="normal">1542</span> +<span class="normal">1543</span> +<span class="normal">1544</span> +<span class="normal">1545</span> +<span class="normal">1546</span> +<span class="normal">1547</span> +<span class="normal">1548</span> +<span class="normal">1549</span> +<span class="normal">1550</span> +<span class="normal">1551</span> +<span class="normal">1552</span> +<span class="normal">1553</span> +<span class="normal">1554</span> +<span class="normal">1555</span> +<span class="normal">1556</span> +<span class="normal">1557</span> +<span class="normal">1558</span> +<span class="normal">1559</span> +<span class="normal">1560</span> +<span class="normal">1561</span> +<span class="normal">1562</span> +<span class="normal">1563</span> +<span class="normal">1564</span> +<span class="normal">1565</span> +<span class="normal">1566</span> +<span class="normal">1567</span> +<span class="normal">1568</span> +<span class="normal">1569</span> +<span class="normal">1570</span> +<span class="normal">1571</span> +<span class="normal">1572</span> +<span class="normal">1573</span> +<span class="normal">1574</span> +<span class="normal">1575</span> +<span class="normal">1576</span> +<span class="normal">1577</span> +<span class="normal">1578</span> +<span class="normal">1579</span> +<span class="normal">1580</span> +<span class="normal">1581</span> +<span class="normal">1582</span> +<span class="normal">1583</span> +<span class="normal">1584</span> +<span class="normal">1585</span> +<span class="normal">1586</span> +<span class="normal">1587</span> +<span class="normal">1588</span> +<span class="normal">1589</span> +<span class="normal">1590</span> +<span class="normal">1591</span> +<span class="normal">1592</span> +<span class="normal">1593</span> +<span class="normal">1594</span> +<span class="normal">1595</span> +<span class="normal">1596</span> +<span class="normal">1597</span> +<span class="normal">1598</span> +<span class="normal">1599</span> +<span class="normal">1600</span> +<span class="normal">1601</span> +<span class="normal">1602</span> +<span class="normal">1603</span> +<span class="normal">1604</span> +<span class="normal">1605</span> +<span class="normal">1606</span> +<span class="normal">1607</span> +<span class="normal">1608</span> +<span class="normal">1609</span> +<span class="normal">1610</span> +<span class="normal">1611</span> +<span class="normal">1612</span> +<span class="normal">1613</span> +<span class="normal">1614</span> +<span class="normal">1615</span> +<span class="normal">1616</span> +<span class="normal">1617</span> +<span class="normal">1618</span> +<span class="normal">1619</span> +<span class="normal">1620</span> +<span class="normal">1621</span> +<span class="normal">1622</span> +<span class="normal">1623</span> +<span class="normal">1624</span> +<span class="normal">1625</span> +<span class="normal">1626</span> +<span class="normal">1627</span> +<span class="normal">1628</span> +<span class="normal">1629</span> +<span class="normal">1630</span> +<span class="normal">1631</span> +<span class="normal">1632</span> +<span class="normal">1633</span> +<span class="normal">1634</span> +<span class="normal">1635</span> +<span class="normal">1636</span> +<span class="normal">1637</span> +<span class="normal">1638</span> +<span class="normal">1639</span> +<span class="normal">1640</span> +<span class="normal">1641</span> +<span class="normal">1642</span> +<span class="normal">1643</span> +<span class="normal">1644</span> +<span class="normal">1645</span> +<span class="normal">1646</span> +<span class="normal">1647</span> +<span class="normal">1648</span> +<span class="normal">1649</span> +<span class="normal">1650</span> +<span class="normal">1651</span> +<span class="normal">1652</span> +<span class="normal">1653</span> +<span class="normal">1654</span> +<span class="normal">1655</span> +<span class="normal">1656</span> +<span class="normal">1657</span> +<span class="normal">1658</span> +<span class="normal">1659</span> +<span class="normal">1660</span> +<span class="normal">1661</span> +<span class="normal">1662</span> +<span class="normal">1663</span> +<span class="normal">1664</span> +<span class="normal">1665</span> +<span class="normal">1666</span> +<span class="normal">1667</span> +<span class="normal">1668</span> +<span class="normal">1669</span> +<span class="normal">1670</span> +<span class="normal">1671</span> +<span class="normal">1672</span> +<span class="normal">1673</span> +<span class="normal">1674</span> +<span class="normal">1675</span> +<span class="normal">1676</span> +<span class="normal">1677</span> +<span class="normal">1678</span> +<span class="normal">1679</span> +<span class="normal">1680</span> +<span class="normal">1681</span> +<span class="normal">1682</span> +<span class="normal">1683</span> +<span class="normal">1684</span> +<span class="normal">1685</span> +<span class="normal">1686</span> +<span class="normal">1687</span> +<span class="normal">1688</span> +<span class="normal">1689</span> +<span class="normal">1690</span> +<span class="normal">1691</span> +<span class="normal">1692</span> +<span class="normal">1693</span> +<span class="normal">1694</span> +<span class="normal">1695</span> +<span class="normal">1696</span> +<span class="normal">1697</span> +<span class="normal">1698</span> +<span class="normal">1699</span> +<span class="normal">1700</span> +<span class="normal">1701</span> +<span class="normal">1702</span> +<span class="normal">1703</span> +<span class="normal">1704</span> +<span class="normal">1705</span> +<span class="normal">1706</span> +<span class="normal">1707</span> +<span class="normal">1708</span> +<span class="normal">1709</span> +<span class="normal">1710</span> +<span class="normal">1711</span> +<span class="normal">1712</span> +<span class="normal">1713</span> +<span class="normal">1714</span> +<span class="normal">1715</span> +<span class="normal">1716</span> +<span class="normal">1717</span> +<span class="normal">1718</span> +<span class="normal">1719</span> +<span class="normal">1720</span> +<span class="normal">1721</span> +<span class="normal">1722</span> +<span class="normal">1723</span> +<span class="normal">1724</span> +<span class="normal">1725</span> +<span class="normal">1726</span> +<span class="normal">1727</span> +<span class="normal">1728</span> +<span class="normal">1729</span> +<span class="normal">1730</span> +<span class="normal">1731</span> +<span class="normal">1732</span> +<span class="normal">1733</span> +<span class="normal">1734</span> +<span class="normal">1735</span> +<span class="normal">1736</span> +<span class="normal">1737</span> +<span class="normal">1738</span> +<span class="normal">1739</span> +<span class="normal">1740</span> +<span class="normal">1741</span> +<span class="normal">1742</span> +<span class="normal">1743</span> +<span class="normal">1744</span> +<span class="normal">1745</span> +<span class="normal">1746</span> +<span class="normal">1747</span> +<span class="normal">1748</span> +<span class="normal">1749</span> +<span class="normal">1750</span> +<span class="normal">1751</span> +<span class="normal">1752</span> +<span class="normal">1753</span> +<span class="normal">1754</span> +<span class="normal">1755</span> +<span class="normal">1756</span> +<span class="normal">1757</span> +<span class="normal">1758</span> +<span class="normal">1759</span> +<span class="normal">1760</span> +<span class="normal">1761</span> +<span class="normal">1762</span> +<span class="normal">1763</span> +<span class="normal">1764</span> +<span class="normal">1765</span> +<span class="normal">1766</span> +<span class="normal">1767</span> +<span class="normal">1768</span> +<span class="normal">1769</span> +<span class="normal">1770</span> +<span class="normal">1771</span> +<span class="normal">1772</span> +<span class="normal">1773</span> +<span class="normal">1774</span> +<span class="normal">1775</span> +<span class="normal">1776</span> +<span class="normal">1777</span> +<span class="normal">1778</span> +<span class="normal">1779</span> +<span class="normal">1780</span> +<span class="normal">1781</span> +<span class="normal">1782</span> +<span class="normal">1783</span> +<span class="normal">1784</span> +<span class="normal">1785</span> +<span class="normal">1786</span> +<span class="normal">1787</span> +<span class="normal">1788</span> +<span class="normal">1789</span> +<span class="normal">1790</span> +<span class="normal">1791</span> +<span class="normal">1792</span> +<span class="normal">1793</span> +<span class="normal">1794</span> +<span class="normal">1795</span> +<span class="normal">1796</span> +<span class="normal">1797</span> +<span class="normal">1798</span> +<span class="normal">1799</span> +<span class="normal">1800</span> +<span class="normal">1801</span> +<span class="normal">1802</span> +<span class="normal">1803</span> +<span class="normal">1804</span> +<span class="normal">1805</span> +<span class="normal">1806</span> +<span class="normal">1807</span> +<span class="normal">1808</span> +<span class="normal">1809</span> +<span class="normal">1810</span> +<span class="normal">1811</span> +<span class="normal">1812</span> +<span class="normal">1813</span> +<span class="normal">1814</span> +<span class="normal">1815</span> +<span class="normal">1816</span> +<span class="normal">1817</span> +<span class="normal">1818</span> +<span class="normal">1819</span> +<span class="normal">1820</span> +<span class="normal">1821</span> +<span class="normal">1822</span> +<span class="normal">1823</span> +<span class="normal">1824</span> +<span class="normal">1825</span> +<span class="normal">1826</span> +<span class="normal">1827</span> +<span class="normal">1828</span> +<span class="normal">1829</span> +<span class="normal">1830</span> +<span class="normal">1831</span> +<span class="normal">1832</span> +<span class="normal">1833</span> +<span class="normal">1834</span> +<span class="normal">1835</span> +<span class="normal">1836</span> +<span class="normal">1837</span> +<span class="normal">1838</span> +<span class="normal">1839</span> +<span class="normal">1840</span> +<span class="normal">1841</span> +<span class="normal">1842</span> +<span class="normal">1843</span> +<span class="normal">1844</span> +<span class="normal">1845</span> +<span class="normal">1846</span> +<span class="normal">1847</span> +<span class="normal">1848</span> +<span class="normal">1849</span> +<span class="normal">1850</span> +<span class="normal">1851</span> +<span class="normal">1852</span> +<span class="normal">1853</span> +<span class="normal">1854</span> +<span class="normal">1855</span> +<span class="normal">1856</span> +<span class="normal">1857</span> +<span class="normal">1858</span> +<span class="normal">1859</span> +<span class="normal">1860</span> +<span class="normal">1861</span> +<span class="normal">1862</span> +<span class="normal">1863</span> +<span class="normal">1864</span> +<span class="normal">1865</span> +<span class="normal">1866</span> +<span class="normal">1867</span> +<span class="normal">1868</span> +<span class="normal">1869</span> +<span class="normal">1870</span> +<span class="normal">1871</span> +<span class="normal">1872</span> +<span class="normal">1873</span> +<span class="normal">1874</span> +<span class="normal">1875</span> +<span class="normal">1876</span> +<span class="normal">1877</span> +<span class="normal">1878</span> +<span class="normal">1879</span> +<span class="normal">1880</span> +<span class="normal">1881</span> +<span class="normal">1882</span> +<span class="normal">1883</span> +<span class="normal">1884</span> +<span class="normal">1885</span> +<span class="normal">1886</span> +<span class="normal">1887</span> +<span class="normal">1888</span> +<span class="normal">1889</span> +<span class="normal">1890</span> +<span class="normal">1891</span> +<span class="normal">1892</span> +<span class="normal">1893</span> +<span class="normal">1894</span> +<span class="normal">1895</span> +<span class="normal">1896</span> +<span class="normal">1897</span> +<span class="normal">1898</span> +<span class="normal">1899</span> +<span class="normal">1900</span> +<span class="normal">1901</span> +<span class="normal">1902</span> +<span class="normal">1903</span> +<span class="normal">1904</span> +<span class="normal">1905</span> +<span class="normal">1906</span> +<span class="normal">1907</span> +<span class="normal">1908</span> +<span class="normal">1909</span> +<span class="normal">1910</span> +<span class="normal">1911</span> +<span class="normal">1912</span> +<span class="normal">1913</span> +<span class="normal">1914</span> +<span class="normal">1915</span> +<span class="normal">1916</span> +<span class="normal">1917</span> +<span class="normal">1918</span> +<span class="normal">1919</span> +<span class="normal">1920</span> +<span class="normal">1921</span> +<span class="normal">1922</span> +<span class="normal">1923</span> +<span class="normal">1924</span> +<span class="normal">1925</span> +<span class="normal">1926</span> +<span class="normal">1927</span> +<span class="normal">1928</span> +<span class="normal">1929</span> +<span class="normal">1930</span> +<span class="normal">1931</span> +<span class="normal">1932</span> +<span class="normal">1933</span> +<span class="normal">1934</span> +<span class="normal">1935</span> +<span class="normal">1936</span> +<span class="normal">1937</span> +<span class="normal">1938</span> +<span class="normal">1939</span> +<span class="normal">1940</span> +<span class="normal">1941</span> +<span class="normal">1942</span> +<span class="normal">1943</span> +<span class="normal">1944</span> +<span class="normal">1945</span> +<span class="normal">1946</span> +<span class="normal">1947</span> +<span class="normal">1948</span> +<span class="normal">1949</span> +<span class="normal">1950</span> +<span class="normal">1951</span> +<span class="normal">1952</span> +<span class="normal">1953</span> +<span class="normal">1954</span> +<span class="normal">1955</span> +<span class="normal">1956</span> +<span class="normal">1957</span> +<span class="normal">1958</span> +<span class="normal">1959</span> +<span class="normal">1960</span> +<span class="normal">1961</span> +<span class="normal">1962</span> +<span class="normal">1963</span> +<span class="normal">1964</span> +<span class="normal">1965</span> +<span class="normal">1966</span> +<span class="normal">1967</span> +<span class="normal">1968</span> +<span class="normal">1969</span> +<span class="normal">1970</span> +<span class="normal">1971</span> +<span class="normal">1972</span> +<span class="normal">1973</span> +<span class="normal">1974</span> +<span class="normal">1975</span> +<span class="normal">1976</span> +<span class="normal">1977</span> +<span class="normal">1978</span> +<span class="normal">1979</span> +<span class="normal">1980</span> +<span class="normal">1981</span> +<span class="normal">1982</span> +<span class="normal">1983</span> +<span class="normal">1984</span> +<span class="normal">1985</span> +<span class="normal">1986</span> +<span class="normal">1987</span> +<span class="normal">1988</span> +<span class="normal">1989</span> +<span class="normal">1990</span> +<span class="normal">1991</span> +<span class="normal">1992</span> +<span class="normal">1993</span> +<span class="normal">1994</span> +<span class="normal">1995</span> +<span class="normal">1996</span> +<span class="normal">1997</span> +<span class="normal">1998</span> +<span class="normal">1999</span> +<span class="normal">2000</span> +<span class="normal">2001</span> +<span class="normal">2002</span> +<span class="normal">2003</span> +<span class="normal">2004</span> +<span class="normal">2005</span> +<span class="normal">2006</span> +<span class="normal">2007</span> +<span class="normal">2008</span> +<span class="normal">2009</span> +<span class="normal">2010</span> +<span class="normal">2011</span> +<span class="normal">2012</span> +<span class="normal">2013</span> +<span class="normal">2014</span> +<span class="normal">2015</span> +<span class="normal">2016</span> +<span class="normal">2017</span> +<span class="normal">2018</span> +<span class="normal">2019</span> +<span class="normal">2020</span> +<span class="normal">2021</span> +<span class="normal">2022</span> +<span class="normal">2023</span> +<span class="normal">2024</span> +<span class="normal">2025</span> +<span class="normal">2026</span> +<span class="normal">2027</span> +<span class="normal">2028</span> +<span class="normal">2029</span> +<span class="normal">2030</span> +<span class="normal">2031</span> +<span class="normal">2032</span> +<span class="normal">2033</span> +<span class="normal">2034</span> +<span class="normal">2035</span> +<span class="normal">2036</span> +<span class="normal">2037</span> +<span class="normal">2038</span> +<span class="normal">2039</span> +<span class="normal">2040</span> +<span class="normal">2041</span> +<span class="normal">2042</span> +<span class="normal">2043</span> +<span class="normal">2044</span> +<span class="normal">2045</span> +<span class="normal">2046</span> +<span class="normal">2047</span> +<span class="normal">2048</span> +<span class="normal">2049</span> +<span class="normal">2050</span> +<span class="normal">2051</span> +<span class="normal">2052</span> +<span class="normal">2053</span> +<span class="normal">2054</span> +<span class="normal">2055</span> +<span class="normal">2056</span> +<span class="normal">2057</span> +<span class="normal">2058</span> +<span class="normal">2059</span> +<span class="normal">2060</span> +<span class="normal">2061</span> +<span class="normal">2062</span> +<span class="normal">2063</span> +<span class="normal">2064</span> +<span class="normal">2065</span> +<span class="normal">2066</span> +<span class="normal">2067</span> +<span class="normal">2068</span> +<span class="normal">2069</span> +<span class="normal">2070</span> +<span class="normal">2071</span> +<span class="normal">2072</span> +<span class="normal">2073</span> +<span class="normal">2074</span> +<span class="normal">2075</span> +<span class="normal">2076</span> +<span class="normal">2077</span> +<span class="normal">2078</span> +<span class="normal">2079</span> +<span class="normal">2080</span> +<span class="normal">2081</span> +<span class="normal">2082</span> +<span class="normal">2083</span> +<span class="normal">2084</span> +<span class="normal">2085</span> +<span class="normal">2086</span> +<span class="normal">2087</span> +<span class="normal">2088</span> +<span class="normal">2089</span> +<span class="normal">2090</span> +<span class="normal">2091</span> +<span class="normal">2092</span> +<span class="normal">2093</span> +<span class="normal">2094</span> +<span class="normal">2095</span> +<span class="normal">2096</span> +<span class="normal">2097</span> +<span class="normal">2098</span> +<span class="normal">2099</span> +<span class="normal">2100</span> +<span class="normal">2101</span> +<span class="normal">2102</span> +<span class="normal">2103</span> +<span class="normal">2104</span> +<span class="normal">2105</span> +<span class="normal">2106</span> +<span class="normal">2107</span> +<span class="normal">2108</span> +<span class="normal">2109</span> +<span class="normal">2110</span> +<span class="normal">2111</span> +<span class="normal">2112</span> +<span class="normal">2113</span> +<span class="normal">2114</span> +<span class="normal">2115</span> +<span class="normal">2116</span> +<span class="normal">2117</span> +<span class="normal">2118</span> +<span class="normal">2119</span> +<span class="normal">2120</span> +<span class="normal">2121</span> +<span class="normal">2122</span> +<span class="normal">2123</span> +<span class="normal">2124</span> +<span class="normal">2125</span> +<span class="normal">2126</span> +<span class="normal">2127</span> +<span class="normal">2128</span> +<span class="normal">2129</span> +<span class="normal">2130</span> +<span class="normal">2131</span> +<span class="normal">2132</span> +<span class="normal">2133</span> +<span class="normal">2134</span> +<span class="normal">2135</span> +<span class="normal">2136</span> +<span class="normal">2137</span> +<span class="normal">2138</span> +<span class="normal">2139</span> +<span class="normal">2140</span> +<span class="normal">2141</span> +<span class="normal">2142</span> +<span class="normal">2143</span> +<span class="normal">2144</span> +<span class="normal">2145</span> +<span class="normal">2146</span> +<span class="normal">2147</span> +<span class="normal">2148</span> +<span class="normal">2149</span> +<span class="normal">2150</span> +<span class="normal">2151</span> +<span class="normal">2152</span> +<span class="normal">2153</span> +<span class="normal">2154</span> +<span class="normal">2155</span> +<span class="normal">2156</span> +<span class="normal">2157</span> +<span class="normal">2158</span> +<span class="normal">2159</span> +<span class="normal">2160</span> +<span class="normal">2161</span> +<span class="normal">2162</span> +<span class="normal">2163</span> +<span class="normal">2164</span> +<span class="normal">2165</span> +<span class="normal">2166</span> +<span class="normal">2167</span> +<span class="normal">2168</span> +<span class="normal">2169</span> +<span class="normal">2170</span> +<span class="normal">2171</span> +<span class="normal">2172</span> +<span class="normal">2173</span> +<span class="normal">2174</span> +<span class="normal">2175</span> +<span class="normal">2176</span> +<span class="normal">2177</span> +<span class="normal">2178</span> +<span class="normal">2179</span> +<span class="normal">2180</span> +<span class="normal">2181</span> +<span class="normal">2182</span> +<span class="normal">2183</span> +<span class="normal">2184</span> +<span class="normal">2185</span> +<span class="normal">2186</span> +<span class="normal">2187</span> +<span class="normal">2188</span> +<span class="normal">2189</span> +<span class="normal">2190</span> +<span class="normal">2191</span> +<span class="normal">2192</span> +<span class="normal">2193</span> +<span class="normal">2194</span> +<span class="normal">2195</span> +<span class="normal">2196</span> +<span class="normal">2197</span> +<span class="normal">2198</span> +<span class="normal">2199</span> +<span class="normal">2200</span> +<span class="normal">2201</span> +<span class="normal">2202</span> +<span class="normal">2203</span> +<span class="normal">2204</span> +<span class="normal">2205</span> +<span class="normal">2206</span> +<span class="normal">2207</span> +<span class="normal">2208</span> +<span class="normal">2209</span> +<span class="normal">2210</span> +<span class="normal">2211</span> +<span class="normal">2212</span> +<span class="normal">2213</span> +<span class="normal">2214</span> +<span class="normal">2215</span> +<span class="normal">2216</span> +<span class="normal">2217</span> +<span class="normal">2218</span> +<span class="normal">2219</span> +<span class="normal">2220</span> +<span class="normal">2221</span> +<span class="normal">2222</span> +<span class="normal">2223</span> +<span class="normal">2224</span> +<span class="normal">2225</span> +<span class="normal">2226</span> +<span class="normal">2227</span> +<span class="normal">2228</span> +<span class="normal">2229</span> +<span class="normal">2230</span> +<span class="normal">2231</span> +<span class="normal">2232</span> +<span class="normal">2233</span> +<span class="normal">2234</span> +<span class="normal">2235</span> +<span class="normal">2236</span> +<span class="normal">2237</span> +<span class="normal">2238</span> +<span class="normal">2239</span> +<span class="normal">2240</span> +<span class="normal">2241</span> +<span class="normal">2242</span> +<span class="normal">2243</span> +<span class="normal">2244</span> +<span class="normal">2245</span> +<span class="normal">2246</span> +<span class="normal">2247</span> +<span class="normal">2248</span> +<span class="normal">2249</span> +<span class="normal">2250</span> +<span class="normal">2251</span> +<span class="normal">2252</span> +<span class="normal">2253</span> +<span class="normal">2254</span> +<span class="normal">2255</span> +<span class="normal">2256</span> +<span class="normal">2257</span> +<span class="normal">2258</span> +<span class="normal">2259</span> +<span class="normal">2260</span> +<span class="normal">2261</span> +<span class="normal">2262</span> +<span class="normal">2263</span> +<span class="normal">2264</span> +<span class="normal">2265</span> +<span class="normal">2266</span> +<span class="normal">2267</span> +<span class="normal">2268</span> +<span class="normal">2269</span> +<span class="normal">2270</span> +<span class="normal">2271</span> +<span class="normal">2272</span> +<span class="normal">2273</span> +<span class="normal">2274</span> +<span class="normal">2275</span> +<span class="normal">2276</span> +<span class="normal">2277</span> +<span class="normal">2278</span> +<span class="normal">2279</span> +<span class="normal">2280</span> +<span class="normal">2281</span> +<span class="normal">2282</span> +<span class="normal">2283</span> +<span class="normal">2284</span> +<span class="normal">2285</span> +<span class="normal">2286</span> +<span class="normal">2287</span> +<span class="normal">2288</span> +<span class="normal">2289</span> +<span class="normal">2290</span> +<span class="normal">2291</span> +<span class="normal">2292</span> +<span class="normal">2293</span> +<span class="normal">2294</span> +<span class="normal">2295</span> +<span class="normal">2296</span> +<span class="normal">2297</span> +<span class="normal">2298</span> +<span class="normal">2299</span> +<span class="normal">2300</span> +<span class="normal">2301</span> +<span class="normal">2302</span> +<span class="normal">2303</span> +<span class="normal">2304</span> +<span class="normal">2305</span> +<span class="normal">2306</span> +<span class="normal">2307</span> +<span class="normal">2308</span> +<span class="normal">2309</span> +<span class="normal">2310</span> +<span class="normal">2311</span> +<span class="normal">2312</span> +<span class="normal">2313</span> +<span class="normal">2314</span> +<span class="normal">2315</span> +<span class="normal">2316</span> +<span class="normal">2317</span> +<span class="normal">2318</span> +<span class="normal">2319</span> +<span class="normal">2320</span> +<span class="normal">2321</span> +<span class="normal">2322</span> +<span class="normal">2323</span> +<span class="normal">2324</span> +<span class="normal">2325</span> +<span class="normal">2326</span> +<span class="normal">2327</span> +<span class="normal">2328</span> +<span class="normal">2329</span> +<span class="normal">2330</span> +<span class="normal">2331</span> +<span class="normal">2332</span> +<span class="normal">2333</span> +<span class="normal">2334</span> +<span class="normal">2335</span> +<span class="normal">2336</span> +<span class="normal">2337</span> +<span class="normal">2338</span> +<span class="normal">2339</span> +<span class="normal">2340</span> +<span class="normal">2341</span> +<span class="normal">2342</span> +<span class="normal">2343</span> +<span class="normal">2344</span> +<span class="normal">2345</span> +<span class="normal">2346</span> +<span class="normal">2347</span> +<span class="normal">2348</span> +<span class="normal">2349</span> +<span class="normal">2350</span> +<span class="normal">2351</span> +<span class="normal">2352</span> +<span class="normal">2353</span> +<span class="normal">2354</span> +<span class="normal">2355</span> +<span class="normal">2356</span> +<span class="normal">2357</span> +<span class="normal">2358</span> +<span class="normal">2359</span> +<span class="normal">2360</span> +<span class="normal">2361</span> +<span class="normal">2362</span> +<span class="normal">2363</span> +<span class="normal">2364</span> +<span class="normal">2365</span> +<span class="normal">2366</span> +<span class="normal">2367</span> +<span class="normal">2368</span> +<span class="normal">2369</span> +<span class="normal">2370</span> +<span class="normal">2371</span> +<span class="normal">2372</span> +<span class="normal">2373</span> +<span class="normal">2374</span> +<span class="normal">2375</span> +<span class="normal">2376</span> +<span class="normal">2377</span> +<span class="normal">2378</span> +<span class="normal">2379</span> +<span class="normal">2380</span> +<span class="normal">2381</span> +<span class="normal">2382</span> +<span class="normal">2383</span> +<span class="normal">2384</span> +<span class="normal">2385</span> +<span class="normal">2386</span> +<span class="normal">2387</span> +<span class="normal">2388</span> +<span class="normal">2389</span> +<span class="normal">2390</span> +<span class="normal">2391</span> +<span class="normal">2392</span> +<span class="normal">2393</span> +<span class="normal">2394</span> +<span class="normal">2395</span> +<span class="normal">2396</span> +<span class="normal">2397</span> +<span class="normal">2398</span> +<span class="normal">2399</span> +<span class="normal">2400</span> +<span class="normal">2401</span> +<span class="normal">2402</span> +<span class="normal">2403</span> +<span class="normal">2404</span> +<span class="normal">2405</span> +<span class="normal">2406</span> +<span class="normal">2407</span> +<span class="normal">2408</span> +<span class="normal">2409</span> +<span class="normal">2410</span> +<span class="normal">2411</span> +<span class="normal">2412</span> +<span class="normal">2413</span> +<span class="normal">2414</span> +<span class="normal">2415</span> +<span class="normal">2416</span> +<span class="normal">2417</span> +<span class="normal">2418</span> +<span class="normal">2419</span> +<span class="normal">2420</span> +<span class="normal">2421</span> +<span class="normal">2422</span> +<span class="normal">2423</span> +<span class="normal">2424</span> +<span class="normal">2425</span> +<span class="normal">2426</span> +<span class="normal">2427</span> +<span class="normal">2428</span> +<span class="normal">2429</span> +<span class="normal">2430</span> +<span class="normal">2431</span> +<span class="normal">2432</span> +<span class="normal">2433</span> +<span class="normal">2434</span> +<span class="normal">2435</span> +<span class="normal">2436</span> +<span class="normal">2437</span> +<span class="normal">2438</span> +<span class="normal">2439</span> +<span class="normal">2440</span> +<span class="normal">2441</span> +<span class="normal">2442</span> +<span class="normal">2443</span> +<span class="normal">2444</span> +<span class="normal">2445</span> +<span class="normal">2446</span> +<span class="normal">2447</span> +<span class="normal">2448</span> +<span class="normal">2449</span> +<span class="normal">2450</span> +<span class="normal">2451</span> +<span class="normal">2452</span> +<span class="normal">2453</span> +<span class="normal">2454</span> +<span class="normal">2455</span> +<span class="normal">2456</span> +<span class="normal">2457</span> +<span class="normal">2458</span> +<span class="normal">2459</span> +<span class="normal">2460</span> +<span class="normal">2461</span> +<span class="normal">2462</span> +<span class="normal">2463</span> +<span class="normal">2464</span> +<span class="normal">2465</span> +<span class="normal">2466</span> +<span class="normal">2467</span> +<span class="normal">2468</span> +<span class="normal">2469</span> +<span class="normal">2470</span> +<span class="normal">2471</span> +<span class="normal">2472</span> +<span class="normal">2473</span> +<span class="normal">2474</span> +<span class="normal">2475</span> +<span class="normal">2476</span> +<span class="normal">2477</span> +<span class="normal">2478</span> +<span class="normal">2479</span> +<span class="normal">2480</span> +<span class="normal">2481</span> +<span class="normal">2482</span> +<span class="normal">2483</span> +<span class="normal">2484</span> +<span class="normal">2485</span> +<span class="normal">2486</span> +<span class="normal">2487</span> +<span class="normal">2488</span> +<span class="normal">2489</span> +<span class="normal">2490</span> +<span class="normal">2491</span> +<span class="normal">2492</span> +<span class="normal">2493</span> +<span class="normal">2494</span> +<span class="normal">2495</span> +<span class="normal">2496</span> +<span class="normal">2497</span> +<span class="normal">2498</span> +<span class="normal">2499</span> +<span class="normal">2500</span> +<span class="normal">2501</span> +<span class="normal">2502</span> +<span class="normal">2503</span> +<span class="normal">2504</span> +<span class="normal">2505</span> +<span class="normal">2506</span> +<span class="normal">2507</span> +<span class="normal">2508</span> +<span class="normal">2509</span> +<span class="normal">2510</span> +<span class="normal">2511</span> +<span class="normal">2512</span> +<span class="normal">2513</span> +<span class="normal">2514</span> +<span class="normal">2515</span> +<span class="normal">2516</span> +<span class="normal">2517</span> +<span class="normal">2518</span> +<span class="normal">2519</span> +<span class="normal">2520</span> +<span class="normal">2521</span> +<span class="normal">2522</span> +<span class="normal">2523</span> +<span class="normal">2524</span> +<span class="normal">2525</span> +<span class="normal">2526</span> +<span class="normal">2527</span> +<span class="normal">2528</span> +<span class="normal">2529</span> +<span class="normal">2530</span> +<span class="normal">2531</span> +<span class="normal">2532</span> +<span class="normal">2533</span> +<span class="normal">2534</span> +<span class="normal">2535</span> +<span class="normal">2536</span> +<span class="normal">2537</span> +<span class="normal">2538</span> +<span class="normal">2539</span> +<span class="normal">2540</span> +<span class="normal">2541</span> +<span class="normal">2542</span> +<span class="normal">2543</span> +<span class="normal">2544</span> +<span class="normal">2545</span> +<span class="normal">2546</span> +<span class="normal">2547</span> +<span class="normal">2548</span> +<span class="normal">2549</span> +<span class="normal">2550</span> +<span class="normal">2551</span> +<span class="normal">2552</span> +<span class="normal">2553</span> +<span class="normal">2554</span> +<span class="normal">2555</span> +<span class="normal">2556</span> +<span class="normal">2557</span> +<span class="normal">2558</span> +<span class="normal">2559</span> +<span class="normal">2560</span> +<span class="normal">2561</span> +<span class="normal">2562</span> +<span class="normal">2563</span> +<span class="normal">2564</span> +<span class="normal">2565</span> +<span class="normal">2566</span> +<span class="normal">2567</span> +<span class="normal">2568</span> +<span class="normal">2569</span> +<span class="normal">2570</span> +<span class="normal">2571</span> +<span class="normal">2572</span> +<span class="normal">2573</span> +<span class="normal">2574</span> +<span class="normal">2575</span> +<span class="normal">2576</span> +<span class="normal">2577</span> +<span class="normal">2578</span> +<span class="normal">2579</span> +<span class="normal">2580</span> +<span class="normal">2581</span> +<span class="normal">2582</span> +<span class="normal">2583</span> +<span class="normal">2584</span> +<span class="normal">2585</span> +<span class="normal">2586</span> +<span class="normal">2587</span> +<span class="normal">2588</span> +<span class="normal">2589</span> +<span class="normal">2590</span> +<span class="normal">2591</span> +<span class="normal">2592</span> +<span class="normal">2593</span> +<span class="normal">2594</span> +<span class="normal">2595</span> +<span class="normal">2596</span> +<span class="normal">2597</span> +<span class="normal">2598</span> +<span class="normal">2599</span> +<span class="normal">2600</span> +<span class="normal">2601</span> +<span class="normal">2602</span> +<span class="normal">2603</span> +<span class="normal">2604</span> +<span class="normal">2605</span> +<span class="normal">2606</span> +<span class="normal">2607</span> +<span class="normal">2608</span> +<span class="normal">2609</span> +<span class="normal">2610</span> +<span class="normal">2611</span> +<span class="normal">2612</span> +<span class="normal">2613</span> +<span class="normal">2614</span> +<span class="normal">2615</span> +<span class="normal">2616</span> +<span class="normal">2617</span> +<span class="normal">2618</span> +<span class="normal">2619</span> +<span class="normal">2620</span> +<span class="normal">2621</span> +<span class="normal">2622</span> +<span class="normal">2623</span> +<span class="normal">2624</span> +<span class="normal">2625</span> +<span class="normal">2626</span> +<span class="normal">2627</span> +<span class="normal">2628</span> +<span class="normal">2629</span> +<span class="normal">2630</span> +<span class="normal">2631</span> +<span class="normal">2632</span> +<span class="normal">2633</span> +<span class="normal">2634</span> +<span class="normal">2635</span> +<span class="normal">2636</span> +<span class="normal">2637</span> +<span class="normal">2638</span> +<span class="normal">2639</span> +<span class="normal">2640</span> +<span class="normal">2641</span> +<span class="normal">2642</span> +<span class="normal">2643</span> +<span class="normal">2644</span> +<span class="normal">2645</span> +<span class="normal">2646</span> +<span class="normal">2647</span> +<span class="normal">2648</span> +<span class="normal">2649</span> +<span class="normal">2650</span> +<span class="normal">2651</span> +<span class="normal">2652</span> +<span class="normal">2653</span> +<span class="normal">2654</span> +<span class="normal">2655</span> +<span class="normal">2656</span> +<span class="normal">2657</span> +<span class="normal">2658</span> +<span class="normal">2659</span> +<span class="normal">2660</span> +<span class="normal">2661</span> +<span class="normal">2662</span> +<span class="normal">2663</span> +<span class="normal">2664</span> +<span class="normal">2665</span> +<span class="normal">2666</span> +<span class="normal">2667</span> +<span class="normal">2668</span> +<span class="normal">2669</span> +<span class="normal">2670</span> +<span class="normal">2671</span> +<span class="normal">2672</span> +<span class="normal">2673</span> +<span class="normal">2674</span> +<span class="normal">2675</span> +<span class="normal">2676</span> +<span class="normal">2677</span> +<span class="normal">2678</span> +<span class="normal">2679</span> +<span class="normal">2680</span> +<span class="normal">2681</span> +<span class="normal">2682</span> +<span class="normal">2683</span> +<span class="normal">2684</span> +<span class="normal">2685</span> +<span class="normal">2686</span> +<span class="normal">2687</span> +<span class="normal">2688</span> +<span class="normal">2689</span> +<span class="normal">2690</span> +<span class="normal">2691</span> +<span class="normal">2692</span> +<span class="normal">2693</span> +<span class="normal">2694</span> +<span class="normal">2695</span> +<span class="normal">2696</span> +<span class="normal">2697</span> +<span class="normal">2698</span> +<span class="normal">2699</span> +<span class="normal">2700</span> +<span class="normal">2701</span> +<span class="normal">2702</span> +<span class="normal">2703</span> +<span class="normal">2704</span> +<span class="normal">2705</span> +<span class="normal">2706</span> +<span class="normal">2707</span> +<span class="normal">2708</span> +<span class="normal">2709</span> +<span class="normal">2710</span> +<span class="normal">2711</span> +<span class="normal">2712</span> +<span class="normal">2713</span> +<span class="normal">2714</span> +<span class="normal">2715</span> +<span class="normal">2716</span> +<span class="normal">2717</span> +<span class="normal">2718</span> +<span class="normal">2719</span> +<span class="normal">2720</span> +<span class="normal">2721</span> +<span class="normal">2722</span> +<span class="normal">2723</span> +<span class="normal">2724</span> +<span class="normal">2725</span> +<span class="normal">2726</span> +<span class="normal">2727</span> +<span class="normal">2728</span> +<span class="normal">2729</span> +<span class="normal">2730</span> +<span class="normal">2731</span> +<span class="normal">2732</span> +<span class="normal">2733</span> +<span class="normal">2734</span> +<span class="normal">2735</span> +<span class="normal">2736</span> +<span class="normal">2737</span> +<span class="normal">2738</span> +<span class="normal">2739</span> +<span class="normal">2740</span> +<span class="normal">2741</span> +<span class="normal">2742</span> +<span class="normal">2743</span> +<span class="normal">2744</span> +<span class="normal">2745</span> +<span class="normal">2746</span> +<span class="normal">2747</span> +<span class="normal">2748</span> +<span class="normal">2749</span> +<span class="normal">2750</span> +<span class="normal">2751</span> +<span class="normal">2752</span> +<span class="normal">2753</span> +<span class="normal">2754</span> +<span class="normal">2755</span> +<span class="normal">2756</span> +<span class="normal">2757</span> +<span class="normal">2758</span> +<span class="normal">2759</span> +<span class="normal">2760</span> +<span class="normal">2761</span> +<span class="normal">2762</span> +<span class="normal">2763</span> +<span class="normal">2764</span> +<span class="normal">2765</span> +<span class="normal">2766</span> +<span class="normal">2767</span> +<span class="normal">2768</span> +<span class="normal">2769</span> +<span class="normal">2770</span> +<span class="normal">2771</span> +<span class="normal">2772</span> +<span class="normal">2773</span> +<span class="normal">2774</span> +<span class="normal">2775</span> +<span class="normal">2776</span> +<span class="normal">2777</span> +<span class="normal">2778</span> +<span class="normal">2779</span> +<span class="normal">2780</span> +<span class="normal">2781</span> +<span class="normal">2782</span> +<span class="normal">2783</span> +<span class="normal">2784</span> +<span class="normal">2785</span> +<span class="normal">2786</span> +<span class="normal">2787</span> +<span class="normal">2788</span> +<span class="normal">2789</span> +<span class="normal">2790</span> +<span class="normal">2791</span> +<span class="normal">2792</span> +<span class="normal">2793</span> +<span class="normal">2794</span> +<span class="normal">2795</span> +<span class="normal">2796</span> +<span class="normal">2797</span> +<span class="normal">2798</span> +<span class="normal">2799</span> +<span class="normal">2800</span> +<span class="normal">2801</span> +<span class="normal">2802</span> +<span class="normal">2803</span> +<span class="normal">2804</span> +<span class="normal">2805</span> +<span class="normal">2806</span> +<span class="normal">2807</span> +<span class="normal">2808</span> +<span class="normal">2809</span> +<span class="normal">2810</span> +<span class="normal">2811</span> +<span class="normal">2812</span> +<span class="normal">2813</span> +<span class="normal">2814</span> +<span class="normal">2815</span> +<span class="normal">2816</span> +<span class="normal">2817</span> +<span class="normal">2818</span> +<span class="normal">2819</span> +<span class="normal">2820</span> +<span class="normal">2821</span> +<span class="normal">2822</span> +<span class="normal">2823</span> +<span class="normal">2824</span> +<span class="normal">2825</span> +<span class="normal">2826</span> +<span class="normal">2827</span> +<span class="normal">2828</span> +<span class="normal">2829</span> +<span class="normal">2830</span> +<span class="normal">2831</span> +<span class="normal">2832</span> +<span class="normal">2833</span> +<span class="normal">2834</span> +<span class="normal">2835</span> +<span class="normal">2836</span> +<span class="normal">2837</span> +<span class="normal">2838</span> +<span class="normal">2839</span> +<span class="normal">2840</span> +<span class="normal">2841</span> +<span class="normal">2842</span> +<span class="normal">2843</span> +<span class="normal">2844</span> +<span class="normal">2845</span> +<span class="normal">2846</span> +<span class="normal">2847</span> +<span class="normal">2848</span> +<span class="normal">2849</span> +<span class="normal">2850</span> +<span class="normal">2851</span> +<span class="normal">2852</span> +<span class="normal">2853</span> +<span class="normal">2854</span> +<span class="normal">2855</span> +<span class="normal">2856</span> +<span class="normal">2857</span> +<span class="normal">2858</span> +<span class="normal">2859</span> +<span class="normal">2860</span> +<span class="normal">2861</span> +<span class="normal">2862</span> +<span class="normal">2863</span> +<span class="normal">2864</span> +<span class="normal">2865</span> +<span class="normal">2866</span> +<span class="normal">2867</span> +<span class="normal">2868</span> +<span class="normal">2869</span> +<span class="normal">2870</span> +<span class="normal">2871</span> +<span class="normal">2872</span> +<span class="normal">2873</span> +<span class="normal">2874</span> +<span class="normal">2875</span> +<span class="normal">2876</span> +<span class="normal">2877</span> +<span class="normal">2878</span> +<span class="normal">2879</span> +<span class="normal">2880</span> +<span class="normal">2881</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2005-2006 Emmanuele Bassi <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cm">/**</span> +<a id="line-21" name="line-21"></a><span class="cm"> * SECTION:gdict-defbox</span> +<a id="line-22" name="line-22"></a><span class="cm"> * @short_description: Display the list of definitions for a word</span> +<a id="line-23" name="line-23"></a><span class="cm"> *</span> +<a id="line-24" name="line-24"></a><span class="cm"> * The #GdictDefbox widget is a composite widget showing the list of</span> +<a id="line-25" name="line-25"></a><span class="cm"> * definitions for a word. It queries the passed #GdictContext and displays</span> +<a id="line-26" name="line-26"></a><span class="cm"> * the list of #GdictDefinition<!-- -->s obtained.</span> +<a id="line-27" name="line-27"></a><span class="cm"> *</span> +<a id="line-28" name="line-28"></a><span class="cm"> * It provides syntax highlighting, clickable links and an embedded find</span> +<a id="line-29" name="line-29"></a><span class="cm"> * bar.</span> +<a id="line-30" name="line-30"></a><span class="cm"> */</span> +<a id="line-31" name="line-31"></a> +<a id="line-32" name="line-32"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#endif</span> +<a id="line-35" name="line-35"></a> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdarg.h></span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-42" name="line-42"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkkeysyms.h></span> +<a id="line-43" name="line-43"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n-lib.h></span> +<a id="line-44" name="line-44"></a> +<a id="line-45" name="line-45"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-defbox.h"</span> +<a id="line-46" name="line-46"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-utils.h"</span> +<a id="line-47" name="line-47"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-debug.h"</span> +<a id="line-48" name="line-48"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-private.h"</span> +<a id="line-49" name="line-49"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-enum-types.h"</span> +<a id="line-50" name="line-50"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-marshal.h"</span> +<a id="line-51" name="line-51"></a> +<a id="line-52" name="line-52"></a><span class="cp">#define QUERY_MARGIN 48</span> +<a id="line-53" name="line-53"></a><span class="cp">#define ERROR_MARGIN 24</span> +<a id="line-54" name="line-54"></a> +<a id="line-55" name="line-55"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span> +<a id="line-56" name="line-56"></a><span class="p">{</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="n">GdictDefinition</span><span class="w"> </span><span class="o">*</span><span class="n">definition</span><span class="p">;</span> +<a id="line-58" name="line-58"></a> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">begin</span><span class="p">;</span> +<a id="line-60" name="line-60"></a><span class="p">}</span><span class="w"> </span><span class="n">Definition</span><span class="p">;</span> +<a id="line-61" name="line-61"></a> +<a id="line-62" name="line-62"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_GdictDefboxPrivate</span> +<a id="line-63" name="line-63"></a><span class="p">{</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">text_view</span><span class="p">;</span> +<a id="line-65" name="line-65"></a> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="cm">/* the "find" pane */</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">find_pane</span><span class="p">;</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">find_entry</span><span class="p">;</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">find_next</span><span class="p">;</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">find_prev</span><span class="p">;</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">find_label</span><span class="p">;</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">progress_dialog</span><span class="p">;</span> +<a id="line-74" name="line-74"></a> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-76" name="line-76"></a> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">definitions</span><span class="p">;</span> +<a id="line-79" name="line-79"></a> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">;</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">;</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">font_name</span><span class="p">;</span> +<a id="line-83" name="line-83"></a> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">show_find</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">is_searching</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">is_hovering</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-87" name="line-87"></a> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">GdkCursor</span><span class="w"> </span><span class="o">*</span><span class="n">busy_cursor</span><span class="p">;</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">GdkCursor</span><span class="w"> </span><span class="o">*</span><span class="n">hand_cursor</span><span class="p">;</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">GdkCursor</span><span class="w"> </span><span class="o">*</span><span class="n">regular_cursor</span><span class="p">;</span> +<a id="line-91" name="line-91"></a> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">start_id</span><span class="p">;</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">end_id</span><span class="p">;</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">define_id</span><span class="p">;</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">error_id</span><span class="p">;</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">hide_timeout</span><span class="p">;</span> +<a id="line-97" name="line-97"></a> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">link_tag</span><span class="p">;</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">visited_link_tag</span><span class="p">;</span> +<a id="line-100" name="line-100"></a><span class="p">};</span> +<a id="line-101" name="line-101"></a> +<a id="line-102" name="line-102"></a><span class="k">enum</span> +<a id="line-103" name="line-103"></a><span class="p">{</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">PROP_0</span><span class="p">,</span> +<a id="line-105" name="line-105"></a> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">PROP_CONTEXT</span><span class="p">,</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">PROP_WORD</span><span class="p">,</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">PROP_DATABASE</span><span class="p">,</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">PROP_FONT_NAME</span><span class="p">,</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">PROP_COUNT</span> +<a id="line-111" name="line-111"></a><span class="p">};</span> +<a id="line-112" name="line-112"></a> +<a id="line-113" name="line-113"></a><span class="k">enum</span> +<a id="line-114" name="line-114"></a><span class="p">{</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="n">SHOW_FIND</span><span class="p">,</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="n">HIDE_FIND</span><span class="p">,</span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="n">FIND_NEXT</span><span class="p">,</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">FIND_PREVIOUS</span><span class="p">,</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">LINK_CLICKED</span><span class="p">,</span> +<a id="line-120" name="line-120"></a> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-122" name="line-122"></a><span class="p">};</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">gdict_defbox_signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-125" name="line-125"></a> +<a id="line-126" name="line-126"></a><span class="hll"><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_defbox</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_BOX</span><span class="p">)</span><span class="error2"><--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</span> +</span><a id="line-127" name="line-127"></a> +<a id="line-128" name="line-128"></a><span class="k">static</span><span class="w"> </span><span class="n">Definition</span><span class="w"> </span><span class="o">*</span> +<a id="line-129" name="line-129"></a><span class="n">definition_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-130" name="line-130"></a><span class="p">{</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">Definition</span><span class="w"> </span><span class="o">*</span><span class="n">def</span><span class="p">;</span> +<a id="line-132" name="line-132"></a> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">def</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new</span><span class="w"> </span><span class="p">(</span><span class="n">Definition</span><span class="p">);</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">begin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-136" name="line-136"></a> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">def</span><span class="p">;</span> +<a id="line-138" name="line-138"></a><span class="p">}</span> +<a id="line-139" name="line-139"></a> +<a id="line-140" name="line-140"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-141" name="line-141"></a><span class="n">definition_free</span><span class="w"> </span><span class="p">(</span><span class="n">Definition</span><span class="w"> </span><span class="o">*</span><span class="n">def</span><span class="p">)</span> +<a id="line-142" name="line-142"></a><span class="p">{</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">def</span><span class="p">)</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-145" name="line-145"></a> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">gdict_definition_unref</span><span class="w"> </span><span class="p">(</span><span class="n">def</span><span class="o">-></span><span class="n">definition</span><span class="p">);</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">Definition</span><span class="p">,</span><span class="w"> </span><span class="n">def</span><span class="p">);</span> +<a id="line-148" name="line-148"></a><span class="p">}</span> +<a id="line-149" name="line-149"></a> +<a id="line-150" name="line-150"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-151" name="line-151"></a><span class="n">gdict_defbox_dispose</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">gobject</span><span class="p">)</span> +<a id="line-152" name="line-152"></a><span class="p">{</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-155" name="line-155"></a> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="p">)</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="p">{</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="p">);</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">end_id</span><span class="p">);</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">define_id</span><span class="p">);</span> +<a id="line-161" name="line-161"></a> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">end_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">define_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="p">}</span> +<a id="line-166" name="line-166"></a> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="p">)</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="p">{</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="p">);</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="p">}</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="p">{</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="p">}</span> +<a id="line-178" name="line-178"></a> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">)</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="p">{</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">);</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="p">}</span> +<a id="line-184" name="line-184"></a> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">)</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="p">{</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">);</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="p">}</span> +<a id="line-190" name="line-190"></a> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hand_cursor</span><span class="p">)</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="p">{</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hand_cursor</span><span class="p">);</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hand_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="p">}</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">regular_cursor</span><span class="p">)</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="p">{</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">regular_cursor</span><span class="p">);</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">regular_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="p">}</span> +<a id="line-202" name="line-202"></a> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">g_clear_pointer</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="n">g_free</span><span class="p">);</span> +<a id="line-204" name="line-204"></a> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_defbox_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">dispose</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-206" name="line-206"></a><span class="p">}</span> +<a id="line-207" name="line-207"></a> +<a id="line-208" name="line-208"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-209" name="line-209"></a><span class="n">gdict_defbox_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-210" name="line-210"></a><span class="p">{</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-213" name="line-213"></a> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">font_name</span><span class="p">);</span> +<a id="line-217" name="line-217"></a> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="p">)</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="p">{</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">g_slist_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">definition_free</span><span class="p">);</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="p">}</span> +<a id="line-223" name="line-223"></a> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_defbox_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-225" name="line-225"></a><span class="p">}</span> +<a id="line-226" name="line-226"></a> +<a id="line-227" name="line-227"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-228" name="line-228"></a><span class="n">set_gdict_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-230" name="line-230"></a><span class="p">{</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-232" name="line-232"></a> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-234" name="line-234"></a> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="p">{</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="p">)</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="p">{</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DEFBOX</span><span class="p">,</span><span class="w"> </span><span class="s">"Removing old context handlers"</span><span class="p">);</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="p">);</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">define_id</span><span class="p">);</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">end_id</span><span class="p">);</span> +<a id="line-245" name="line-245"></a> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">end_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">define_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="p">}</span> +<a id="line-250" name="line-250"></a> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="p">)</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="p">{</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="p">);</span> +<a id="line-254" name="line-254"></a> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="p">}</span> +<a id="line-257" name="line-257"></a> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DEFBOX</span><span class="p">,</span><span class="w"> </span><span class="s">"Removing old context"</span><span class="p">);</span> +<a id="line-259" name="line-259"></a> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">));</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="p">}</span> +<a id="line-262" name="line-262"></a> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">context</span><span class="p">)</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-265" name="line-265"></a> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">GDICT_IS_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">))</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="p">{</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Object of type '%s' instead of a GdictContext</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">g_type_name</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">)));</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="p">}</span> +<a id="line-272" name="line-272"></a> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">DEFBOX</span><span class="p">,</span><span class="w"> </span><span class="s">"Setting new context"</span><span class="p">);</span> +<a id="line-274" name="line-274"></a> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="p">;</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">));</span> +<a id="line-277" name="line-277"></a><span class="p">}</span> +<a id="line-278" name="line-278"></a> +<a id="line-279" name="line-279"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-280" name="line-280"></a><span class="n">gdict_defbox_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-284" name="line-284"></a><span class="p">{</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-287" name="line-287"></a> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="p">{</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_WORD</span><span class="p">:</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">gdict_defbox_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_CONTEXT</span><span class="p">:</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">set_gdict_context</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DATABASE</span><span class="p">:</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_FONT_NAME</span><span class="p">:</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">gdict_defbox_set_font_name</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="p">}</span> +<a id="line-307" name="line-307"></a><span class="p">}</span> +<a id="line-308" name="line-308"></a> +<a id="line-309" name="line-309"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-310" name="line-310"></a><span class="n">gdict_defbox_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-314" name="line-314"></a><span class="p">{</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-317" name="line-317"></a> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="p">{</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_WORD</span><span class="p">:</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_CONTEXT</span><span class="p">:</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">g_value_set_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DATABASE</span><span class="p">:</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_FONT_NAME</span><span class="p">:</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">font_name</span><span class="p">);</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="p">}</span> +<a id="line-336" name="line-336"></a><span class="p">}</span> +<a id="line-337" name="line-337"></a> +<a id="line-338" name="line-338"></a><span class="cm">/*</span> +<a id="line-339" name="line-339"></a><span class="cm"> * this code has been copied from gtksourceview; it's the implementation</span> +<a id="line-340" name="line-340"></a><span class="cm"> * for case-insensitive search in a GtkTextBuffer. this is non-trivial, as</span> +<a id="line-341" name="line-341"></a><span class="cm"> * searches on a utf-8 text stream involve a norm(casefold(norm(utf8)))</span> +<a id="line-342" name="line-342"></a><span class="cm"> * operation which can be costly on large buffers. luckily for us, it's</span> +<a id="line-343" name="line-343"></a><span class="cm"> * not the case on a set of definitions.</span> +<a id="line-344" name="line-344"></a><span class="cm"> */</span> +<a id="line-345" name="line-345"></a> +<a id="line-346" name="line-346"></a><span class="cp">#define GTK_TEXT_UNKNOWN_CHAR 0xFFFC</span> +<a id="line-347" name="line-347"></a> +<a id="line-348" name="line-348"></a><span class="cm">/* this function acts like g_utf8_offset_to_pointer() except that if it finds a</span> +<a id="line-349" name="line-349"></a><span class="cm"> * decomposable character it consumes the decomposition length from the given</span> +<a id="line-350" name="line-350"></a><span class="cm"> * offset. So it's useful when the offset was calculated for the normalized</span> +<a id="line-351" name="line-351"></a><span class="cm"> * version of str, but we need a pointer to str itself. */</span> +<a id="line-352" name="line-352"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-353" name="line-353"></a><span class="n">pointer_from_offset_skipping_decomp</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">offset</span><span class="p">)</span> +<a id="line-354" name="line-354"></a><span class="p">{</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">casefold</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">normal</span><span class="p">;</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">q</span><span class="p">;</span> +<a id="line-357" name="line-357"></a> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">str</span><span class="p">;</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">offset</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="p">{</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">q</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">casefold</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="n">q</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">p</span><span class="p">);</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">normal</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_normalize</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">G_NORMALIZE_NFD</span><span class="p">);</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">offset</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">normal</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">);</span> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">normal</span><span class="p">);</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">q</span><span class="p">;</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="p">}</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">p</span><span class="p">;</span> +<a id="line-370" name="line-370"></a><span class="p">}</span> +<a id="line-371" name="line-371"></a> +<a id="line-372" name="line-372"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-373" name="line-373"></a><span class="n">exact_prefix_cmp</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">,</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">prefix</span><span class="p">,</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prefix_len</span><span class="p">)</span> +<a id="line-376" name="line-376"></a><span class="p">{</span> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">GUnicodeType</span><span class="w"> </span><span class="n">type</span><span class="p">;</span> +<a id="line-378" name="line-378"></a> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strncmp</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">prefix</span><span class="p">,</span><span class="w"> </span><span class="n">prefix_len</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="n">prefix_len</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-383" name="line-383"></a> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_unichar_type</span><span class="w"> </span><span class="p">(</span><span class="n">g_utf8_get_char</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">prefix_len</span><span class="p">));</span> +<a id="line-385" name="line-385"></a> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="cm">/* If string contains prefix, check that prefix is not followed</span> +<a id="line-387" name="line-387"></a><span class="cm"> * by a unicode mark symbol, e.g. that trailing 'a' in prefix</span> +<a id="line-388" name="line-388"></a><span class="cm"> * is not part of two-char a-with-hat symbol in string. */</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_UNICODE_SPACING_MARK</span><span class="w"> </span><span class="o">&&</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_UNICODE_ENCLOSING_MARK</span><span class="w"> </span><span class="o">&&</span> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_UNICODE_NON_SPACING_MARK</span><span class="p">;</span> +<a id="line-392" name="line-392"></a><span class="p">}</span> +<a id="line-393" name="line-393"></a> +<a id="line-394" name="line-394"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-395" name="line-395"></a><span class="n">utf8_strcasestr</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">haystack</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">needle</span><span class="p">)</span> +<a id="line-396" name="line-396"></a><span class="p">{</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">needle_len</span><span class="p">;</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">haystack_len</span><span class="p">;</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">casefold</span><span class="p">;</span> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">caseless_haystack</span><span class="p">;</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-404" name="line-404"></a> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">haystack</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">needle</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-407" name="line-407"></a> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">casefold</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">haystack</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">caseless_haystack</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_normalize</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">G_NORMALIZE_NFD</span><span class="p">);</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">);</span> +<a id="line-411" name="line-411"></a> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">needle_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">needle</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">haystack_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">caseless_haystack</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-414" name="line-414"></a> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">needle_len</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="p">{</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">haystack</span><span class="p">;</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">finally_1</span><span class="p">;</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="p">}</span> +<a id="line-420" name="line-420"></a> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">haystack_len</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">needle_len</span><span class="p">)</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="p">{</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">finally_1</span><span class="p">;</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="p">}</span> +<a id="line-426" name="line-426"></a> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="o">*</span><span class="p">)</span><span class="n">caseless_haystack</span><span class="p">;</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">needle_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">needle</span><span class="p">);</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-430" name="line-430"></a> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">p</span><span class="p">)</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="p">{</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">exact_prefix_cmp</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="n">needle</span><span class="p">,</span><span class="w"> </span><span class="n">needle_len</span><span class="p">))</span> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="p">{</span> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pointer_from_offset_skipping_decomp</span><span class="w"> </span><span class="p">(</span><span class="n">haystack</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">finally_1</span><span class="p">;</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="p">}</span> +<a id="line-438" name="line-438"></a> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_next_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="p">}</span> +<a id="line-442" name="line-442"></a> +<a id="line-443" name="line-443"></a><span class="nl">finally_1</span><span class="p">:</span> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">caseless_haystack</span><span class="p">);</span> +<a id="line-445" name="line-445"></a> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-447" name="line-447"></a><span class="p">}</span> +<a id="line-448" name="line-448"></a> +<a id="line-449" name="line-449"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-450" name="line-450"></a><span class="n">utf8_strrcasestr</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">haystack</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">needle</span><span class="p">)</span> +<a id="line-451" name="line-451"></a><span class="p">{</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">needle_len</span><span class="p">;</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">haystack_len</span><span class="p">;</span> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">casefold</span><span class="p">;</span> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">caseless_haystack</span><span class="p">;</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">haystack</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">needle</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-462" name="line-462"></a> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="n">casefold</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">haystack</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">caseless_haystack</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_normalize</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">G_NORMALIZE_NFD</span><span class="p">);</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">);</span> +<a id="line-466" name="line-466"></a> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="n">needle_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">needle</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="n">haystack_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">caseless_haystack</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-469" name="line-469"></a> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">needle_len</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="p">{</span> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">haystack</span><span class="p">;</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">finally_1</span><span class="p">;</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="p">}</span> +<a id="line-475" name="line-475"></a> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">haystack_len</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">needle_len</span><span class="p">)</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="p">{</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">finally_1</span><span class="p">;</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="p">}</span> +<a id="line-481" name="line-481"></a> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">haystack_len</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">needle_len</span><span class="p">;</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_offset_to_pointer</span><span class="w"> </span><span class="p">(</span><span class="n">caseless_haystack</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">needle_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">needle</span><span class="p">);</span> +<a id="line-485" name="line-485"></a> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">caseless_haystack</span><span class="p">)</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="p">{</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">exact_prefix_cmp</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="n">needle</span><span class="p">,</span><span class="w"> </span><span class="n">needle_len</span><span class="p">))</span> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="p">{</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pointer_from_offset_skipping_decomp</span><span class="w"> </span><span class="p">(</span><span class="n">haystack</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">finally_1</span><span class="p">;</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="p">}</span> +<a id="line-493" name="line-493"></a> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_prev_char</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="p">);</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">i</span><span class="o">--</span><span class="p">;</span> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="p">}</span> +<a id="line-497" name="line-497"></a> +<a id="line-498" name="line-498"></a><span class="nl">finally_1</span><span class="p">:</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">caseless_haystack</span><span class="p">);</span> +<a id="line-500" name="line-500"></a> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-502" name="line-502"></a><span class="p">}</span> +<a id="line-503" name="line-503"></a> +<a id="line-504" name="line-504"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-505" name="line-505"></a><span class="n">utf8_caselessnmatch</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">s1</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">s2</span><span class="p">,</span> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="n">gssize</span><span class="w"> </span><span class="n">n1</span><span class="p">,</span><span class="w"> </span><span class="n">gssize</span><span class="w"> </span><span class="n">n2</span><span class="p">)</span> +<a id="line-507" name="line-507"></a><span class="p">{</span> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">casefold</span><span class="p">;</span> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">normalized_s1</span><span class="p">;</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">normalized_s2</span><span class="p">;</span> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">len_s1</span><span class="p">;</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">len_s2</span><span class="p">;</span> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-514" name="line-514"></a> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">s1</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">s2</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">n1</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">n2</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-519" name="line-519"></a> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="n">casefold</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">s1</span><span class="p">,</span><span class="w"> </span><span class="n">n1</span><span class="p">);</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">normalized_s1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_normalize</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">G_NORMALIZE_NFD</span><span class="p">);</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">);</span> +<a id="line-523" name="line-523"></a> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="n">casefold</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">s2</span><span class="p">,</span><span class="w"> </span><span class="n">n2</span><span class="p">);</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="n">normalized_s2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_normalize</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">G_NORMALIZE_NFD</span><span class="p">);</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">);</span> +<a id="line-527" name="line-527"></a> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="n">len_s1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">normalized_s1</span><span class="p">);</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">len_s2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">normalized_s2</span><span class="p">);</span> +<a id="line-530" name="line-530"></a> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">len_s1</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">len_s2</span><span class="p">)</span> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">finally_2</span><span class="p">;</span> +<a id="line-533" name="line-533"></a> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">strncmp</span><span class="w"> </span><span class="p">(</span><span class="n">normalized_s1</span><span class="p">,</span><span class="w"> </span><span class="n">normalized_s2</span><span class="p">,</span><span class="w"> </span><span class="n">len_s2</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-535" name="line-535"></a> +<a id="line-536" name="line-536"></a><span class="nl">finally_2</span><span class="p">:</span> +<a id="line-537" name="line-537"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">normalized_s1</span><span class="p">);</span> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">normalized_s2</span><span class="p">);</span> +<a id="line-539" name="line-539"></a> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-541" name="line-541"></a><span class="p">}</span> +<a id="line-542" name="line-542"></a> +<a id="line-543" name="line-543"></a><span class="cm">/* FIXME: total horror */</span> +<a id="line-544" name="line-544"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-545" name="line-545"></a><span class="n">char_is_invisible</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">)</span> +<a id="line-546" name="line-546"></a><span class="p">{</span> +<a id="line-547" name="line-547"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">tags</span><span class="p">;</span> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">invisible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="n">tags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_tags</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">);</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">tags</span><span class="p">)</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="p">{</span> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">this_invisible</span><span class="p">,</span><span class="w"> </span><span class="n">invisible_set</span><span class="p">;</span> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">tags</span><span class="o">-></span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="s">"invisible"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">this_invisible</span><span class="p">,</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="s">"invisible-set"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">invisible_set</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">invisible_set</span><span class="p">)</span> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="n">invisible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">this_invisible</span><span class="p">;</span> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="n">tags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_delete_link</span><span class="w"> </span><span class="p">(</span><span class="n">tags</span><span class="p">,</span><span class="w"> </span><span class="n">tags</span><span class="p">);</span> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="p">}</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">invisible</span><span class="p">;</span> +<a id="line-560" name="line-560"></a><span class="p">}</span> +<a id="line-561" name="line-561"></a> +<a id="line-562" name="line-562"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-563" name="line-563"></a><span class="n">forward_chars_with_skipping</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">count</span><span class="p">,</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">skip_invisible</span><span class="p">,</span> +<a id="line-566" name="line-566"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">skip_nontext</span><span class="p">,</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">skip_decomp</span><span class="p">)</span> +<a id="line-568" name="line-568"></a><span class="p">{</span> +<a id="line-569" name="line-569"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-570" name="line-570"></a> +<a id="line-571" name="line-571"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-572" name="line-572"></a> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">count</span><span class="p">;</span> +<a id="line-574" name="line-574"></a> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="p">{</span> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">ignored</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-578" name="line-578"></a> +<a id="line-579" name="line-579"></a><span class="w"> </span><span class="cm">/* minimal workaround to avoid the infinite loop of bug #168247.</span> +<a id="line-580" name="line-580"></a><span class="cm"> * It doesn't fix the problemjust the symptom...</span> +<a id="line-581" name="line-581"></a><span class="cm"> */</span> +<a id="line-582" name="line-582"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_iter_is_end</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">))</span> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-584" name="line-584"></a> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">skip_nontext</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_text_iter_get_char</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_TEXT_UNKNOWN_CHAR</span><span class="p">)</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="n">ignored</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-587" name="line-587"></a> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="cm">/* FIXME: char_is_invisible() gets list of tags for each char there,</span> +<a id="line-589" name="line-589"></a><span class="cm"> and checks every tag. It doesn't sound like a good idea. */</span> +<a id="line-590" name="line-590"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">ignored</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">skip_invisible</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">char_is_invisible</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">))</span> +<a id="line-591" name="line-591"></a><span class="w"> </span><span class="n">ignored</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-592" name="line-592"></a> +<a id="line-593" name="line-593"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">ignored</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">skip_decomp</span><span class="p">)</span> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="p">{</span> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="cm">/* being UTF8 correct sucks; this accounts for extra</span> +<a id="line-596" name="line-596"></a><span class="cm"> offsets coming from canonical decompositions of</span> +<a id="line-597" name="line-597"></a><span class="cm"> UTF8 characters (e.g. accented characters) which</span> +<a id="line-598" name="line-598"></a><span class="cm"> g_utf8_normalize() performs */</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">normal</span><span class="p">;</span> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="n">buffer</span><span class="p">[</span><span class="mi">6</span><span class="p">];</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">buffer_len</span><span class="p">;</span> +<a id="line-602" name="line-602"></a> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="n">buffer_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_unichar_to_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_iter_get_char</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">),</span><span class="w"> </span><span class="n">buffer</span><span class="p">);</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">normal</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_normalize</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">buffer_len</span><span class="p">,</span><span class="w"> </span><span class="n">G_NORMALIZE_NFD</span><span class="p">);</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="p">(</span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">normal</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">normal</span><span class="p">);</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="p">}</span> +<a id="line-608" name="line-608"></a> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_char</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">);</span> +<a id="line-610" name="line-610"></a> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">ignored</span><span class="p">)</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="o">--</span><span class="n">i</span><span class="p">;</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="p">}</span> +<a id="line-614" name="line-614"></a><span class="p">}</span> +<a id="line-615" name="line-615"></a> +<a id="line-616" name="line-616"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-617" name="line-617"></a><span class="n">lines_match</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">start</span><span class="p">,</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="p">,</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">visible_only</span><span class="p">,</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">slice</span><span class="p">,</span> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="p">,</span> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="p">)</span> +<a id="line-623" name="line-623"></a><span class="p">{</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">next</span><span class="p">;</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">line_text</span><span class="p">;</span> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">found</span><span class="p">;</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">offset</span><span class="p">;</span> +<a id="line-628" name="line-628"></a> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">lines</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="p">{</span> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_start</span><span class="p">)</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">start</span><span class="p">;</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_end</span><span class="p">)</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">start</span><span class="p">;</span> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="p">}</span> +<a id="line-637" name="line-637"></a> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="n">next</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">start</span><span class="p">;</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_line</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">);</span> +<a id="line-640" name="line-640"></a> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="cm">/* No more text in buffer, but *lines is nonempty */</span> +<a id="line-642" name="line-642"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_iter_equal</span><span class="w"> </span><span class="p">(</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">next</span><span class="p">))</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-644" name="line-644"></a> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">slice</span><span class="p">)</span> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="p">{</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">visible_only</span><span class="p">)</span> +<a id="line-648" name="line-648"></a><span class="w"> </span><span class="n">line_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_visible_slice</span><span class="w"> </span><span class="p">(</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">next</span><span class="p">);</span> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="k">else</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="n">line_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_slice</span><span class="w"> </span><span class="p">(</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">next</span><span class="p">);</span> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="p">}</span> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="k">else</span> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="p">{</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">visible_only</span><span class="p">)</span> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="n">line_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_visible_text</span><span class="w"> </span><span class="p">(</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">next</span><span class="p">);</span> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="k">else</span> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="n">line_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">next</span><span class="p">);</span> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="p">}</span> +<a id="line-659" name="line-659"></a> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_start</span><span class="p">)</span><span class="w"> </span><span class="cm">/* if this is the first line we're matching */</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="p">{</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">utf8_strcasestr</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">lines</span><span class="p">);</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="p">}</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="k">else</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="p">{</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="cm">/* If it's not the first line, we have to match from the</span> +<a id="line-667" name="line-667"></a><span class="cm"> * start of the line.</span> +<a id="line-668" name="line-668"></a><span class="cm"> */</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_caselessnmatch</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">),</span> +<a id="line-670" name="line-670"></a><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">lines</span><span class="p">)))</span> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">line_text</span><span class="p">;</span> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="k">else</span> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="p">}</span> +<a id="line-675" name="line-675"></a> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">found</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="p">{</span> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">);</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="p">}</span> +<a id="line-681" name="line-681"></a> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="cm">/* Get offset to start of search string */</span> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">,</span><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">line_text</span><span class="p">);</span> +<a id="line-684" name="line-684"></a> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="n">next</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">start</span><span class="p">;</span> +<a id="line-686" name="line-686"></a> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="cm">/* If match start needs to be returned, set it to the</span> +<a id="line-688" name="line-688"></a><span class="cm"> * start of the search string.</span> +<a id="line-689" name="line-689"></a><span class="cm"> */</span> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="n">forward_chars_with_skipping</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="n">offset</span><span class="p">,</span><span class="w"> </span><span class="n">visible_only</span><span class="p">,</span><span class="w"> </span><span class="o">!</span><span class="n">slice</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_start</span><span class="p">)</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="p">{</span> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">next</span><span class="p">;</span> +<a id="line-694" name="line-694"></a><span class="w"> </span><span class="p">}</span> +<a id="line-695" name="line-695"></a> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="cm">/* Go to end of search string */</span> +<a id="line-697" name="line-697"></a><span class="w"> </span><span class="n">forward_chars_with_skipping</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">),</span><span class="w"> </span><span class="n">visible_only</span><span class="p">,</span><span class="w"> </span><span class="o">!</span><span class="n">slice</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-698" name="line-698"></a> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">);</span> +<a id="line-700" name="line-700"></a> +<a id="line-701" name="line-701"></a><span class="w"> </span><span class="o">++</span><span class="n">lines</span><span class="p">;</span> +<a id="line-702" name="line-702"></a> +<a id="line-703" name="line-703"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_end</span><span class="p">)</span> +<a id="line-704" name="line-704"></a><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">next</span><span class="p">;</span> +<a id="line-705" name="line-705"></a> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="cm">/* pass NULL for match_start, since we don't need to find the</span> +<a id="line-707" name="line-707"></a><span class="cm"> * start again.</span> +<a id="line-708" name="line-708"></a><span class="cm"> */</span> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">lines_match</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="n">visible_only</span><span class="p">,</span><span class="w"> </span><span class="n">slice</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">match_end</span><span class="p">);</span> +<a id="line-710" name="line-710"></a><span class="p">}</span> +<a id="line-711" name="line-711"></a> +<a id="line-712" name="line-712"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-713" name="line-713"></a><span class="n">backward_lines_match</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">start</span><span class="p">,</span> +<a id="line-714" name="line-714"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="p">,</span> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">visible_only</span><span class="p">,</span> +<a id="line-716" name="line-716"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">slice</span><span class="p">,</span> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="p">,</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="p">)</span> +<a id="line-719" name="line-719"></a><span class="p">{</span> +<a id="line-720" name="line-720"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">line</span><span class="p">,</span><span class="w"> </span><span class="n">next</span><span class="p">;</span> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">line_text</span><span class="p">;</span> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">found</span><span class="p">;</span> +<a id="line-723" name="line-723"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">offset</span><span class="p">;</span> +<a id="line-724" name="line-724"></a> +<a id="line-725" name="line-725"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">lines</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-726" name="line-726"></a><span class="w"> </span><span class="p">{</span> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_start</span><span class="p">)</span> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">start</span><span class="p">;</span> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_end</span><span class="p">)</span> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">start</span><span class="p">;</span> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="p">}</span> +<a id="line-733" name="line-733"></a> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">next</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">start</span><span class="p">;</span> +<a id="line-735" name="line-735"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_iter_get_line_offset</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="p">{</span> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_text_iter_backward_line</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">))</span> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="p">}</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="k">else</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">gtk_text_iter_set_line_offset</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-742" name="line-742"></a> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">slice</span><span class="p">)</span> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="p">{</span> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">visible_only</span><span class="p">)</span> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="n">line_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_visible_slice</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">line</span><span class="p">);</span> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="k">else</span> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="n">line_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_slice</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">line</span><span class="p">);</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="p">}</span> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="k">else</span> +<a id="line-751" name="line-751"></a><span class="w"> </span><span class="p">{</span> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">visible_only</span><span class="p">)</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">line_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_visible_text</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">line</span><span class="p">);</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="k">else</span> +<a id="line-755" name="line-755"></a><span class="w"> </span><span class="n">line_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_text</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">line</span><span class="p">);</span> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="p">}</span> +<a id="line-757" name="line-757"></a> +<a id="line-758" name="line-758"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_start</span><span class="p">)</span><span class="w"> </span><span class="cm">/* if this is the first line we're matching */</span> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="p">{</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">utf8_strrcasestr</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">lines</span><span class="p">);</span> +<a id="line-761" name="line-761"></a><span class="w"> </span><span class="p">}</span> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="k">else</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="p">{</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="cm">/* If it's not the first line, we have to match from the</span> +<a id="line-765" name="line-765"></a><span class="cm"> * start of the line.</span> +<a id="line-766" name="line-766"></a><span class="cm"> */</span> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">utf8_caselessnmatch</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">),</span> +<a id="line-768" name="line-768"></a><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">lines</span><span class="p">)))</span> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">line_text</span><span class="p">;</span> +<a id="line-770" name="line-770"></a><span class="w"> </span><span class="k">else</span> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="p">}</span> +<a id="line-773" name="line-773"></a> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">found</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="p">{</span> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">);</span> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="p">}</span> +<a id="line-779" name="line-779"></a> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="cm">/* Get offset to start of search string */</span> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="n">offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">,</span><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">line_text</span><span class="p">);</span> +<a id="line-782" name="line-782"></a> +<a id="line-783" name="line-783"></a><span class="w"> </span><span class="n">forward_chars_with_skipping</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="n">offset</span><span class="p">,</span><span class="w"> </span><span class="n">visible_only</span><span class="p">,</span><span class="w"> </span><span class="o">!</span><span class="n">slice</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-784" name="line-784"></a> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="cm">/* If match start needs to be returned, set it to the</span> +<a id="line-786" name="line-786"></a><span class="cm"> * start of the search string.</span> +<a id="line-787" name="line-787"></a><span class="cm"> */</span> +<a id="line-788" name="line-788"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_start</span><span class="p">)</span> +<a id="line-789" name="line-789"></a><span class="w"> </span><span class="p">{</span> +<a id="line-790" name="line-790"></a><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">next</span><span class="p">;</span> +<a id="line-791" name="line-791"></a><span class="w"> </span><span class="p">}</span> +<a id="line-792" name="line-792"></a> +<a id="line-793" name="line-793"></a><span class="w"> </span><span class="cm">/* Go to end of search string */</span> +<a id="line-794" name="line-794"></a><span class="w"> </span><span class="n">forward_chars_with_skipping</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">),</span><span class="w"> </span><span class="n">visible_only</span><span class="p">,</span><span class="w"> </span><span class="o">!</span><span class="n">slice</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-795" name="line-795"></a> +<a id="line-796" name="line-796"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">line_text</span><span class="p">);</span> +<a id="line-797" name="line-797"></a> +<a id="line-798" name="line-798"></a><span class="w"> </span><span class="o">++</span><span class="n">lines</span><span class="p">;</span> +<a id="line-799" name="line-799"></a> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_end</span><span class="p">)</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">next</span><span class="p">;</span> +<a id="line-802" name="line-802"></a> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="cm">/* try to match the rest of the lines forward, passing NULL</span> +<a id="line-804" name="line-804"></a><span class="cm"> * for match_start so lines_match will try to match the entire</span> +<a id="line-805" name="line-805"></a><span class="cm"> * line */</span> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">lines_match</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="n">lines</span><span class="p">,</span><span class="w"> </span><span class="n">visible_only</span><span class="p">,</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="n">slice</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">match_end</span><span class="p">);</span> +<a id="line-808" name="line-808"></a><span class="p">}</span> +<a id="line-809" name="line-809"></a> +<a id="line-810" name="line-810"></a><span class="cm">/* strsplit () that retains the delimiter as part of the string. */</span> +<a id="line-811" name="line-811"></a><span class="k">static</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span> +<a id="line-812" name="line-812"></a><span class="n">breakup_string</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">string</span><span class="p">,</span> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">delimiter</span><span class="p">,</span> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">max_tokens</span><span class="p">)</span> +<a id="line-815" name="line-815"></a><span class="p">{</span> +<a id="line-816" name="line-816"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">string_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">slist</span><span class="p">;</span> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">str_array</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">casefold</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">new_string</span><span class="p">;</span> +<a id="line-818" name="line-818"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-819" name="line-819"></a> +<a id="line-820" name="line-820"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-821" name="line-821"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">delimiter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-822" name="line-822"></a> +<a id="line-823" name="line-823"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">max_tokens</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="n">max_tokens</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_MAXINT</span><span class="p">;</span> +<a id="line-825" name="line-825"></a> +<a id="line-826" name="line-826"></a><span class="w"> </span><span class="n">s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">delimiter</span><span class="p">);</span> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">s</span><span class="p">)</span> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="p">{</span> +<a id="line-829" name="line-829"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">delimiter_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">delimiter</span><span class="p">);</span> +<a id="line-830" name="line-830"></a> +<a id="line-831" name="line-831"></a><span class="w"> </span><span class="k">do</span> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="p">{</span> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">len</span><span class="p">;</span> +<a id="line-834" name="line-834"></a> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="n">len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">s</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">delimiter_len</span><span class="p">;</span> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="n">new_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="p">,</span><span class="w"> </span><span class="n">len</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="n">strncpy</span><span class="w"> </span><span class="p">(</span><span class="n">new_string</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">len</span><span class="p">);</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="n">new_string</span><span class="p">[</span><span class="n">len</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-839" name="line-839"></a><span class="w"> </span><span class="n">casefold</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">new_string</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">new_string</span><span class="p">);</span> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="n">new_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_normalize</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">G_NORMALIZE_NFD</span><span class="p">);</span> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">);</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="n">string_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_prepend</span><span class="w"> </span><span class="p">(</span><span class="n">string_list</span><span class="p">,</span><span class="w"> </span><span class="n">new_string</span><span class="p">);</span> +<a id="line-844" name="line-844"></a><span class="w"> </span><span class="n">n</span><span class="o">++</span><span class="p">;</span> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">s</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">delimiter_len</span><span class="p">;</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="n">s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strstr</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="n">delimiter</span><span class="p">);</span> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="o">--</span><span class="n">max_tokens</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">s</span><span class="p">);</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="p">}</span> +<a id="line-849" name="line-849"></a> +<a id="line-850" name="line-850"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">string</span><span class="p">)</span> +<a id="line-851" name="line-851"></a><span class="w"> </span><span class="p">{</span> +<a id="line-852" name="line-852"></a><span class="w"> </span><span class="n">n</span><span class="o">++</span><span class="p">;</span> +<a id="line-853" name="line-853"></a><span class="w"> </span><span class="n">casefold</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_casefold</span><span class="w"> </span><span class="p">(</span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-854" name="line-854"></a><span class="w"> </span><span class="n">new_string</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_normalize</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">G_NORMALIZE_NFD</span><span class="p">);</span> +<a id="line-855" name="line-855"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">casefold</span><span class="p">);</span> +<a id="line-856" name="line-856"></a><span class="w"> </span><span class="n">string_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_prepend</span><span class="w"> </span><span class="p">(</span><span class="n">string_list</span><span class="p">,</span><span class="w"> </span><span class="n">new_string</span><span class="p">);</span> +<a id="line-857" name="line-857"></a><span class="w"> </span><span class="p">}</span> +<a id="line-858" name="line-858"></a> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="n">str_array</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="n">n</span><span class="p">);</span> +<a id="line-860" name="line-860"></a> +<a id="line-861" name="line-861"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-862" name="line-862"></a> +<a id="line-863" name="line-863"></a><span class="w"> </span><span class="n">str_array</span><span class="p">[</span><span class="n">i</span><span class="o">--</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-864" name="line-864"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">slist</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">string_list</span><span class="p">;</span><span class="w"> </span><span class="n">slist</span><span class="p">;</span><span class="w"> </span><span class="n">slist</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">slist</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-865" name="line-865"></a><span class="w"> </span><span class="n">str_array</span><span class="p">[</span><span class="n">i</span><span class="o">--</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">slist</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-866" name="line-866"></a> +<a id="line-867" name="line-867"></a><span class="w"> </span><span class="n">g_slist_free</span><span class="w"> </span><span class="p">(</span><span class="n">string_list</span><span class="p">);</span> +<a id="line-868" name="line-868"></a> +<a id="line-869" name="line-869"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">str_array</span><span class="p">;</span> +<a id="line-870" name="line-870"></a><span class="p">}</span> +<a id="line-871" name="line-871"></a> +<a id="line-872" name="line-872"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-873" name="line-873"></a><span class="n">gdict_defbox_iter_forward_search</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-874" name="line-874"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">,</span> +<a id="line-875" name="line-875"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="p">,</span> +<a id="line-876" name="line-876"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="p">,</span> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">limit</span><span class="p">)</span> +<a id="line-878" name="line-878"></a><span class="p">{</span> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-880" name="line-880"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">match</span><span class="p">;</span> +<a id="line-881" name="line-881"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">search</span><span class="p">;</span> +<a id="line-883" name="line-883"></a> +<a id="line-884" name="line-884"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-886" name="line-886"></a> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">limit</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_text_iter_compare</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">limit</span><span class="p">)</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-889" name="line-889"></a> +<a id="line-890" name="line-890"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">str</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-891" name="line-891"></a><span class="w"> </span><span class="p">{</span> +<a id="line-892" name="line-892"></a><span class="w"> </span><span class="cm">/* If we can move one char, return the empty string there */</span> +<a id="line-893" name="line-893"></a><span class="w"> </span><span class="n">match</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-894" name="line-894"></a> +<a id="line-895" name="line-895"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_iter_forward_char</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">match</span><span class="p">))</span> +<a id="line-896" name="line-896"></a><span class="w"> </span><span class="p">{</span> +<a id="line-897" name="line-897"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">limit</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_text_iter_equal</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">match</span><span class="p">,</span><span class="w"> </span><span class="n">limit</span><span class="p">))</span> +<a id="line-898" name="line-898"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-899" name="line-899"></a> +<a id="line-900" name="line-900"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_start</span><span class="p">)</span> +<a id="line-901" name="line-901"></a><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match</span><span class="p">;</span> +<a id="line-902" name="line-902"></a> +<a id="line-903" name="line-903"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_end</span><span class="p">)</span> +<a id="line-904" name="line-904"></a><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match</span><span class="p">;</span> +<a id="line-905" name="line-905"></a> +<a id="line-906" name="line-906"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="p">}</span> +<a id="line-908" name="line-908"></a><span class="w"> </span><span class="k">else</span> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-910" name="line-910"></a><span class="w"> </span><span class="p">}</span> +<a id="line-911" name="line-911"></a> +<a id="line-912" name="line-912"></a><span class="w"> </span><span class="cm">/* locate all lines */</span> +<a id="line-913" name="line-913"></a><span class="w"> </span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">breakup_string</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-914" name="line-914"></a> +<a id="line-915" name="line-915"></a><span class="w"> </span><span class="n">search</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-916" name="line-916"></a> +<a id="line-917" name="line-917"></a><span class="w"> </span><span class="cm">/* This loop has an inefficient worst-case, where</span> +<a id="line-918" name="line-918"></a><span class="cm"> * gtk_text_iter_get_text () is called repeatedly on</span> +<a id="line-919" name="line-919"></a><span class="cm"> * a single line.</span> +<a id="line-920" name="line-920"></a><span class="cm"> */</span> +<a id="line-921" name="line-921"></a><span class="w"> </span><span class="k">do</span> +<a id="line-922" name="line-922"></a><span class="w"> </span><span class="p">{</span> +<a id="line-923" name="line-923"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-924" name="line-924"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-925" name="line-925"></a> +<a id="line-926" name="line-926"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">limit</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_text_iter_compare</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="n">limit</span><span class="p">)</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-927" name="line-927"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-928" name="line-928"></a> +<a id="line-929" name="line-929"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lines_match</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="o">**</span><span class="p">)</span><span class="n">lines</span><span class="p">,</span> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span> +<a id="line-931" name="line-931"></a><span class="w"> </span><span class="o">&</span><span class="n">match</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-932" name="line-932"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="p">)</span> +<a id="line-933" name="line-933"></a><span class="w"> </span><span class="p">{</span> +<a id="line-934" name="line-934"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">limit</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span> +<a id="line-935" name="line-935"></a><span class="w"> </span><span class="p">(</span><span class="n">limit</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_text_iter_compare</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">limit</span><span class="p">)</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span> +<a id="line-936" name="line-936"></a><span class="w"> </span><span class="p">{</span> +<a id="line-937" name="line-937"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-938" name="line-938"></a> +<a id="line-939" name="line-939"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_start</span><span class="p">)</span> +<a id="line-940" name="line-940"></a><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match</span><span class="p">;</span> +<a id="line-941" name="line-941"></a> +<a id="line-942" name="line-942"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_end</span><span class="p">)</span> +<a id="line-943" name="line-943"></a><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-944" name="line-944"></a><span class="w"> </span><span class="p">}</span> +<a id="line-945" name="line-945"></a> +<a id="line-946" name="line-946"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="p">}</span> +<a id="line-948" name="line-948"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_iter_forward_line</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">search</span><span class="p">));</span> +<a id="line-949" name="line-949"></a> +<a id="line-950" name="line-950"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">((</span><span class="n">gchar</span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">lines</span><span class="p">);</span> +<a id="line-951" name="line-951"></a> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-953" name="line-953"></a><span class="p">}</span> +<a id="line-954" name="line-954"></a> +<a id="line-955" name="line-955"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-956" name="line-956"></a><span class="n">gdict_defbox_iter_backward_search</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-957" name="line-957"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">,</span> +<a id="line-958" name="line-958"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="p">,</span> +<a id="line-959" name="line-959"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="p">,</span> +<a id="line-960" name="line-960"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">limit</span><span class="p">)</span> +<a id="line-961" name="line-961"></a><span class="p">{</span> +<a id="line-962" name="line-962"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-963" name="line-963"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">match</span><span class="p">;</span> +<a id="line-964" name="line-964"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-965" name="line-965"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">search</span><span class="p">;</span> +<a id="line-966" name="line-966"></a> +<a id="line-967" name="line-967"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-969" name="line-969"></a> +<a id="line-970" name="line-970"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">limit</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_text_iter_compare</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">limit</span><span class="p">)</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-971" name="line-971"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-972" name="line-972"></a> +<a id="line-973" name="line-973"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">str</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-974" name="line-974"></a><span class="w"> </span><span class="p">{</span> +<a id="line-975" name="line-975"></a><span class="w"> </span><span class="cm">/* If we can move one char, return the empty string there */</span> +<a id="line-976" name="line-976"></a><span class="w"> </span><span class="n">match</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-977" name="line-977"></a> +<a id="line-978" name="line-978"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_iter_backward_char</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">match</span><span class="p">))</span> +<a id="line-979" name="line-979"></a><span class="w"> </span><span class="p">{</span> +<a id="line-980" name="line-980"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">limit</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_text_iter_equal</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">match</span><span class="p">,</span><span class="w"> </span><span class="n">limit</span><span class="p">))</span> +<a id="line-981" name="line-981"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-982" name="line-982"></a> +<a id="line-983" name="line-983"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_start</span><span class="p">)</span> +<a id="line-984" name="line-984"></a><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match</span><span class="p">;</span> +<a id="line-985" name="line-985"></a> +<a id="line-986" name="line-986"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_end</span><span class="p">)</span> +<a id="line-987" name="line-987"></a><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match</span><span class="p">;</span> +<a id="line-988" name="line-988"></a> +<a id="line-989" name="line-989"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-990" name="line-990"></a><span class="w"> </span><span class="p">}</span> +<a id="line-991" name="line-991"></a><span class="w"> </span><span class="k">else</span> +<a id="line-992" name="line-992"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="p">}</span> +<a id="line-994" name="line-994"></a> +<a id="line-995" name="line-995"></a><span class="w"> </span><span class="cm">/* locate all lines */</span> +<a id="line-996" name="line-996"></a><span class="w"> </span><span class="n">lines</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">breakup_string</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-997" name="line-997"></a> +<a id="line-998" name="line-998"></a><span class="w"> </span><span class="n">search</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-999" name="line-999"></a> +<a id="line-1000" name="line-1000"></a><span class="w"> </span><span class="cm">/* This loop has an inefficient worst-case, where</span> +<a id="line-1001" name="line-1001"></a><span class="cm"> * gtk_text_iter_get_text () is called repeatedly on</span> +<a id="line-1002" name="line-1002"></a><span class="cm"> * a single line.</span> +<a id="line-1003" name="line-1003"></a><span class="cm"> */</span> +<a id="line-1004" name="line-1004"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">)</span> +<a id="line-1005" name="line-1005"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1006" name="line-1006"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-1007" name="line-1007"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-1008" name="line-1008"></a> +<a id="line-1009" name="line-1009"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">limit</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_text_iter_compare</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="n">limit</span><span class="p">)</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-1010" name="line-1010"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1011" name="line-1011"></a> +<a id="line-1012" name="line-1012"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">backward_lines_match</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="o">**</span><span class="p">)</span><span class="n">lines</span><span class="p">,</span> +<a id="line-1013" name="line-1013"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span> +<a id="line-1014" name="line-1014"></a><span class="w"> </span><span class="o">&</span><span class="n">match</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-1015" name="line-1015"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="p">)</span> +<a id="line-1016" name="line-1016"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1017" name="line-1017"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">limit</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span> +<a id="line-1018" name="line-1018"></a><span class="w"> </span><span class="p">(</span><span class="n">limit</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_text_iter_compare</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">limit</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">))</span> +<a id="line-1019" name="line-1019"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1020" name="line-1020"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1021" name="line-1021"></a> +<a id="line-1022" name="line-1022"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_start</span><span class="p">)</span> +<a id="line-1023" name="line-1023"></a><span class="w"> </span><span class="o">*</span><span class="n">match_start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match</span><span class="p">;</span> +<a id="line-1024" name="line-1024"></a> +<a id="line-1025" name="line-1025"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_end</span><span class="p">)</span> +<a id="line-1026" name="line-1026"></a><span class="w"> </span><span class="o">*</span><span class="n">match_end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-1027" name="line-1027"></a> +<a id="line-1028" name="line-1028"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1029" name="line-1029"></a> +<a id="line-1030" name="line-1030"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1031" name="line-1031"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1032" name="line-1032"></a> +<a id="line-1033" name="line-1033"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_iter_get_line_offset</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">search</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-1034" name="line-1034"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1035" name="line-1035"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_text_iter_backward_line</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">search</span><span class="p">))</span> +<a id="line-1036" name="line-1036"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1037" name="line-1037"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1039" name="line-1039"></a><span class="w"> </span><span class="n">gtk_text_iter_set_line_offset</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">search</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1040" name="line-1040"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1041" name="line-1041"></a> +<a id="line-1042" name="line-1042"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">((</span><span class="n">gchar</span><span class="o">**</span><span class="p">)</span><span class="w"> </span><span class="n">lines</span><span class="p">);</span> +<a id="line-1043" name="line-1043"></a> +<a id="line-1044" name="line-1044"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-1045" name="line-1045"></a><span class="p">}</span> +<a id="line-1046" name="line-1046"></a> +<a id="line-1047" name="line-1047"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1048" name="line-1048"></a><span class="n">gdict_defbox_find_backward</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-1049" name="line-1049"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">)</span> +<a id="line-1050" name="line-1050"></a><span class="p">{</span> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1052" name="line-1052"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start_iter</span><span class="p">,</span><span class="w"> </span><span class="n">end_iter</span><span class="p">;</span> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">match_start</span><span class="p">,</span><span class="w"> </span><span class="n">match_end</span><span class="p">;</span> +<a id="line-1054" name="line-1054"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1055" name="line-1055"></a><span class="w"> </span><span class="n">GtkTextMark</span><span class="w"> </span><span class="o">*</span><span class="n">last_search</span><span class="p">;</span> +<a id="line-1056" name="line-1056"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-1057" name="line-1057"></a> +<a id="line-1058" name="line-1058"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TEXT_BUFFER</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">));</span> +<a id="line-1059" name="line-1059"></a> +<a id="line-1060" name="line-1060"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_bounds</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start_iter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">);</span> +<a id="line-1061" name="line-1061"></a> +<a id="line-1062" name="line-1062"></a><span class="w"> </span><span class="cm">/* if there already has been another result, begin from there */</span> +<a id="line-1063" name="line-1063"></a><span class="w"> </span><span class="n">last_search</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"last-search-prev"</span><span class="p">);</span> +<a id="line-1064" name="line-1064"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">last_search</span><span class="p">)</span> +<a id="line-1065" name="line-1065"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">last_search</span><span class="p">);</span> +<a id="line-1066" name="line-1066"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1067" name="line-1067"></a><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">end_iter</span><span class="p">;</span> +<a id="line-1068" name="line-1068"></a> +<a id="line-1069" name="line-1069"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_iter_backward_search</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span> +<a id="line-1070" name="line-1070"></a><span class="w"> </span><span class="o">&</span><span class="n">match_start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">match_end</span><span class="p">,</span> +<a id="line-1071" name="line-1071"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1072" name="line-1072"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="p">)</span> +<a id="line-1073" name="line-1073"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1074" name="line-1074"></a><span class="w"> </span><span class="n">gtk_text_view_scroll_to_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span> +<a id="line-1075" name="line-1075"></a><span class="w"> </span><span class="o">&</span><span class="n">match_start</span><span class="p">,</span> +<a id="line-1076" name="line-1076"></a><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span> +<a id="line-1077" name="line-1077"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-1078" name="line-1078"></a><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-1079" name="line-1079"></a><span class="w"> </span><span class="n">gtk_text_buffer_place_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">match_end</span><span class="p">);</span> +<a id="line-1080" name="line-1080"></a><span class="w"> </span><span class="n">gtk_text_buffer_move_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span> +<a id="line-1081" name="line-1081"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"selection_bound"</span><span class="p">),</span> +<a id="line-1082" name="line-1082"></a><span class="w"> </span><span class="o">&</span><span class="n">match_start</span><span class="p">);</span> +<a id="line-1083" name="line-1083"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"last-search-prev"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">match_start</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1084" name="line-1084"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"last-search-next"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">match_end</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1085" name="line-1085"></a> +<a id="line-1086" name="line-1086"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1087" name="line-1087"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1088" name="line-1088"></a> +<a id="line-1089" name="line-1089"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1090" name="line-1090"></a><span class="p">}</span> +<a id="line-1091" name="line-1091"></a> +<a id="line-1092" name="line-1092"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1093" name="line-1093"></a><span class="n">hide_find_pane</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1094" name="line-1094"></a><span class="p">{</span> +<a id="line-1095" name="line-1095"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1096" name="line-1096"></a> +<a id="line-1097" name="line-1097"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_pane</span><span class="p">);</span> +<a id="line-1098" name="line-1098"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">show_find</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1099" name="line-1099"></a> +<a id="line-1100" name="line-1100"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">);</span> +<a id="line-1101" name="line-1101"></a> +<a id="line-1102" name="line-1102"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1103" name="line-1103"></a> +<a id="line-1104" name="line-1104"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1105" name="line-1105"></a><span class="p">}</span> +<a id="line-1106" name="line-1106"></a> +<a id="line-1107" name="line-1107"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1108" name="line-1108"></a><span class="n">find_prev_clicked_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1109" name="line-1109"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1110" name="line-1110"></a><span class="p">{</span> +<a id="line-1111" name="line-1111"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-1112" name="line-1112"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1113" name="line-1113"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">;</span> +<a id="line-1114" name="line-1114"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">found</span><span class="p">;</span> +<a id="line-1115" name="line-1115"></a> +<a id="line-1116" name="line-1116"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">);</span> +<a id="line-1117" name="line-1117"></a> +<a id="line-1118" name="line-1118"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_entry</span><span class="p">));</span> +<a id="line-1119" name="line-1119"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">text</span><span class="p">)</span> +<a id="line-1120" name="line-1120"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1121" name="line-1121"></a> +<a id="line-1122" name="line-1122"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_find_backward</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">);</span> +<a id="line-1123" name="line-1123"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">found</span><span class="p">)</span> +<a id="line-1124" name="line-1124"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1125" name="line-1125"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">;</span> +<a id="line-1126" name="line-1126"></a> +<a id="line-1127" name="line-1127"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="s">" <i>"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Not found"</span><span class="p">),</span><span class="w"> </span><span class="s">"</i>"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1128" name="line-1128"></a><span class="w"> </span><span class="n">gtk_label_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">),</span><span class="w"> </span><span class="n">str</span><span class="p">);</span> +<a id="line-1129" name="line-1129"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">);</span> +<a id="line-1130" name="line-1130"></a> +<a id="line-1131" name="line-1131"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-1132" name="line-1132"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1133" name="line-1133"></a> +<a id="line-1134" name="line-1134"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">)</span> +<a id="line-1135" name="line-1135"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1136" name="line-1136"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">);</span> +<a id="line-1137" name="line-1137"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add_seconds</span><span class="w"> </span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="n">hide_find_pane</span><span class="p">,</span><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1138" name="line-1138"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1139" name="line-1139"></a><span class="p">}</span> +<a id="line-1140" name="line-1140"></a> +<a id="line-1141" name="line-1141"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1142" name="line-1142"></a><span class="n">gdict_defbox_find_forward</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-1143" name="line-1143"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">,</span> +<a id="line-1144" name="line-1144"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_typing</span><span class="p">)</span> +<a id="line-1145" name="line-1145"></a><span class="p">{</span> +<a id="line-1146" name="line-1146"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1147" name="line-1147"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start_iter</span><span class="p">,</span><span class="w"> </span><span class="n">end_iter</span><span class="p">;</span> +<a id="line-1148" name="line-1148"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">match_start</span><span class="p">,</span><span class="w"> </span><span class="n">match_end</span><span class="p">;</span> +<a id="line-1149" name="line-1149"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1150" name="line-1150"></a><span class="w"> </span><span class="n">GtkTextMark</span><span class="w"> </span><span class="o">*</span><span class="n">last_search</span><span class="p">;</span> +<a id="line-1151" name="line-1151"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-1152" name="line-1152"></a> +<a id="line-1153" name="line-1153"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TEXT_BUFFER</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">));</span> +<a id="line-1154" name="line-1154"></a> +<a id="line-1155" name="line-1155"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_bounds</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start_iter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">);</span> +<a id="line-1156" name="line-1156"></a> +<a id="line-1157" name="line-1157"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">is_typing</span><span class="p">)</span> +<a id="line-1158" name="line-1158"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1159" name="line-1159"></a><span class="w"> </span><span class="cm">/* if there already has been another result, begin from there */</span> +<a id="line-1160" name="line-1160"></a><span class="w"> </span><span class="n">last_search</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"last-search-next"</span><span class="p">);</span> +<a id="line-1161" name="line-1161"></a> +<a id="line-1162" name="line-1162"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">last_search</span><span class="p">)</span> +<a id="line-1163" name="line-1163"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">last_search</span><span class="p">);</span> +<a id="line-1164" name="line-1164"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1165" name="line-1165"></a><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">start_iter</span><span class="p">;</span> +<a id="line-1166" name="line-1166"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1167" name="line-1167"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1168" name="line-1168"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1169" name="line-1169"></a><span class="w"> </span><span class="n">last_search</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"last-search-prev"</span><span class="p">);</span> +<a id="line-1170" name="line-1170"></a> +<a id="line-1171" name="line-1171"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">last_search</span><span class="p">)</span> +<a id="line-1172" name="line-1172"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">last_search</span><span class="p">);</span> +<a id="line-1173" name="line-1173"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1174" name="line-1174"></a><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">start_iter</span><span class="p">;</span> +<a id="line-1175" name="line-1175"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1176" name="line-1176"></a> +<a id="line-1177" name="line-1177"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_iter_forward_search</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span> +<a id="line-1178" name="line-1178"></a><span class="w"> </span><span class="o">&</span><span class="n">match_start</span><span class="p">,</span> +<a id="line-1179" name="line-1179"></a><span class="w"> </span><span class="o">&</span><span class="n">match_end</span><span class="p">,</span> +<a id="line-1180" name="line-1180"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="p">)</span> +<a id="line-1182" name="line-1182"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="n">gtk_text_view_scroll_to_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span> +<a id="line-1184" name="line-1184"></a><span class="w"> </span><span class="o">&</span><span class="n">match_start</span><span class="p">,</span> +<a id="line-1185" name="line-1185"></a><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span> +<a id="line-1186" name="line-1186"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-1187" name="line-1187"></a><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-1188" name="line-1188"></a><span class="w"> </span><span class="n">gtk_text_buffer_place_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">match_end</span><span class="p">);</span> +<a id="line-1189" name="line-1189"></a><span class="w"> </span><span class="n">gtk_text_buffer_move_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span> +<a id="line-1190" name="line-1190"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"selection_bound"</span><span class="p">),</span> +<a id="line-1191" name="line-1191"></a><span class="w"> </span><span class="o">&</span><span class="n">match_start</span><span class="p">);</span> +<a id="line-1192" name="line-1192"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"last-search-prev"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">match_start</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1193" name="line-1193"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"last-search-next"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">match_end</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1194" name="line-1194"></a> +<a id="line-1195" name="line-1195"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1196" name="line-1196"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1197" name="line-1197"></a> +<a id="line-1198" name="line-1198"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1199" name="line-1199"></a><span class="p">}</span> +<a id="line-1200" name="line-1200"></a> +<a id="line-1201" name="line-1201"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1202" name="line-1202"></a><span class="n">find_next_clicked_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1203" name="line-1203"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1204" name="line-1204"></a><span class="p">{</span> +<a id="line-1205" name="line-1205"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-1206" name="line-1206"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1207" name="line-1207"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">;</span> +<a id="line-1208" name="line-1208"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">found</span><span class="p">;</span> +<a id="line-1209" name="line-1209"></a> +<a id="line-1210" name="line-1210"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">);</span> +<a id="line-1211" name="line-1211"></a> +<a id="line-1212" name="line-1212"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_entry</span><span class="p">));</span> +<a id="line-1213" name="line-1213"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">text</span><span class="p">)</span> +<a id="line-1214" name="line-1214"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1215" name="line-1215"></a> +<a id="line-1216" name="line-1216"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_find_forward</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1217" name="line-1217"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">found</span><span class="p">)</span> +<a id="line-1218" name="line-1218"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1219" name="line-1219"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">;</span> +<a id="line-1220" name="line-1220"></a> +<a id="line-1221" name="line-1221"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="s">" <i>"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Not found"</span><span class="p">),</span><span class="w"> </span><span class="s">"</i>"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1222" name="line-1222"></a><span class="w"> </span><span class="n">gtk_label_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">),</span><span class="w"> </span><span class="n">str</span><span class="p">);</span> +<a id="line-1223" name="line-1223"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">);</span> +<a id="line-1224" name="line-1224"></a> +<a id="line-1225" name="line-1225"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-1226" name="line-1226"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1227" name="line-1227"></a> +<a id="line-1228" name="line-1228"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">)</span> +<a id="line-1229" name="line-1229"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1230" name="line-1230"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">);</span> +<a id="line-1231" name="line-1231"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add_seconds</span><span class="w"> </span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="n">hide_find_pane</span><span class="p">,</span><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1232" name="line-1232"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1233" name="line-1233"></a><span class="p">}</span> +<a id="line-1234" name="line-1234"></a> +<a id="line-1235" name="line-1235"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1236" name="line-1236"></a><span class="n">find_entry_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1237" name="line-1237"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1238" name="line-1238"></a><span class="p">{</span> +<a id="line-1239" name="line-1239"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-1240" name="line-1240"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1241" name="line-1241"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">;</span> +<a id="line-1242" name="line-1242"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">found</span><span class="p">;</span> +<a id="line-1243" name="line-1243"></a> +<a id="line-1244" name="line-1244"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">);</span> +<a id="line-1245" name="line-1245"></a> +<a id="line-1246" name="line-1246"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_editable_get_chars</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1247" name="line-1247"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">text</span><span class="p">)</span> +<a id="line-1248" name="line-1248"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1249" name="line-1249"></a> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_find_forward</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1251" name="line-1251"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">found</span><span class="p">)</span> +<a id="line-1252" name="line-1252"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1253" name="line-1253"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">;</span> +<a id="line-1254" name="line-1254"></a> +<a id="line-1255" name="line-1255"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="s">" <i>"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Not found"</span><span class="p">),</span><span class="w"> </span><span class="s">"</i>"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1256" name="line-1256"></a><span class="w"> </span><span class="n">gtk_label_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">),</span><span class="w"> </span><span class="n">str</span><span class="p">);</span> +<a id="line-1257" name="line-1257"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">);</span> +<a id="line-1258" name="line-1258"></a> +<a id="line-1259" name="line-1259"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-1260" name="line-1260"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1261" name="line-1261"></a> +<a id="line-1262" name="line-1262"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-1263" name="line-1263"></a> +<a id="line-1264" name="line-1264"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">)</span> +<a id="line-1265" name="line-1265"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1266" name="line-1266"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">);</span> +<a id="line-1267" name="line-1267"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add_seconds</span><span class="w"> </span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="n">hide_find_pane</span><span class="p">,</span><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1268" name="line-1268"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1269" name="line-1269"></a><span class="p">}</span> +<a id="line-1270" name="line-1270"></a> +<a id="line-1271" name="line-1271"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1272" name="line-1272"></a><span class="n">close_button_clicked</span><span class="w"> </span><span class="p">(</span><span class="n">GtkButton</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">,</span> +<a id="line-1273" name="line-1273"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1274" name="line-1274"></a><span class="p">{</span> +<a id="line-1275" name="line-1275"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1276" name="line-1276"></a> +<a id="line-1277" name="line-1277"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">)</span> +<a id="line-1278" name="line-1278"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">);</span> +<a id="line-1279" name="line-1279"></a> +<a id="line-1280" name="line-1280"></a><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="w"> </span><span class="n">hide_find_pane</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">);</span> +<a id="line-1281" name="line-1281"></a><span class="p">}</span> +<a id="line-1282" name="line-1282"></a> +<a id="line-1283" name="line-1283"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-1284" name="line-1284"></a><span class="n">create_find_pane</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1285" name="line-1285"></a><span class="p">{</span> +<a id="line-1286" name="line-1286"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1287" name="line-1287"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">find_pane</span><span class="p">;</span> +<a id="line-1288" name="line-1288"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="p">;</span> +<a id="line-1289" name="line-1289"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">sep</span><span class="p">;</span> +<a id="line-1290" name="line-1290"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hbox1</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">hbox2</span><span class="p">;</span> +<a id="line-1291" name="line-1291"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">;</span> +<a id="line-1292" name="line-1292"></a> +<a id="line-1293" name="line-1293"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1294" name="line-1294"></a> +<a id="line-1295" name="line-1295"></a><span class="w"> </span><span class="n">find_pane</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1296" name="line-1296"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">find_pane</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1297" name="line-1297"></a> +<a id="line-1298" name="line-1298"></a><span class="w"> </span><span class="n">hbox1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1299" name="line-1299"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">find_pane</span><span class="p">),</span><span class="w"> </span><span class="n">hbox1</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1300" name="line-1300"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">hbox1</span><span class="p">);</span> +<a id="line-1301" name="line-1301"></a> +<a id="line-1302" name="line-1302"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1303" name="line-1303"></a><span class="w"> </span><span class="n">gtk_button_set_relief</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_RELIEF_NONE</span><span class="p">);</span> +<a id="line-1304" name="line-1304"></a><span class="w"> </span><span class="n">gtk_button_set_image</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">),</span> +<a id="line-1305" name="line-1305"></a><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"window-close"</span><span class="p">,</span> +<a id="line-1306" name="line-1306"></a><span class="w"> </span><span class="n">GTK_ICON_SIZE_BUTTON</span><span class="p">));</span> +<a id="line-1307" name="line-1307"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-1308" name="line-1308"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">close_button_clicked</span><span class="p">),</span><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1309" name="line-1309"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox1</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1310" name="line-1310"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">);</span> +<a id="line-1311" name="line-1311"></a> +<a id="line-1312" name="line-1312"></a><span class="w"> </span><span class="n">hbox2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">12</span><span class="p">);</span> +<a id="line-1313" name="line-1313"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox1</span><span class="p">),</span><span class="w"> </span><span class="n">hbox2</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1314" name="line-1314"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">hbox2</span><span class="p">);</span> +<a id="line-1315" name="line-1315"></a> +<a id="line-1316" name="line-1316"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"F_ind:"</span><span class="p">));</span> +<a id="line-1317" name="line-1317"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox2</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1318" name="line-1318"></a> +<a id="line-1319" name="line-1319"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1320" name="line-1320"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_entry</span><span class="p">,</span><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span> +<a id="line-1321" name="line-1321"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">find_entry_changed_cb</span><span class="p">),</span><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1322" name="line-1322"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox2</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1323" name="line-1323"></a><span class="w"> </span><span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_entry</span><span class="p">);</span> +<a id="line-1324" name="line-1324"></a> +<a id="line-1325" name="line-1325"></a><span class="w"> </span><span class="n">sep</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_separator_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">);</span> +<a id="line-1326" name="line-1326"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox1</span><span class="p">),</span><span class="w"> </span><span class="n">sep</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1327" name="line-1327"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">sep</span><span class="p">);</span> +<a id="line-1328" name="line-1328"></a> +<a id="line-1329" name="line-1329"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_prev</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Previous"</span><span class="p">));</span> +<a id="line-1330" name="line-1330"></a><span class="w"> </span><span class="n">gtk_button_set_image</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_prev</span><span class="p">),</span> +<a id="line-1331" name="line-1331"></a><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"go-previous"</span><span class="p">,</span> +<a id="line-1332" name="line-1332"></a><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">));</span> +<a id="line-1333" name="line-1333"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_prev</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-1334" name="line-1334"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">find_prev_clicked_cb</span><span class="p">),</span><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1335" name="line-1335"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox1</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_prev</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1336" name="line-1336"></a> +<a id="line-1337" name="line-1337"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_next</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Next"</span><span class="p">));</span> +<a id="line-1338" name="line-1338"></a><span class="w"> </span><span class="n">gtk_button_set_image</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_next</span><span class="p">),</span> +<a id="line-1339" name="line-1339"></a><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"go-next"</span><span class="p">,</span> +<a id="line-1340" name="line-1340"></a><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">));</span> +<a id="line-1341" name="line-1341"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_next</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-1342" name="line-1342"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">find_next_clicked_cb</span><span class="p">),</span><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1343" name="line-1343"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox1</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_next</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1344" name="line-1344"></a> +<a id="line-1345" name="line-1345"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1346" name="line-1346"></a><span class="w"> </span><span class="n">gtk_label_set_use_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1347" name="line-1347"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">find_pane</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1348" name="line-1348"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_label</span><span class="p">);</span> +<a id="line-1349" name="line-1349"></a> +<a id="line-1350" name="line-1350"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">find_pane</span><span class="p">;</span> +<a id="line-1351" name="line-1351"></a><span class="p">}</span> +<a id="line-1352" name="line-1352"></a> +<a id="line-1353" name="line-1353"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1354" name="line-1354"></a><span class="n">gdict_defbox_init_tags</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1355" name="line-1355"></a><span class="p">{</span> +<a id="line-1356" name="line-1356"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1357" name="line-1357"></a> +<a id="line-1358" name="line-1358"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TEXT_BUFFER</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">));</span> +<a id="line-1359" name="line-1359"></a> +<a id="line-1360" name="line-1360"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"italic"</span><span class="p">,</span> +<a id="line-1361" name="line-1361"></a><span class="w"> </span><span class="s">"style"</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_STYLE_ITALIC</span><span class="p">,</span> +<a id="line-1362" name="line-1362"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1363" name="line-1363"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"bold"</span><span class="p">,</span> +<a id="line-1364" name="line-1364"></a><span class="w"> </span><span class="s">"weight"</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_WEIGHT_BOLD</span><span class="p">,</span> +<a id="line-1365" name="line-1365"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1366" name="line-1366"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"underline"</span><span class="p">,</span> +<a id="line-1367" name="line-1367"></a><span class="w"> </span><span class="s">"underline"</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_UNDERLINE_SINGLE</span><span class="p">,</span> +<a id="line-1368" name="line-1368"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1369" name="line-1369"></a> +<a id="line-1370" name="line-1370"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"big"</span><span class="p">,</span> +<a id="line-1371" name="line-1371"></a><span class="w"> </span><span class="s">"scale"</span><span class="p">,</span><span class="w"> </span><span class="mf">1.6</span><span class="p">,</span> +<a id="line-1372" name="line-1372"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1373" name="line-1373"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"small"</span><span class="p">,</span> +<a id="line-1374" name="line-1374"></a><span class="w"> </span><span class="s">"scale"</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_SCALE_SMALL</span><span class="p">,</span> +<a id="line-1375" name="line-1375"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1376" name="line-1376"></a> +<a id="line-1377" name="line-1377"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1378" name="line-1378"></a><span class="w"> </span><span class="n">GtkSettings</span><span class="w"> </span><span class="o">*</span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_settings</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-1379" name="line-1379"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">prefer_dark</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1380" name="line-1380"></a><span class="w"> </span><span class="n">GdkRGBA</span><span class="w"> </span><span class="n">rgba</span><span class="p">;</span> +<a id="line-1381" name="line-1381"></a> +<a id="line-1382" name="line-1382"></a><span class="w"> </span><span class="cm">/* HACK: we're hardcoding the Adwaita values because GtkTextTag</span> +<a id="line-1383" name="line-1383"></a><span class="cm"> * cannot be styled via CSS</span> +<a id="line-1384" name="line-1384"></a><span class="cm"> */</span> +<a id="line-1385" name="line-1385"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="s">"gtk-application-prefer-dark-theme"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">prefer_dark</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1386" name="line-1386"></a> +<a id="line-1387" name="line-1387"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefer_dark</span><span class="p">)</span> +<a id="line-1388" name="line-1388"></a><span class="w"> </span><span class="n">gdk_rgba_parse</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">rgba</span><span class="p">,</span><span class="w"> </span><span class="s">"#2a76c6"</span><span class="p">);</span> +<a id="line-1389" name="line-1389"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1390" name="line-1390"></a><span class="w"> </span><span class="n">gdk_rgba_parse</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">rgba</span><span class="p">,</span><span class="w"> </span><span class="s">"#4a90d9"</span><span class="p">);</span> +<a id="line-1391" name="line-1391"></a> +<a id="line-1392" name="line-1392"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">link_tag</span><span class="w"> </span><span class="o">=</span> +<a id="line-1393" name="line-1393"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"link"</span><span class="p">,</span> +<a id="line-1394" name="line-1394"></a><span class="w"> </span><span class="s">"underline"</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_UNDERLINE_SINGLE</span><span class="p">,</span> +<a id="line-1395" name="line-1395"></a><span class="w"> </span><span class="s">"foreground-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rgba</span><span class="p">,</span> +<a id="line-1396" name="line-1396"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1397" name="line-1397"></a> +<a id="line-1398" name="line-1398"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">prefer_dark</span><span class="p">)</span> +<a id="line-1399" name="line-1399"></a><span class="w"> </span><span class="n">gdk_rgba_parse</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">rgba</span><span class="p">,</span><span class="w"> </span><span class="s">"#215d9c"</span><span class="p">);</span> +<a id="line-1400" name="line-1400"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1401" name="line-1401"></a><span class="w"> </span><span class="n">gdk_rgba_parse</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">rgba</span><span class="p">,</span><span class="w"> </span><span class="s">"#2a76c6"</span><span class="p">);</span> +<a id="line-1402" name="line-1402"></a> +<a id="line-1403" name="line-1403"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">visited_link_tag</span><span class="w"> </span><span class="o">=</span> +<a id="line-1404" name="line-1404"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"visited-link"</span><span class="p">,</span> +<a id="line-1405" name="line-1405"></a><span class="w"> </span><span class="s">"underline"</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_UNDERLINE_SINGLE</span><span class="p">,</span> +<a id="line-1406" name="line-1406"></a><span class="w"> </span><span class="s">"foreground-rgba"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rgba</span><span class="p">,</span> +<a id="line-1407" name="line-1407"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1408" name="line-1408"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1409" name="line-1409"></a> +<a id="line-1410" name="line-1410"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"phonetic"</span><span class="p">,</span> +<a id="line-1411" name="line-1411"></a><span class="w"> </span><span class="s">"foreground"</span><span class="p">,</span><span class="w"> </span><span class="s">"dark gray"</span><span class="p">,</span> +<a id="line-1412" name="line-1412"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1413" name="line-1413"></a> +<a id="line-1414" name="line-1414"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"query-title"</span><span class="p">,</span> +<a id="line-1415" name="line-1415"></a><span class="w"> </span><span class="s">"left-margin"</span><span class="p">,</span><span class="w"> </span><span class="n">QUERY_MARGIN</span><span class="p">,</span> +<a id="line-1416" name="line-1416"></a><span class="w"> </span><span class="s">"pixels-above-lines"</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span> +<a id="line-1417" name="line-1417"></a><span class="w"> </span><span class="s">"pixels-below-lines"</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">,</span> +<a id="line-1418" name="line-1418"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1419" name="line-1419"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"query-from"</span><span class="p">,</span> +<a id="line-1420" name="line-1420"></a><span class="w"> </span><span class="s">"foreground"</span><span class="p">,</span><span class="w"> </span><span class="s">"dark gray"</span><span class="p">,</span> +<a id="line-1421" name="line-1421"></a><span class="w"> </span><span class="s">"scale"</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_SCALE_SMALL</span><span class="p">,</span> +<a id="line-1422" name="line-1422"></a><span class="w"> </span><span class="s">"left-margin"</span><span class="p">,</span><span class="w"> </span><span class="n">QUERY_MARGIN</span><span class="p">,</span> +<a id="line-1423" name="line-1423"></a><span class="w"> </span><span class="s">"pixels-above-lines"</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span> +<a id="line-1424" name="line-1424"></a><span class="w"> </span><span class="s">"pixels-below-lines"</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span> +<a id="line-1425" name="line-1425"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1426" name="line-1426"></a> +<a id="line-1427" name="line-1427"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"error-title"</span><span class="p">,</span> +<a id="line-1428" name="line-1428"></a><span class="w"> </span><span class="s">"foreground"</span><span class="p">,</span><span class="w"> </span><span class="s">"dark red"</span><span class="p">,</span> +<a id="line-1429" name="line-1429"></a><span class="w"> </span><span class="s">"left-margin"</span><span class="p">,</span><span class="w"> </span><span class="n">ERROR_MARGIN</span><span class="p">,</span> +<a id="line-1430" name="line-1430"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1431" name="line-1431"></a><span class="w"> </span><span class="n">gtk_text_buffer_create_tag</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"error-message"</span><span class="p">,</span> +<a id="line-1432" name="line-1432"></a><span class="w"> </span><span class="s">"left-margin"</span><span class="p">,</span><span class="w"> </span><span class="n">ERROR_MARGIN</span><span class="p">,</span> +<a id="line-1433" name="line-1433"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1434" name="line-1434"></a><span class="p">}</span> +<a id="line-1435" name="line-1435"></a> +<a id="line-1436" name="line-1436"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1437" name="line-1437"></a><span class="n">follow_if_is_link</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-1438" name="line-1438"></a><span class="w"> </span><span class="n">GtkTextView</span><span class="w"> </span><span class="o">*</span><span class="n">text_view</span><span class="p">,</span> +<a id="line-1439" name="line-1439"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">)</span> +<a id="line-1440" name="line-1440"></a><span class="p">{</span> +<a id="line-1441" name="line-1441"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">tags</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-1442" name="line-1442"></a> +<a id="line-1443" name="line-1443"></a><span class="w"> </span><span class="n">tags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_tags</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1444" name="line-1444"></a> +<a id="line-1445" name="line-1445"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tags</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-1446" name="line-1446"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1447" name="line-1447"></a><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1448" name="line-1448"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-1449" name="line-1449"></a> +<a id="line-1450" name="line-1450"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">),</span><span class="w"> </span><span class="s">"name"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1451" name="line-1451"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="w"> </span><span class="o">&&</span> +<a id="line-1452" name="line-1452"></a><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="s">"link"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">||</span> +<a id="line-1453" name="line-1453"></a><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="s">"visited-link"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span> +<a id="line-1454" name="line-1454"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1455" name="line-1455"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">);</span> +<a id="line-1456" name="line-1456"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-1457" name="line-1457"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">link_str</span><span class="p">;</span> +<a id="line-1458" name="line-1458"></a> +<a id="line-1459" name="line-1459"></a><span class="w"> </span><span class="n">start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-1460" name="line-1460"></a><span class="w"> </span><span class="n">end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-1461" name="line-1461"></a> +<a id="line-1462" name="line-1462"></a><span class="w"> </span><span class="n">gtk_text_iter_backward_to_tag_toggle</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-1463" name="line-1463"></a><span class="w"> </span><span class="n">gtk_text_iter_forward_to_tag_toggle</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">tag</span><span class="p">);</span> +<a id="line-1464" name="line-1464"></a> +<a id="line-1465" name="line-1465"></a><span class="w"> </span><span class="n">link_str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1466" name="line-1466"></a> +<a id="line-1467" name="line-1467"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_defbox_signals</span><span class="p">[</span><span class="n">LINK_CLICKED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">link_str</span><span class="p">);</span> +<a id="line-1468" name="line-1468"></a> +<a id="line-1469" name="line-1469"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">link_str</span><span class="p">);</span> +<a id="line-1470" name="line-1470"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-1471" name="line-1471"></a> +<a id="line-1472" name="line-1472"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1473" name="line-1473"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1474" name="line-1474"></a> +<a id="line-1475" name="line-1475"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-1476" name="line-1476"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1477" name="line-1477"></a> +<a id="line-1478" name="line-1478"></a><span class="w"> </span><span class="n">g_slist_free</span><span class="w"> </span><span class="p">(</span><span class="n">tags</span><span class="p">);</span> +<a id="line-1479" name="line-1479"></a><span class="p">}</span> +<a id="line-1480" name="line-1480"></a> +<a id="line-1481" name="line-1481"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1482" name="line-1482"></a><span class="n">defbox_event_after_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">text_view</span><span class="p">,</span> +<a id="line-1483" name="line-1483"></a><span class="w"> </span><span class="n">GdkEvent</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-1484" name="line-1484"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1485" name="line-1485"></a><span class="p">{</span> +<a id="line-1486" name="line-1486"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1487" name="line-1487"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-1488" name="line-1488"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">button_event</span><span class="p">;</span> +<a id="line-1489" name="line-1489"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">bx</span><span class="p">,</span><span class="w"> </span><span class="n">by</span><span class="p">;</span> +<a id="line-1490" name="line-1490"></a> +<a id="line-1491" name="line-1491"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">GDK_BUTTON_RELEASE</span><span class="p">)</span> +<a id="line-1492" name="line-1492"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1493" name="line-1493"></a> +<a id="line-1494" name="line-1494"></a><span class="w"> </span><span class="n">button_event</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">event</span><span class="p">;</span> +<a id="line-1495" name="line-1495"></a> +<a id="line-1496" name="line-1496"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">button_event</span><span class="o">-></span><span class="n">button</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span> +<a id="line-1497" name="line-1497"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1498" name="line-1498"></a> +<a id="line-1499" name="line-1499"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">));</span> +<a id="line-1500" name="line-1500"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_buffer_get_has_selection</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">))</span> +<a id="line-1501" name="line-1501"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1502" name="line-1502"></a> +<a id="line-1503" name="line-1503"></a><span class="w"> </span><span class="n">gtk_text_view_window_to_buffer_coords</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">),</span> +<a id="line-1504" name="line-1504"></a><span class="w"> </span><span class="n">GTK_TEXT_WINDOW_WIDGET</span><span class="p">,</span> +<a id="line-1505" name="line-1505"></a><span class="w"> </span><span class="n">button_event</span><span class="o">-></span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">button_event</span><span class="o">-></span><span class="n">y</span><span class="p">,</span> +<a id="line-1506" name="line-1506"></a><span class="w"> </span><span class="o">&</span><span class="n">bx</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">by</span><span class="p">);</span> +<a id="line-1507" name="line-1507"></a> +<a id="line-1508" name="line-1508"></a><span class="w"> </span><span class="n">gtk_text_view_get_iter_at_location</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">),</span> +<a id="line-1509" name="line-1509"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-1510" name="line-1510"></a><span class="w"> </span><span class="n">bx</span><span class="p">,</span><span class="w"> </span><span class="n">by</span><span class="p">);</span> +<a id="line-1511" name="line-1511"></a> +<a id="line-1512" name="line-1512"></a><span class="w"> </span><span class="n">follow_if_is_link</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1513" name="line-1513"></a> +<a id="line-1514" name="line-1514"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1515" name="line-1515"></a><span class="p">}</span> +<a id="line-1516" name="line-1516"></a> +<a id="line-1517" name="line-1517"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1518" name="line-1518"></a><span class="n">set_cursor_if_appropriate</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-1519" name="line-1519"></a><span class="w"> </span><span class="n">GtkTextView</span><span class="w"> </span><span class="o">*</span><span class="n">text_view</span><span class="p">,</span> +<a id="line-1520" name="line-1520"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">x</span><span class="p">,</span> +<a id="line-1521" name="line-1521"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">y</span><span class="p">)</span> +<a id="line-1522" name="line-1522"></a><span class="p">{</span> +<a id="line-1523" name="line-1523"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1524" name="line-1524"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">tags</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-1525" name="line-1525"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-1526" name="line-1526"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">hovering</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1527" name="line-1527"></a> +<a id="line-1528" name="line-1528"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1529" name="line-1529"></a> +<a id="line-1530" name="line-1530"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">hand_cursor</span><span class="p">)</span> +<a id="line-1531" name="line-1531"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1532" name="line-1532"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-1533" name="line-1533"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hand_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_HAND2</span><span class="p">);</span> +<a id="line-1534" name="line-1534"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1535" name="line-1535"></a> +<a id="line-1536" name="line-1536"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">regular_cursor</span><span class="p">)</span> +<a id="line-1537" name="line-1537"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1538" name="line-1538"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-1539" name="line-1539"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">regular_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_XTERM</span><span class="p">);</span> +<a id="line-1540" name="line-1540"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1541" name="line-1541"></a> +<a id="line-1542" name="line-1542"></a><span class="w"> </span><span class="n">gtk_text_view_get_iter_at_location</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">);</span> +<a id="line-1543" name="line-1543"></a> +<a id="line-1544" name="line-1544"></a><span class="w"> </span><span class="n">tags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_tags</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-1545" name="line-1545"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tags</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-1546" name="line-1546"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1547" name="line-1547"></a><span class="w"> </span><span class="n">GtkTextTag</span><span class="w"> </span><span class="o">*</span><span class="n">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-1548" name="line-1548"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-1549" name="line-1549"></a> +<a id="line-1550" name="line-1550"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">tag</span><span class="p">),</span><span class="w"> </span><span class="s">"name"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1551" name="line-1551"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="w"> </span><span class="o">&&</span> +<a id="line-1552" name="line-1552"></a><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="s">"link"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">||</span> +<a id="line-1553" name="line-1553"></a><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="s">"visited-link"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span> +<a id="line-1554" name="line-1554"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1555" name="line-1555"></a><span class="w"> </span><span class="n">hovering</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1556" name="line-1556"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-1557" name="line-1557"></a> +<a id="line-1558" name="line-1558"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1559" name="line-1559"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1560" name="line-1560"></a> +<a id="line-1561" name="line-1561"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-1562" name="line-1562"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1563" name="line-1563"></a> +<a id="line-1564" name="line-1564"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">hovering</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">is_hovering</span><span class="p">)</span> +<a id="line-1565" name="line-1565"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1566" name="line-1566"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">is_hovering</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">hovering</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1567" name="line-1567"></a> +<a id="line-1568" name="line-1568"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">is_hovering</span><span class="p">)</span> +<a id="line-1569" name="line-1569"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_view_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">,</span> +<a id="line-1570" name="line-1570"></a><span class="w"> </span><span class="n">GTK_TEXT_WINDOW_TEXT</span><span class="p">),</span> +<a id="line-1571" name="line-1571"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">hand_cursor</span><span class="p">);</span> +<a id="line-1572" name="line-1572"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1573" name="line-1573"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_text_view_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">,</span> +<a id="line-1574" name="line-1574"></a><span class="w"> </span><span class="n">GTK_TEXT_WINDOW_TEXT</span><span class="p">),</span> +<a id="line-1575" name="line-1575"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">regular_cursor</span><span class="p">);</span> +<a id="line-1576" name="line-1576"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1577" name="line-1577"></a> +<a id="line-1578" name="line-1578"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tags</span><span class="p">)</span> +<a id="line-1579" name="line-1579"></a><span class="w"> </span><span class="n">g_slist_free</span><span class="w"> </span><span class="p">(</span><span class="n">tags</span><span class="p">);</span> +<a id="line-1580" name="line-1580"></a><span class="p">}</span> +<a id="line-1581" name="line-1581"></a> +<a id="line-1582" name="line-1582"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1583" name="line-1583"></a><span class="n">defbox_motion_notify_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">text_view</span><span class="p">,</span> +<a id="line-1584" name="line-1584"></a><span class="w"> </span><span class="n">GdkEventMotion</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-1585" name="line-1585"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1586" name="line-1586"></a><span class="p">{</span> +<a id="line-1587" name="line-1587"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">bx</span><span class="p">,</span><span class="w"> </span><span class="n">by</span><span class="p">;</span> +<a id="line-1588" name="line-1588"></a> +<a id="line-1589" name="line-1589"></a><span class="w"> </span><span class="n">gtk_text_view_window_to_buffer_coords</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">),</span> +<a id="line-1590" name="line-1590"></a><span class="w"> </span><span class="n">GTK_TEXT_WINDOW_WIDGET</span><span class="p">,</span> +<a id="line-1591" name="line-1591"></a><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y</span><span class="p">,</span> +<a id="line-1592" name="line-1592"></a><span class="w"> </span><span class="o">&</span><span class="n">bx</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">by</span><span class="p">);</span> +<a id="line-1593" name="line-1593"></a> +<a id="line-1594" name="line-1594"></a><span class="w"> </span><span class="n">set_cursor_if_appropriate</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">),</span><span class="w"> </span><span class="n">bx</span><span class="p">,</span><span class="w"> </span><span class="n">by</span><span class="p">);</span> +<a id="line-1595" name="line-1595"></a> +<a id="line-1596" name="line-1596"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1597" name="line-1597"></a><span class="p">}</span> +<a id="line-1598" name="line-1598"></a> +<a id="line-1599" name="line-1599"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1600" name="line-1600"></a><span class="n">defbox_visibility_notify_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">text_view</span><span class="p">,</span> +<a id="line-1601" name="line-1601"></a><span class="w"> </span><span class="n">GdkEventVisibility</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-1602" name="line-1602"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1603" name="line-1603"></a><span class="p">{</span> +<a id="line-1604" name="line-1604"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-1605" name="line-1605"></a><span class="w"> </span><span class="n">GdkSeat</span><span class="w"> </span><span class="o">*</span><span class="n">seat</span><span class="p">;</span> +<a id="line-1606" name="line-1606"></a><span class="w"> </span><span class="n">GdkDevice</span><span class="w"> </span><span class="o">*</span><span class="n">pointer</span><span class="p">;</span> +<a id="line-1607" name="line-1607"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">wx</span><span class="p">,</span><span class="w"> </span><span class="n">wy</span><span class="p">;</span> +<a id="line-1608" name="line-1608"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">bx</span><span class="p">,</span><span class="w"> </span><span class="n">by</span><span class="p">;</span> +<a id="line-1609" name="line-1609"></a> +<a id="line-1610" name="line-1610"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">window</span><span class="p">);</span> +<a id="line-1611" name="line-1611"></a><span class="w"> </span><span class="n">seat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_default_seat</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-1612" name="line-1612"></a><span class="w"> </span><span class="n">pointer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_seat_get_pointer</span><span class="w"> </span><span class="p">(</span><span class="n">seat</span><span class="p">);</span> +<a id="line-1613" name="line-1613"></a><span class="w"> </span><span class="n">gdk_window_get_device_position</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">),</span><span class="w"> </span><span class="n">pointer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">wx</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">wy</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1614" name="line-1614"></a> +<a id="line-1615" name="line-1615"></a><span class="w"> </span><span class="n">gtk_text_view_window_to_buffer_coords</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">),</span> +<a id="line-1616" name="line-1616"></a><span class="w"> </span><span class="n">GTK_TEXT_WINDOW_WIDGET</span><span class="p">,</span> +<a id="line-1617" name="line-1617"></a><span class="w"> </span><span class="n">wx</span><span class="p">,</span><span class="w"> </span><span class="n">wy</span><span class="p">,</span> +<a id="line-1618" name="line-1618"></a><span class="w"> </span><span class="o">&</span><span class="n">bx</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">by</span><span class="p">);</span> +<a id="line-1619" name="line-1619"></a> +<a id="line-1620" name="line-1620"></a><span class="w"> </span><span class="n">set_cursor_if_appropriate</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">text_view</span><span class="p">),</span><span class="w"> </span><span class="n">bx</span><span class="p">,</span><span class="w"> </span><span class="n">by</span><span class="p">);</span> +<a id="line-1621" name="line-1621"></a> +<a id="line-1622" name="line-1622"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1623" name="line-1623"></a><span class="p">}</span> +<a id="line-1624" name="line-1624"></a> +<a id="line-1625" name="line-1625"></a><span class="k">static</span><span class="w"> </span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span> +<a id="line-1626" name="line-1626"></a><span class="n">gdict_defbox_constructor</span><span class="w"> </span><span class="p">(</span><span class="n">GType</span><span class="w"> </span><span class="n">type</span><span class="p">,</span> +<a id="line-1627" name="line-1627"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">n_construct_properties</span><span class="p">,</span> +<a id="line-1628" name="line-1628"></a><span class="w"> </span><span class="n">GObjectConstructParam</span><span class="w"> </span><span class="o">*</span><span class="n">construct_params</span><span class="p">)</span> +<a id="line-1629" name="line-1629"></a><span class="p">{</span> +<a id="line-1630" name="line-1630"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">;</span> +<a id="line-1631" name="line-1631"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1632" name="line-1632"></a><span class="w"> </span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">;</span> +<a id="line-1633" name="line-1633"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">sw</span><span class="p">;</span> +<a id="line-1634" name="line-1634"></a> +<a id="line-1635" name="line-1635"></a><span class="w"> </span><span class="n">object</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_defbox_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">constructor</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="p">,</span> +<a id="line-1636" name="line-1636"></a><span class="w"> </span><span class="n">n_construct_properties</span><span class="p">,</span> +<a id="line-1637" name="line-1637"></a><span class="w"> </span><span class="n">construct_params</span><span class="p">);</span> +<a id="line-1638" name="line-1638"></a><span class="w"> </span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-1639" name="line-1639"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1640" name="line-1640"></a> +<a id="line-1641" name="line-1641"></a><span class="w"> </span><span class="n">sw</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_scrolled_window_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1642" name="line-1642"></a><span class="w"> </span><span class="n">gtk_widget_set_vexpand</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1643" name="line-1643"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_policy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">),</span> +<a id="line-1644" name="line-1644"></a><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">,</span> +<a id="line-1645" name="line-1645"></a><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">);</span> +<a id="line-1646" name="line-1646"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_shadow_type</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">),</span> +<a id="line-1647" name="line-1647"></a><span class="w"> </span><span class="n">GTK_SHADOW_IN</span><span class="p">);</span> +<a id="line-1648" name="line-1648"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">sw</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1649" name="line-1649"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">);</span> +<a id="line-1650" name="line-1650"></a> +<a id="line-1651" name="line-1651"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1652" name="line-1652"></a><span class="w"> </span><span class="n">gdict_defbox_init_tags</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1653" name="line-1653"></a> +<a id="line-1654" name="line-1654"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_new_with_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">);</span> +<a id="line-1655" name="line-1655"></a><span class="w"> </span><span class="n">gtk_text_view_set_editable</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1656" name="line-1656"></a><span class="w"> </span><span class="n">gtk_text_view_set_left_margin</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span><span class="w"> </span><span class="mi">4</span><span class="p">);</span> +<a id="line-1657" name="line-1657"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">);</span> +<a id="line-1658" name="line-1658"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">);</span> +<a id="line-1659" name="line-1659"></a> +<a id="line-1660" name="line-1660"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_pane</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">create_find_pane</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1661" name="line-1661"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">find_pane</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1662" name="line-1662"></a> +<a id="line-1663" name="line-1663"></a><span class="w"> </span><span class="cm">/* stuff to make the link machinery work */</span> +<a id="line-1664" name="line-1664"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">,</span><span class="w"> </span><span class="s">"event-after"</span><span class="p">,</span> +<a id="line-1665" name="line-1665"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">defbox_event_after_cb</span><span class="p">),</span> +<a id="line-1666" name="line-1666"></a><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1667" name="line-1667"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">,</span><span class="w"> </span><span class="s">"motion-notify-event"</span><span class="p">,</span> +<a id="line-1668" name="line-1668"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">defbox_motion_notify_cb</span><span class="p">),</span> +<a id="line-1669" name="line-1669"></a><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1670" name="line-1670"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">,</span><span class="w"> </span><span class="s">"visibility-notify-event"</span><span class="p">,</span> +<a id="line-1671" name="line-1671"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">defbox_visibility_notify_cb</span><span class="p">),</span> +<a id="line-1672" name="line-1672"></a><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1673" name="line-1673"></a> +<a id="line-1674" name="line-1674"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">object</span><span class="p">;</span> +<a id="line-1675" name="line-1675"></a><span class="p">}</span> +<a id="line-1676" name="line-1676"></a> +<a id="line-1677" name="line-1677"></a><span class="cm">/* we override the GtkWidget::show_all method since we have widgets</span> +<a id="line-1678" name="line-1678"></a><span class="cm"> * we don't want to show, such as the find pane</span> +<a id="line-1679" name="line-1679"></a><span class="cm"> */</span> +<a id="line-1680" name="line-1680"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1681" name="line-1681"></a><span class="n">gdict_defbox_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">)</span> +<a id="line-1682" name="line-1682"></a><span class="p">{</span> +<a id="line-1683" name="line-1683"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-1684" name="line-1684"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1685" name="line-1685"></a> +<a id="line-1686" name="line-1686"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-1687" name="line-1687"></a> +<a id="line-1688" name="line-1688"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">show_find</span><span class="p">)</span> +<a id="line-1689" name="line-1689"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_pane</span><span class="p">);</span> +<a id="line-1690" name="line-1690"></a><span class="p">}</span> +<a id="line-1691" name="line-1691"></a> +<a id="line-1692" name="line-1692"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1693" name="line-1693"></a><span class="n">gdict_defbox_real_show_find</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1694" name="line-1694"></a><span class="p">{</span> +<a id="line-1695" name="line-1695"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_pane</span><span class="p">);</span> +<a id="line-1696" name="line-1696"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">show_find</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1697" name="line-1697"></a> +<a id="line-1698" name="line-1698"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_entry</span><span class="p">);</span> +<a id="line-1699" name="line-1699"></a> +<a id="line-1700" name="line-1700"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add_seconds</span><span class="w"> </span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="n">hide_find_pane</span><span class="p">,</span><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1701" name="line-1701"></a><span class="p">}</span> +<a id="line-1702" name="line-1702"></a> +<a id="line-1703" name="line-1703"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1704" name="line-1704"></a><span class="n">gdict_defbox_real_find_next</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1705" name="line-1705"></a><span class="p">{</span> +<a id="line-1706" name="line-1706"></a><span class="w"> </span><span class="cm">/* synthetize a "clicked" signal to the "next" button */</span> +<a id="line-1707" name="line-1707"></a><span class="w"> </span><span class="n">gtk_button_clicked</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_next</span><span class="p">));</span> +<a id="line-1708" name="line-1708"></a><span class="p">}</span> +<a id="line-1709" name="line-1709"></a> +<a id="line-1710" name="line-1710"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1711" name="line-1711"></a><span class="n">gdict_defbox_real_find_previous</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1712" name="line-1712"></a><span class="p">{</span> +<a id="line-1713" name="line-1713"></a><span class="w"> </span><span class="cm">/* synthetize a "clicked" signal to the "prev" button */</span> +<a id="line-1714" name="line-1714"></a><span class="w"> </span><span class="n">gtk_button_clicked</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_prev</span><span class="p">));</span> +<a id="line-1715" name="line-1715"></a><span class="p">}</span> +<a id="line-1716" name="line-1716"></a> +<a id="line-1717" name="line-1717"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1718" name="line-1718"></a><span class="n">gdict_defbox_real_hide_find</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1719" name="line-1719"></a><span class="p">{</span> +<a id="line-1720" name="line-1720"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">find_pane</span><span class="p">);</span> +<a id="line-1721" name="line-1721"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">show_find</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1722" name="line-1722"></a> +<a id="line-1723" name="line-1723"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">);</span> +<a id="line-1724" name="line-1724"></a> +<a id="line-1725" name="line-1725"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">)</span> +<a id="line-1726" name="line-1726"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1727" name="line-1727"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">);</span> +<a id="line-1728" name="line-1728"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1729" name="line-1729"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1730" name="line-1730"></a><span class="p">}</span> +<a id="line-1731" name="line-1731"></a> +<a id="line-1732" name="line-1732"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1733" name="line-1733"></a><span class="n">gdict_defbox_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefboxClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-1734" name="line-1734"></a><span class="p">{</span> +<a id="line-1735" name="line-1735"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">gobject_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-1736" name="line-1736"></a><span class="w"> </span><span class="n">GtkWidgetClass</span><span class="w"> </span><span class="o">*</span><span class="n">widget_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-1737" name="line-1737"></a><span class="w"> </span><span class="n">GtkBindingSet</span><span class="w"> </span><span class="o">*</span><span class="n">binding_set</span><span class="p">;</span> +<a id="line-1738" name="line-1738"></a> +<a id="line-1739" name="line-1739"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">constructor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_constructor</span><span class="p">;</span> +<a id="line-1740" name="line-1740"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">set_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_set_property</span><span class="p">;</span> +<a id="line-1741" name="line-1741"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">get_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_get_property</span><span class="p">;</span> +<a id="line-1742" name="line-1742"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">dispose</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_dispose</span><span class="p">;</span> +<a id="line-1743" name="line-1743"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_finalize</span><span class="p">;</span> +<a id="line-1744" name="line-1744"></a> +<a id="line-1745" name="line-1745"></a><span class="w"> </span><span class="n">widget_class</span><span class="o">-></span><span class="n">show_all</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_show_all</span><span class="p">;</span> +<a id="line-1746" name="line-1746"></a> +<a id="line-1747" name="line-1747"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-1748" name="line-1748"></a><span class="cm"> * GdictDefbox:word:</span> +<a id="line-1749" name="line-1749"></a><span class="cm"> *</span> +<a id="line-1750" name="line-1750"></a><span class="cm"> * The word to look up.</span> +<a id="line-1751" name="line-1751"></a><span class="cm"> *</span> +<a id="line-1752" name="line-1752"></a><span class="cm"> * Since: 0.10</span> +<a id="line-1753" name="line-1753"></a><span class="cm"> */</span> +<a id="line-1754" name="line-1754"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-1755" name="line-1755"></a><span class="w"> </span><span class="n">PROP_WORD</span><span class="p">,</span> +<a id="line-1756" name="line-1756"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"word"</span><span class="p">,</span> +<a id="line-1757" name="line-1757"></a><span class="w"> </span><span class="s">"Word"</span><span class="p">,</span> +<a id="line-1758" name="line-1758"></a><span class="w"> </span><span class="s">"The word to look up"</span><span class="p">,</span> +<a id="line-1759" name="line-1759"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1760" name="line-1760"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="p">));</span> +<a id="line-1761" name="line-1761"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-1762" name="line-1762"></a><span class="cm"> * GdictDefbox:context:</span> +<a id="line-1763" name="line-1763"></a><span class="cm"> *</span> +<a id="line-1764" name="line-1764"></a><span class="cm"> * The #GdictContext object used to get the word definition.</span> +<a id="line-1765" name="line-1765"></a><span class="cm"> *</span> +<a id="line-1766" name="line-1766"></a><span class="cm"> * Since: 0.1</span> +<a id="line-1767" name="line-1767"></a><span class="cm"> */</span> +<a id="line-1768" name="line-1768"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-1769" name="line-1769"></a><span class="w"> </span><span class="n">PROP_CONTEXT</span><span class="p">,</span> +<a id="line-1770" name="line-1770"></a><span class="w"> </span><span class="n">g_param_spec_object</span><span class="w"> </span><span class="p">(</span><span class="s">"context"</span><span class="p">,</span> +<a id="line-1771" name="line-1771"></a><span class="w"> </span><span class="s">"Context"</span><span class="p">,</span> +<a id="line-1772" name="line-1772"></a><span class="w"> </span><span class="s">"The GdictContext object used to get the word definition"</span><span class="p">,</span> +<a id="line-1773" name="line-1773"></a><span class="w"> </span><span class="n">GDICT_TYPE_CONTEXT</span><span class="p">,</span> +<a id="line-1774" name="line-1774"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_CONSTRUCT</span><span class="p">)));</span> +<a id="line-1775" name="line-1775"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-1776" name="line-1776"></a><span class="cm"> * GdictDefbox:database</span> +<a id="line-1777" name="line-1777"></a><span class="cm"> *</span> +<a id="line-1778" name="line-1778"></a><span class="cm"> * The database used by the #GdictDefbox bound to this object to get the word</span> +<a id="line-1779" name="line-1779"></a><span class="cm"> * definition.</span> +<a id="line-1780" name="line-1780"></a><span class="cm"> *</span> +<a id="line-1781" name="line-1781"></a><span class="cm"> * Since: 0.1</span> +<a id="line-1782" name="line-1782"></a><span class="cm"> */</span> +<a id="line-1783" name="line-1783"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-1784" name="line-1784"></a><span class="w"> </span><span class="n">PROP_DATABASE</span><span class="p">,</span> +<a id="line-1785" name="line-1785"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"database"</span><span class="p">,</span> +<a id="line-1786" name="line-1786"></a><span class="w"> </span><span class="s">"Database"</span><span class="p">,</span> +<a id="line-1787" name="line-1787"></a><span class="w"> </span><span class="s">"The database used to query the GdictContext"</span><span class="p">,</span> +<a id="line-1788" name="line-1788"></a><span class="w"> </span><span class="n">GDICT_DEFAULT_DATABASE</span><span class="p">,</span> +<a id="line-1789" name="line-1789"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-1790" name="line-1790"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-1791" name="line-1791"></a><span class="cm"> * GdictDefbox:font-name</span> +<a id="line-1792" name="line-1792"></a><span class="cm"> *</span> +<a id="line-1793" name="line-1793"></a><span class="cm"> * The name of the font used by the #GdictDefbox to display the definitions.</span> +<a id="line-1794" name="line-1794"></a><span class="cm"> * use the same string you use for pango_font_description_from_string().</span> +<a id="line-1795" name="line-1795"></a><span class="cm"> *</span> +<a id="line-1796" name="line-1796"></a><span class="cm"> * Since: 0.3</span> +<a id="line-1797" name="line-1797"></a><span class="cm"> */</span> +<a id="line-1798" name="line-1798"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-1799" name="line-1799"></a><span class="w"> </span><span class="n">PROP_FONT_NAME</span><span class="p">,</span> +<a id="line-1800" name="line-1800"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"font-name"</span><span class="p">,</span> +<a id="line-1801" name="line-1801"></a><span class="w"> </span><span class="s">"Font Name"</span><span class="p">,</span> +<a id="line-1802" name="line-1802"></a><span class="w"> </span><span class="s">"The font to be used by the defbox"</span><span class="p">,</span> +<a id="line-1803" name="line-1803"></a><span class="w"> </span><span class="n">GDICT_DEFAULT_FONT_NAME</span><span class="p">,</span> +<a id="line-1804" name="line-1804"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-1805" name="line-1805"></a> +<a id="line-1806" name="line-1806"></a><span class="w"> </span><span class="n">gdict_defbox_signals</span><span class="p">[</span><span class="n">SHOW_FIND</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-1807" name="line-1807"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"show-find"</span><span class="p">,</span> +<a id="line-1808" name="line-1808"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-1809" name="line-1809"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_SIGNAL_ACTION</span><span class="p">,</span> +<a id="line-1810" name="line-1810"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefboxClass</span><span class="p">,</span><span class="w"> </span><span class="n">show_find</span><span class="p">),</span> +<a id="line-1811" name="line-1811"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1812" name="line-1812"></a><span class="w"> </span><span class="n">gdict_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-1813" name="line-1813"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1814" name="line-1814"></a><span class="w"> </span><span class="n">gdict_defbox_signals</span><span class="p">[</span><span class="n">FIND_PREVIOUS</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-1815" name="line-1815"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"find-previous"</span><span class="p">,</span> +<a id="line-1816" name="line-1816"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-1817" name="line-1817"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_SIGNAL_ACTION</span><span class="p">,</span> +<a id="line-1818" name="line-1818"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefboxClass</span><span class="p">,</span><span class="w"> </span><span class="n">find_previous</span><span class="p">),</span> +<a id="line-1819" name="line-1819"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1820" name="line-1820"></a><span class="w"> </span><span class="n">gdict_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-1821" name="line-1821"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1822" name="line-1822"></a><span class="w"> </span><span class="n">gdict_defbox_signals</span><span class="p">[</span><span class="n">FIND_NEXT</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-1823" name="line-1823"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"find-next"</span><span class="p">,</span> +<a id="line-1824" name="line-1824"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-1825" name="line-1825"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_SIGNAL_ACTION</span><span class="p">,</span> +<a id="line-1826" name="line-1826"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefboxClass</span><span class="p">,</span><span class="w"> </span><span class="n">find_next</span><span class="p">),</span> +<a id="line-1827" name="line-1827"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1828" name="line-1828"></a><span class="w"> </span><span class="n">gdict_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-1829" name="line-1829"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1830" name="line-1830"></a><span class="w"> </span><span class="n">gdict_defbox_signals</span><span class="p">[</span><span class="n">HIDE_FIND</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-1831" name="line-1831"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"hide-find"</span><span class="p">,</span> +<a id="line-1832" name="line-1832"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-1833" name="line-1833"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_SIGNAL_ACTION</span><span class="p">,</span> +<a id="line-1834" name="line-1834"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefboxClass</span><span class="p">,</span><span class="w"> </span><span class="n">hide_find</span><span class="p">),</span> +<a id="line-1835" name="line-1835"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1836" name="line-1836"></a><span class="w"> </span><span class="n">gdict_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-1837" name="line-1837"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1838" name="line-1838"></a><span class="w"> </span><span class="n">gdict_defbox_signals</span><span class="p">[</span><span class="n">LINK_CLICKED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-1839" name="line-1839"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"link-clicked"</span><span class="p">,</span> +<a id="line-1840" name="line-1840"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-1841" name="line-1841"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-1842" name="line-1842"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefboxClass</span><span class="p">,</span><span class="w"> </span><span class="n">link_clicked</span><span class="p">),</span> +<a id="line-1843" name="line-1843"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1844" name="line-1844"></a><span class="w"> </span><span class="n">gdict_marshal_VOID__STRING</span><span class="p">,</span> +<a id="line-1845" name="line-1845"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-1846" name="line-1846"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">);</span> +<a id="line-1847" name="line-1847"></a> +<a id="line-1848" name="line-1848"></a><span class="w"> </span><span class="n">klass</span><span class="o">-></span><span class="n">show_find</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_real_show_find</span><span class="p">;</span> +<a id="line-1849" name="line-1849"></a><span class="w"> </span><span class="n">klass</span><span class="o">-></span><span class="n">hide_find</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_real_hide_find</span><span class="p">;</span> +<a id="line-1850" name="line-1850"></a><span class="w"> </span><span class="n">klass</span><span class="o">-></span><span class="n">find_next</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_real_find_next</span><span class="p">;</span> +<a id="line-1851" name="line-1851"></a><span class="w"> </span><span class="n">klass</span><span class="o">-></span><span class="n">find_previous</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_real_find_previous</span><span class="p">;</span> +<a id="line-1852" name="line-1852"></a> +<a id="line-1853" name="line-1853"></a><span class="w"> </span><span class="n">binding_set</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_binding_set_by_class</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-1854" name="line-1854"></a><span class="w"> </span><span class="n">gtk_binding_entry_add_signal</span><span class="w"> </span><span class="p">(</span><span class="n">binding_set</span><span class="p">,</span> +<a id="line-1855" name="line-1855"></a><span class="w"> </span><span class="n">GDK_KEY_f</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span> +<a id="line-1856" name="line-1856"></a><span class="w"> </span><span class="s">"show-find"</span><span class="p">,</span> +<a id="line-1857" name="line-1857"></a><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1858" name="line-1858"></a><span class="w"> </span><span class="n">gtk_binding_entry_add_signal</span><span class="w"> </span><span class="p">(</span><span class="n">binding_set</span><span class="p">,</span> +<a id="line-1859" name="line-1859"></a><span class="w"> </span><span class="n">GDK_KEY_g</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span> +<a id="line-1860" name="line-1860"></a><span class="w"> </span><span class="s">"find-next"</span><span class="p">,</span> +<a id="line-1861" name="line-1861"></a><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1862" name="line-1862"></a><span class="w"> </span><span class="n">gtk_binding_entry_add_signal</span><span class="w"> </span><span class="p">(</span><span class="n">binding_set</span><span class="p">,</span> +<a id="line-1863" name="line-1863"></a><span class="w"> </span><span class="n">GDK_KEY_g</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_SHIFT_MASK</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span> +<a id="line-1864" name="line-1864"></a><span class="w"> </span><span class="s">"find-previous"</span><span class="p">,</span> +<a id="line-1865" name="line-1865"></a><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1866" name="line-1866"></a><span class="w"> </span><span class="n">gtk_binding_entry_add_signal</span><span class="w"> </span><span class="p">(</span><span class="n">binding_set</span><span class="p">,</span> +<a id="line-1867" name="line-1867"></a><span class="w"> </span><span class="n">GDK_KEY_Escape</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-1868" name="line-1868"></a><span class="w"> </span><span class="s">"hide-find"</span><span class="p">,</span> +<a id="line-1869" name="line-1869"></a><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1870" name="line-1870"></a><span class="p">}</span> +<a id="line-1871" name="line-1871"></a> +<a id="line-1872" name="line-1872"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1873" name="line-1873"></a><span class="n">gdict_defbox_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1874" name="line-1874"></a><span class="p">{</span> +<a id="line-1875" name="line-1875"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1876" name="line-1876"></a> +<a id="line-1877" name="line-1877"></a><span class="w"> </span><span class="n">gtk_orientable_set_orientation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTABLE</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">);</span> +<a id="line-1878" name="line-1878"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1879" name="line-1879"></a> +<a id="line-1880" name="line-1880"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1881" name="line-1881"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="p">;</span> +<a id="line-1882" name="line-1882"></a> +<a id="line-1883" name="line-1883"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1884" name="line-1884"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFAULT_DATABASE</span><span class="p">);</span> +<a id="line-1885" name="line-1885"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">font_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFAULT_FONT_NAME</span><span class="p">);</span> +<a id="line-1886" name="line-1886"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1887" name="line-1887"></a> +<a id="line-1888" name="line-1888"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1889" name="line-1889"></a> +<a id="line-1890" name="line-1890"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1891" name="line-1891"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hand_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1892" name="line-1892"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">regular_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1893" name="line-1893"></a> +<a id="line-1894" name="line-1894"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">show_find</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1895" name="line-1895"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_searching</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1896" name="line-1896"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_hovering</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1897" name="line-1897"></a> +<a id="line-1898" name="line-1898"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1899" name="line-1899"></a><span class="p">}</span> +<a id="line-1900" name="line-1900"></a> +<a id="line-1901" name="line-1901"></a><span class="cm">/**</span> +<a id="line-1902" name="line-1902"></a><span class="cm"> * gdict_defbox_new:</span> +<a id="line-1903" name="line-1903"></a><span class="cm"> *</span> +<a id="line-1904" name="line-1904"></a><span class="cm"> * Creates a new #GdictDefbox widget. Use this widget to search for</span> +<a id="line-1905" name="line-1905"></a><span class="cm"> * a word using a #GdictContext, and to show the resulting definition(s).</span> +<a id="line-1906" name="line-1906"></a><span class="cm"> * You must set a #GdictContext for this widget using</span> +<a id="line-1907" name="line-1907"></a><span class="cm"> * gdict_defbox_set_context().</span> +<a id="line-1908" name="line-1908"></a><span class="cm"> *</span> +<a id="line-1909" name="line-1909"></a><span class="cm"> * Return value: a new #GdictDefbox widget.</span> +<a id="line-1910" name="line-1910"></a><span class="cm"> *</span> +<a id="line-1911" name="line-1911"></a><span class="cm"> * Since: 0.1</span> +<a id="line-1912" name="line-1912"></a><span class="cm"> */</span> +<a id="line-1913" name="line-1913"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-1914" name="line-1914"></a><span class="n">gdict_defbox_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-1915" name="line-1915"></a><span class="p">{</span> +<a id="line-1916" name="line-1916"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_DEFBOX</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1917" name="line-1917"></a><span class="p">}</span> +<a id="line-1918" name="line-1918"></a> +<a id="line-1919" name="line-1919"></a><span class="cm">/**</span> +<a id="line-1920" name="line-1920"></a><span class="cm"> * gdict_defbox_new_with_context:</span> +<a id="line-1921" name="line-1921"></a><span class="cm"> * @context: a #GdictContext</span> +<a id="line-1922" name="line-1922"></a><span class="cm"> *</span> +<a id="line-1923" name="line-1923"></a><span class="cm"> * Creates a new #GdictDefbox widget. Use this widget to search for</span> +<a id="line-1924" name="line-1924"></a><span class="cm"> * a word using @context, and to show the resulting definition.</span> +<a id="line-1925" name="line-1925"></a><span class="cm"> *</span> +<a id="line-1926" name="line-1926"></a><span class="cm"> * Return value: a new #GdictDefbox widget.</span> +<a id="line-1927" name="line-1927"></a><span class="cm"> *</span> +<a id="line-1928" name="line-1928"></a><span class="cm"> * Since: 0.1</span> +<a id="line-1929" name="line-1929"></a><span class="cm"> */</span> +<a id="line-1930" name="line-1930"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-1931" name="line-1931"></a><span class="n">gdict_defbox_new_with_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-1932" name="line-1932"></a><span class="p">{</span> +<a id="line-1933" name="line-1933"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1934" name="line-1934"></a> +<a id="line-1935" name="line-1935"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_DEFBOX</span><span class="p">,</span><span class="w"> </span><span class="s">"context"</span><span class="p">,</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1936" name="line-1936"></a><span class="p">}</span> +<a id="line-1937" name="line-1937"></a> +<a id="line-1938" name="line-1938"></a><span class="cm">/**</span> +<a id="line-1939" name="line-1939"></a><span class="cm"> * gdict_defbox_set_context:</span> +<a id="line-1940" name="line-1940"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-1941" name="line-1941"></a><span class="cm"> * @context: a #GdictContext</span> +<a id="line-1942" name="line-1942"></a><span class="cm"> *</span> +<a id="line-1943" name="line-1943"></a><span class="cm"> * Sets @context as the #GdictContext to be used by @defbox in order</span> +<a id="line-1944" name="line-1944"></a><span class="cm"> * to retrieve the definitions of a word.</span> +<a id="line-1945" name="line-1945"></a><span class="cm"> *</span> +<a id="line-1946" name="line-1946"></a><span class="cm"> * Since: 0.1</span> +<a id="line-1947" name="line-1947"></a><span class="cm"> */</span> +<a id="line-1948" name="line-1948"></a><span class="kt">void</span> +<a id="line-1949" name="line-1949"></a><span class="n">gdict_defbox_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-1950" name="line-1950"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-1951" name="line-1951"></a><span class="p">{</span> +<a id="line-1952" name="line-1952"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-1953" name="line-1953"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">GDICT_IS_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-1954" name="line-1954"></a> +<a id="line-1955" name="line-1955"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="s">"context"</span><span class="p">,</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1956" name="line-1956"></a><span class="p">}</span> +<a id="line-1957" name="line-1957"></a> +<a id="line-1958" name="line-1958"></a><span class="cm">/**</span> +<a id="line-1959" name="line-1959"></a><span class="cm"> * gdict_defbox_get_context:</span> +<a id="line-1960" name="line-1960"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-1961" name="line-1961"></a><span class="cm"> *</span> +<a id="line-1962" name="line-1962"></a><span class="cm"> * Gets the #GdictContext used by @defbox.</span> +<a id="line-1963" name="line-1963"></a><span class="cm"> *</span> +<a id="line-1964" name="line-1964"></a><span class="cm"> * Return value: a #GdictContext.</span> +<a id="line-1965" name="line-1965"></a><span class="cm"> *</span> +<a id="line-1966" name="line-1966"></a><span class="cm"> * Since: 0.1</span> +<a id="line-1967" name="line-1967"></a><span class="cm"> */</span> +<a id="line-1968" name="line-1968"></a><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span> +<a id="line-1969" name="line-1969"></a><span class="n">gdict_defbox_get_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-1970" name="line-1970"></a><span class="p">{</span> +<a id="line-1971" name="line-1971"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1972" name="line-1972"></a> +<a id="line-1973" name="line-1973"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">;</span> +<a id="line-1974" name="line-1974"></a><span class="p">}</span> +<a id="line-1975" name="line-1975"></a> +<a id="line-1976" name="line-1976"></a><span class="cm">/**</span> +<a id="line-1977" name="line-1977"></a><span class="cm"> * gdict_defbox_set_database:</span> +<a id="line-1978" name="line-1978"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-1979" name="line-1979"></a><span class="cm"> * @database: a database</span> +<a id="line-1980" name="line-1980"></a><span class="cm"> *</span> +<a id="line-1981" name="line-1981"></a><span class="cm"> * Sets @database as the database used by the #GdictContext bound to @defbox</span> +<a id="line-1982" name="line-1982"></a><span class="cm"> * to query for word definitions.</span> +<a id="line-1983" name="line-1983"></a><span class="cm"> *</span> +<a id="line-1984" name="line-1984"></a><span class="cm"> * Since: 0.1</span> +<a id="line-1985" name="line-1985"></a><span class="cm"> */</span> +<a id="line-1986" name="line-1986"></a><span class="kt">void</span> +<a id="line-1987" name="line-1987"></a><span class="n">gdict_defbox_set_database</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-1988" name="line-1988"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">)</span> +<a id="line-1989" name="line-1989"></a><span class="p">{</span> +<a id="line-1990" name="line-1990"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1991" name="line-1991"></a> +<a id="line-1992" name="line-1992"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-1993" name="line-1993"></a> +<a id="line-1994" name="line-1994"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1995" name="line-1995"></a> +<a id="line-1996" name="line-1996"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-1997" name="line-1997"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">database</span><span class="p">);</span> +<a id="line-1998" name="line-1998"></a> +<a id="line-1999" name="line-1999"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="s">"database"</span><span class="p">);</span> +<a id="line-2000" name="line-2000"></a><span class="p">}</span> +<a id="line-2001" name="line-2001"></a> +<a id="line-2002" name="line-2002"></a><span class="cm">/**</span> +<a id="line-2003" name="line-2003"></a><span class="cm"> * gdict_defbox_get_database:</span> +<a id="line-2004" name="line-2004"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2005" name="line-2005"></a><span class="cm"> *</span> +<a id="line-2006" name="line-2006"></a><span class="cm"> * Gets the database used by @defbox. See gdict_defbox_set_database().</span> +<a id="line-2007" name="line-2007"></a><span class="cm"> *</span> +<a id="line-2008" name="line-2008"></a><span class="cm"> * Return value: the name of a database. The return string is owned by</span> +<a id="line-2009" name="line-2009"></a><span class="cm"> * the #GdictDefbox widget and should not be modified or freed.</span> +<a id="line-2010" name="line-2010"></a><span class="cm"> *</span> +<a id="line-2011" name="line-2011"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2012" name="line-2012"></a><span class="cm"> */</span> +<a id="line-2013" name="line-2013"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-2014" name="line-2014"></a><span class="n">gdict_defbox_get_database</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-2015" name="line-2015"></a><span class="p">{</span> +<a id="line-2016" name="line-2016"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2017" name="line-2017"></a> +<a id="line-2018" name="line-2018"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">;</span> +<a id="line-2019" name="line-2019"></a><span class="p">}</span> +<a id="line-2020" name="line-2020"></a> +<a id="line-2021" name="line-2021"></a><span class="cm">/**</span> +<a id="line-2022" name="line-2022"></a><span class="cm"> * gdict_defbox_get_word:</span> +<a id="line-2023" name="line-2023"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2024" name="line-2024"></a><span class="cm"> *</span> +<a id="line-2025" name="line-2025"></a><span class="cm"> * Retrieves the word being looked up.</span> +<a id="line-2026" name="line-2026"></a><span class="cm"> *</span> +<a id="line-2027" name="line-2027"></a><span class="cm"> * Return value: the word looked up, or %NULL. The returned string is</span> +<a id="line-2028" name="line-2028"></a><span class="cm"> * owned by the #GdictDefbox widget and should never be modified or</span> +<a id="line-2029" name="line-2029"></a><span class="cm"> * freed.</span> +<a id="line-2030" name="line-2030"></a><span class="cm"> *</span> +<a id="line-2031" name="line-2031"></a><span class="cm"> * Since: 0.12</span> +<a id="line-2032" name="line-2032"></a><span class="cm"> */</span> +<a id="line-2033" name="line-2033"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-2034" name="line-2034"></a><span class="n">gdict_defbox_get_word</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-2035" name="line-2035"></a><span class="p">{</span> +<a id="line-2036" name="line-2036"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2037" name="line-2037"></a> +<a id="line-2038" name="line-2038"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">;</span> +<a id="line-2039" name="line-2039"></a><span class="p">}</span> +<a id="line-2040" name="line-2040"></a> +<a id="line-2041" name="line-2041"></a><span class="cm">/**</span> +<a id="line-2042" name="line-2042"></a><span class="cm"> * gdict_defbox_set_show_find:</span> +<a id="line-2043" name="line-2043"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2044" name="line-2044"></a><span class="cm"> * @show_find: %TRUE to show the find pane</span> +<a id="line-2045" name="line-2045"></a><span class="cm"> *</span> +<a id="line-2046" name="line-2046"></a><span class="cm"> * Whether @defbox should show the find pane.</span> +<a id="line-2047" name="line-2047"></a><span class="cm"> *</span> +<a id="line-2048" name="line-2048"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2049" name="line-2049"></a><span class="cm"> */</span> +<a id="line-2050" name="line-2050"></a><span class="kt">void</span> +<a id="line-2051" name="line-2051"></a><span class="n">gdict_defbox_set_show_find</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-2052" name="line-2052"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">show_find</span><span class="p">)</span> +<a id="line-2053" name="line-2053"></a><span class="p">{</span> +<a id="line-2054" name="line-2054"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2055" name="line-2055"></a> +<a id="line-2056" name="line-2056"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2057" name="line-2057"></a> +<a id="line-2058" name="line-2058"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2059" name="line-2059"></a> +<a id="line-2060" name="line-2060"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">show_find</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">show_find</span><span class="p">)</span> +<a id="line-2061" name="line-2061"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2062" name="line-2062"></a> +<a id="line-2063" name="line-2063"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">show_find</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">show_find</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2064" name="line-2064"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">show_find</span><span class="p">)</span> +<a id="line-2065" name="line-2065"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2066" name="line-2066"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_pane</span><span class="p">);</span> +<a id="line-2067" name="line-2067"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_entry</span><span class="p">);</span> +<a id="line-2068" name="line-2068"></a> +<a id="line-2069" name="line-2069"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">)</span> +<a id="line-2070" name="line-2070"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add_seconds</span><span class="w"> </span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="n">hide_find_pane</span><span class="p">,</span><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-2071" name="line-2071"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2072" name="line-2072"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2073" name="line-2073"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2074" name="line-2074"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">find_pane</span><span class="p">);</span> +<a id="line-2075" name="line-2075"></a> +<a id="line-2076" name="line-2076"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">)</span> +<a id="line-2077" name="line-2077"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2078" name="line-2078"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="p">);</span> +<a id="line-2079" name="line-2079"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">hide_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-2080" name="line-2080"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2081" name="line-2081"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2082" name="line-2082"></a><span class="p">}</span> +<a id="line-2083" name="line-2083"></a> +<a id="line-2084" name="line-2084"></a><span class="cm">/**</span> +<a id="line-2085" name="line-2085"></a><span class="cm"> * gdict_defbox_get_show_find:</span> +<a id="line-2086" name="line-2086"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2087" name="line-2087"></a><span class="cm"> *</span> +<a id="line-2088" name="line-2088"></a><span class="cm"> * Gets whether the find pane should be visible or not.</span> +<a id="line-2089" name="line-2089"></a><span class="cm"> *</span> +<a id="line-2090" name="line-2090"></a><span class="cm"> * Return value: %TRUE if the find pane is visible.</span> +<a id="line-2091" name="line-2091"></a><span class="cm"> *</span> +<a id="line-2092" name="line-2092"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2093" name="line-2093"></a><span class="cm"> */</span> +<a id="line-2094" name="line-2094"></a><span class="n">gboolean</span> +<a id="line-2095" name="line-2095"></a><span class="n">gdict_defbox_get_show_find</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-2096" name="line-2096"></a><span class="p">{</span> +<a id="line-2097" name="line-2097"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2098" name="line-2098"></a> +<a id="line-2099" name="line-2099"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">show_find</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2100" name="line-2100"></a><span class="p">}</span> +<a id="line-2101" name="line-2101"></a> +<a id="line-2102" name="line-2102"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2103" name="line-2103"></a><span class="n">lookup_start_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-2104" name="line-2104"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-2105" name="line-2105"></a><span class="p">{</span> +<a id="line-2106" name="line-2106"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-2107" name="line-2107"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2108" name="line-2108"></a><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-2109" name="line-2109"></a> +<a id="line-2110" name="line-2110"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_searching</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-2111" name="line-2111"></a> +<a id="line-2112" name="line-2112"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">)</span> +<a id="line-2113" name="line-2113"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2114" name="line-2114"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2115" name="line-2115"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_WATCH</span><span class="p">);</span> +<a id="line-2116" name="line-2116"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2117" name="line-2117"></a> +<a id="line-2118" name="line-2118"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span> +<a id="line-2119" name="line-2119"></a><span class="w"> </span><span class="n">GTK_TEXT_WINDOW_WIDGET</span><span class="p">);</span> +<a id="line-2120" name="line-2120"></a> +<a id="line-2121" name="line-2121"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">);</span> +<a id="line-2122" name="line-2122"></a><span class="p">}</span> +<a id="line-2123" name="line-2123"></a> +<a id="line-2124" name="line-2124"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2125" name="line-2125"></a><span class="n">lookup_end_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-2126" name="line-2126"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-2127" name="line-2127"></a><span class="p">{</span> +<a id="line-2128" name="line-2128"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-2129" name="line-2129"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2130" name="line-2130"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-2131" name="line-2131"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">;</span> +<a id="line-2132" name="line-2132"></a><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-2133" name="line-2133"></a> +<a id="line-2134" name="line-2134"></a><span class="w"> </span><span class="cm">/* explicitely move the cursor to the beginning */</span> +<a id="line-2135" name="line-2135"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-2136" name="line-2136"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_start_iter</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">);</span> +<a id="line-2137" name="line-2137"></a><span class="w"> </span><span class="n">gtk_text_buffer_place_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">);</span> +<a id="line-2138" name="line-2138"></a> +<a id="line-2139" name="line-2139"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span> +<a id="line-2140" name="line-2140"></a><span class="w"> </span><span class="n">GTK_TEXT_WINDOW_WIDGET</span><span class="p">);</span> +<a id="line-2141" name="line-2141"></a> +<a id="line-2142" name="line-2142"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2143" name="line-2143"></a> +<a id="line-2144" name="line-2144"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_searching</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2145" name="line-2145"></a><span class="p">}</span> +<a id="line-2146" name="line-2146"></a> +<a id="line-2147" name="line-2147"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2148" name="line-2148"></a><span class="n">gdict_defbox_insert_word</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-2149" name="line-2149"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-2150" name="line-2150"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">)</span> +<a id="line-2151" name="line-2151"></a><span class="p">{</span> +<a id="line-2152" name="line-2152"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2153" name="line-2153"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">;</span> +<a id="line-2154" name="line-2154"></a> +<a id="line-2155" name="line-2155"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">word</span><span class="p">)</span> +<a id="line-2156" name="line-2156"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2157" name="line-2157"></a> +<a id="line-2158" name="line-2158"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2159" name="line-2159"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2160" name="line-2160"></a> +<a id="line-2161" name="line-2161"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TEXT_BUFFER</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">));</span> +<a id="line-2162" name="line-2162"></a> +<a id="line-2163" name="line-2163"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">word</span><span class="p">);</span> +<a id="line-2164" name="line-2164"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert_with_tags_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span> +<a id="line-2165" name="line-2165"></a><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-2166" name="line-2166"></a><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">),</span> +<a id="line-2167" name="line-2167"></a><span class="w"> </span><span class="s">"big"</span><span class="p">,</span><span class="w"> </span><span class="s">"bold"</span><span class="p">,</span><span class="w"> </span><span class="s">"query-title"</span><span class="p">,</span> +<a id="line-2168" name="line-2168"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2169" name="line-2169"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-2170" name="line-2170"></a><span class="p">}</span> +<a id="line-2171" name="line-2171"></a> +<a id="line-2172" name="line-2172"></a><span class="cm">/* escape a link string; links are expressed as "{...}".</span> +<a id="line-2173" name="line-2173"></a><span class="cm"> * the link with the '{}' removed is stored inside link_str, while</span> +<a id="line-2174" name="line-2174"></a><span class="cm"> * the returned value is a pointer to what follows the trailing '}'.</span> +<a id="line-2175" name="line-2175"></a><span class="cm"> * link_str is allocated and should be freed.</span> +<a id="line-2176" name="line-2176"></a><span class="cm"> */</span> +<a id="line-2177" name="line-2177"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-2178" name="line-2178"></a><span class="n">escape_link</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">,</span> +<a id="line-2179" name="line-2179"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">link_str</span><span class="p">)</span> +<a id="line-2180" name="line-2180"></a><span class="p">{</span> +<a id="line-2181" name="line-2181"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">str_len</span><span class="p">;</span> +<a id="line-2182" name="line-2182"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">link_buf</span><span class="p">;</span> +<a id="line-2183" name="line-2183"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-2184" name="line-2184"></a> +<a id="line-2185" name="line-2185"></a><span class="w"> </span><span class="n">str_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-2186" name="line-2186"></a><span class="w"> </span><span class="n">link_buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_sized_new</span><span class="w"> </span><span class="p">(</span><span class="n">str_len</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-2187" name="line-2187"></a> +<a id="line-2188" name="line-2188"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'}'</span><span class="p">;</span><span class="w"> </span><span class="n">p</span><span class="o">++</span><span class="p">)</span> +<a id="line-2189" name="line-2189"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2190" name="line-2190"></a><span class="w"> </span><span class="n">link_buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">link_buf</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">);</span> +<a id="line-2191" name="line-2191"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2192" name="line-2192"></a> +<a id="line-2193" name="line-2193"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">link_str</span><span class="p">)</span> +<a id="line-2194" name="line-2194"></a><span class="w"> </span><span class="o">*</span><span class="n">link_str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">link_buf</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2195" name="line-2195"></a> +<a id="line-2196" name="line-2196"></a><span class="w"> </span><span class="n">p</span><span class="o">++</span><span class="p">;</span> +<a id="line-2197" name="line-2197"></a> +<a id="line-2198" name="line-2198"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">p</span><span class="p">;</span> +<a id="line-2199" name="line-2199"></a><span class="p">}</span> +<a id="line-2200" name="line-2200"></a> +<a id="line-2201" name="line-2201"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-2202" name="line-2202"></a><span class="n">escape_phonethic</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">,</span> +<a id="line-2203" name="line-2203"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">phon_str</span><span class="p">)</span> +<a id="line-2204" name="line-2204"></a><span class="p">{</span> +<a id="line-2205" name="line-2205"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">str_len</span><span class="p">;</span> +<a id="line-2206" name="line-2206"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">phon_buf</span><span class="p">;</span> +<a id="line-2207" name="line-2207"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-2208" name="line-2208"></a> +<a id="line-2209" name="line-2209"></a><span class="w"> </span><span class="n">str_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-2210" name="line-2210"></a><span class="w"> </span><span class="n">phon_buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_sized_new</span><span class="w"> </span><span class="p">(</span><span class="n">str_len</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-2211" name="line-2211"></a> +<a id="line-2212" name="line-2212"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\\'</span><span class="p">;</span><span class="w"> </span><span class="n">p</span><span class="o">++</span><span class="p">)</span> +<a id="line-2213" name="line-2213"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2214" name="line-2214"></a><span class="w"> </span><span class="n">phon_buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">phon_buf</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">);</span> +<a id="line-2215" name="line-2215"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2216" name="line-2216"></a> +<a id="line-2217" name="line-2217"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">phon_str</span><span class="p">)</span> +<a id="line-2218" name="line-2218"></a><span class="w"> </span><span class="o">*</span><span class="n">phon_str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">phon_buf</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2219" name="line-2219"></a> +<a id="line-2220" name="line-2220"></a><span class="w"> </span><span class="n">p</span><span class="o">++</span><span class="p">;</span> +<a id="line-2221" name="line-2221"></a> +<a id="line-2222" name="line-2222"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">p</span><span class="p">;</span> +<a id="line-2223" name="line-2223"></a><span class="p">}</span> +<a id="line-2224" name="line-2224"></a> +<a id="line-2225" name="line-2225"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2226" name="line-2226"></a><span class="n">gdict_defbox_insert_body</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-2227" name="line-2227"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-2228" name="line-2228"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">body</span><span class="p">)</span> +<a id="line-2229" name="line-2229"></a><span class="p">{</span> +<a id="line-2230" name="line-2230"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2231" name="line-2231"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">words</span><span class="p">;</span> +<a id="line-2232" name="line-2232"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">len</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-2233" name="line-2233"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">end_iter</span><span class="p">;</span> +<a id="line-2234" name="line-2234"></a> +<a id="line-2235" name="line-2235"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">body</span><span class="p">)</span> +<a id="line-2236" name="line-2236"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2237" name="line-2237"></a> +<a id="line-2238" name="line-2238"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2239" name="line-2239"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2240" name="line-2240"></a> +<a id="line-2241" name="line-2241"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TEXT_BUFFER</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">));</span> +<a id="line-2242" name="line-2242"></a> +<a id="line-2243" name="line-2243"></a><span class="w"> </span><span class="n">words</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strsplit</span><span class="w"> </span><span class="p">(</span><span class="n">body</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-2244" name="line-2244"></a><span class="w"> </span><span class="n">len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strv_length</span><span class="w"> </span><span class="p">(</span><span class="n">words</span><span class="p">);</span> +<a id="line-2245" name="line-2245"></a><span class="w"> </span><span class="n">end_iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-2246" name="line-2246"></a> +<a id="line-2247" name="line-2247"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-2248" name="line-2248"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2249" name="line-2249"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">words</span><span class="p">[</span><span class="n">i</span><span class="p">];</span> +<a id="line-2250" name="line-2250"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">w_len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">);</span> +<a id="line-2251" name="line-2251"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">begin</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">end</span><span class="p">;</span> +<a id="line-2252" name="line-2252"></a> +<a id="line-2253" name="line-2253"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">w_len</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-2254" name="line-2254"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-2255" name="line-2255"></a> +<a id="line-2256" name="line-2256"></a><span class="w"> </span><span class="n">begin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_offset_to_pointer</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2257" name="line-2257"></a> +<a id="line-2258" name="line-2258"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">begin</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'{'</span><span class="p">)</span> +<a id="line-2259" name="line-2259"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2260" name="line-2260"></a><span class="w"> </span><span class="n">end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strrchr</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">'}'</span><span class="p">);</span> +<a id="line-2261" name="line-2261"></a> +<a id="line-2262" name="line-2262"></a><span class="w"> </span><span class="cm">/* see this is a self contained link */</span> +<a id="line-2263" name="line-2263"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">end</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">*</span><span class="n">end</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'}'</span><span class="p">)</span> +<a id="line-2264" name="line-2264"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2265" name="line-2265"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">rest</span><span class="p">;</span> +<a id="line-2266" name="line-2266"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">link_str</span><span class="p">;</span> +<a id="line-2267" name="line-2267"></a> +<a id="line-2268" name="line-2268"></a><span class="w"> </span><span class="n">rest</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">escape_link</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">link_str</span><span class="p">);</span> +<a id="line-2269" name="line-2269"></a> +<a id="line-2270" name="line-2270"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert_with_tags_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span> +<a id="line-2271" name="line-2271"></a><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span> +<a id="line-2272" name="line-2272"></a><span class="w"> </span><span class="n">link_str</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span> +<a id="line-2273" name="line-2273"></a><span class="w"> </span><span class="s">"link"</span><span class="p">,</span> +<a id="line-2274" name="line-2274"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2275" name="line-2275"></a> +<a id="line-2276" name="line-2276"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span><span class="w"> </span><span class="n">rest</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-2277" name="line-2277"></a> +<a id="line-2278" name="line-2278"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_end_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">);</span> +<a id="line-2279" name="line-2279"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-2280" name="line-2280"></a> +<a id="line-2281" name="line-2281"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">link_str</span><span class="p">);</span> +<a id="line-2282" name="line-2282"></a> +<a id="line-2283" name="line-2283"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-2284" name="line-2284"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2285" name="line-2285"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2286" name="line-2286"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2287" name="line-2287"></a><span class="w"> </span><span class="cm">/* uh-oh: the link ends in another word */</span> +<a id="line-2288" name="line-2288"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">buf</span><span class="p">;</span> +<a id="line-2289" name="line-2289"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">next</span><span class="p">;</span> +<a id="line-2290" name="line-2290"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">cur</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-2291" name="line-2291"></a> +<a id="line-2292" name="line-2292"></a><span class="w"> </span><span class="n">buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2293" name="line-2293"></a><span class="w"> </span><span class="n">next</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">words</span><span class="p">[</span><span class="n">cur</span><span class="o">++</span><span class="p">];</span> +<a id="line-2294" name="line-2294"></a> +<a id="line-2295" name="line-2295"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">next</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strrchr</span><span class="w"> </span><span class="p">(</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">'}'</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-2296" name="line-2296"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2297" name="line-2297"></a><span class="w"> </span><span class="n">buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="n">next</span><span class="p">);</span> +<a id="line-2298" name="line-2298"></a><span class="w"> </span><span class="n">buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_append_c</span><span class="w"> </span><span class="p">(</span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="sc">' '</span><span class="p">);</span> +<a id="line-2299" name="line-2299"></a> +<a id="line-2300" name="line-2300"></a><span class="w"> </span><span class="n">next</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">words</span><span class="p">[</span><span class="n">cur</span><span class="o">++</span><span class="p">];</span> +<a id="line-2301" name="line-2301"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2302" name="line-2302"></a> +<a id="line-2303" name="line-2303"></a><span class="w"> </span><span class="n">buf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="n">next</span><span class="p">);</span> +<a id="line-2304" name="line-2304"></a> +<a id="line-2305" name="line-2305"></a><span class="w"> </span><span class="n">next</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2306" name="line-2306"></a> +<a id="line-2307" name="line-2307"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">end</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">*</span><span class="n">end</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'}'</span><span class="p">)</span> +<a id="line-2308" name="line-2308"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2309" name="line-2309"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">rest</span><span class="p">;</span> +<a id="line-2310" name="line-2310"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">link_str</span><span class="p">;</span> +<a id="line-2311" name="line-2311"></a> +<a id="line-2312" name="line-2312"></a><span class="w"> </span><span class="n">rest</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">escape_link</span><span class="w"> </span><span class="p">(</span><span class="n">next</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">link_str</span><span class="p">);</span> +<a id="line-2313" name="line-2313"></a> +<a id="line-2314" name="line-2314"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert_with_tags_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span> +<a id="line-2315" name="line-2315"></a><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span> +<a id="line-2316" name="line-2316"></a><span class="w"> </span><span class="n">link_str</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span> +<a id="line-2317" name="line-2317"></a><span class="w"> </span><span class="s">"link"</span><span class="p">,</span> +<a id="line-2318" name="line-2318"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2319" name="line-2319"></a> +<a id="line-2320" name="line-2320"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span><span class="w"> </span><span class="n">rest</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-2321" name="line-2321"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-2322" name="line-2322"></a> +<a id="line-2323" name="line-2323"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">link_str</span><span class="p">);</span> +<a id="line-2324" name="line-2324"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2325" name="line-2325"></a> +<a id="line-2326" name="line-2326"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">next</span><span class="p">);</span> +<a id="line-2327" name="line-2327"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cur</span><span class="p">;</span> +<a id="line-2328" name="line-2328"></a> +<a id="line-2329" name="line-2329"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-2330" name="line-2330"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2331" name="line-2331"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2332" name="line-2332"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">begin</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\\'</span><span class="p">)</span> +<a id="line-2333" name="line-2333"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2334" name="line-2334"></a><span class="w"> </span><span class="n">end</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strrchr</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">'\\'</span><span class="p">);</span> +<a id="line-2335" name="line-2335"></a> +<a id="line-2336" name="line-2336"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">end</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">*</span><span class="n">end</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\\'</span><span class="p">)</span> +<a id="line-2337" name="line-2337"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2338" name="line-2338"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">rest</span><span class="p">;</span> +<a id="line-2339" name="line-2339"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">phon</span><span class="p">;</span> +<a id="line-2340" name="line-2340"></a> +<a id="line-2341" name="line-2341"></a><span class="w"> </span><span class="n">rest</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">escape_phonethic</span><span class="w"> </span><span class="p">(</span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">phon</span><span class="p">);</span> +<a id="line-2342" name="line-2342"></a> +<a id="line-2343" name="line-2343"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert_with_tags_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span> +<a id="line-2344" name="line-2344"></a><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span> +<a id="line-2345" name="line-2345"></a><span class="w"> </span><span class="n">phon</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span> +<a id="line-2346" name="line-2346"></a><span class="w"> </span><span class="s">"italic"</span><span class="p">,</span><span class="w"> </span><span class="s">"phonetic"</span><span class="p">,</span> +<a id="line-2347" name="line-2347"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2348" name="line-2348"></a> +<a id="line-2349" name="line-2349"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span><span class="w"> </span><span class="n">rest</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-2350" name="line-2350"></a> +<a id="line-2351" name="line-2351"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_end_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">);</span> +<a id="line-2352" name="line-2352"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-2353" name="line-2353"></a> +<a id="line-2354" name="line-2354"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">phon</span><span class="p">);</span> +<a id="line-2355" name="line-2355"></a> +<a id="line-2356" name="line-2356"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-2357" name="line-2357"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2358" name="line-2358"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2359" name="line-2359"></a> +<a id="line-2360" name="line-2360"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">w_len</span><span class="p">);</span> +<a id="line-2361" name="line-2361"></a> +<a id="line-2362" name="line-2362"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_end_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">);</span> +<a id="line-2363" name="line-2363"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-2364" name="line-2364"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2365" name="line-2365"></a> +<a id="line-2366" name="line-2366"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_end_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">);</span> +<a id="line-2367" name="line-2367"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end_iter</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-2368" name="line-2368"></a> +<a id="line-2369" name="line-2369"></a><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">end_iter</span><span class="p">;</span> +<a id="line-2370" name="line-2370"></a> +<a id="line-2371" name="line-2371"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">words</span><span class="p">);</span> +<a id="line-2372" name="line-2372"></a><span class="p">}</span> +<a id="line-2373" name="line-2373"></a> +<a id="line-2374" name="line-2374"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2375" name="line-2375"></a><span class="n">gdict_defbox_insert_from</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-2376" name="line-2376"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-2377" name="line-2377"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">)</span> +<a id="line-2378" name="line-2378"></a><span class="p">{</span> +<a id="line-2379" name="line-2379"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2380" name="line-2380"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">;</span> +<a id="line-2381" name="line-2381"></a> +<a id="line-2382" name="line-2382"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">database</span><span class="p">)</span> +<a id="line-2383" name="line-2383"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2384" name="line-2384"></a> +<a id="line-2385" name="line-2385"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2386" name="line-2386"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2387" name="line-2387"></a> +<a id="line-2388" name="line-2388"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TEXT_BUFFER</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">));</span> +<a id="line-2389" name="line-2389"></a> +<a id="line-2390" name="line-2390"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"</span><span class="se">\t</span><span class="s">-- From %s</span><span class="se">\n\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">database</span><span class="p">);</span> +<a id="line-2391" name="line-2391"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert_with_tags_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span> +<a id="line-2392" name="line-2392"></a><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-2393" name="line-2393"></a><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">),</span> +<a id="line-2394" name="line-2394"></a><span class="w"> </span><span class="s">"small"</span><span class="p">,</span><span class="w"> </span><span class="s">"query-from"</span><span class="p">,</span> +<a id="line-2395" name="line-2395"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2396" name="line-2396"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-2397" name="line-2397"></a><span class="p">}</span> +<a id="line-2398" name="line-2398"></a> +<a id="line-2399" name="line-2399"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2400" name="line-2400"></a><span class="n">gdict_defbox_insert_error</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-2401" name="line-2401"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-2402" name="line-2402"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">title</span><span class="p">,</span> +<a id="line-2403" name="line-2403"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">)</span> +<a id="line-2404" name="line-2404"></a><span class="p">{</span> +<a id="line-2405" name="line-2405"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2406" name="line-2406"></a><span class="w"> </span><span class="n">GtkTextMark</span><span class="w"> </span><span class="o">*</span><span class="n">mark</span><span class="p">;</span> +<a id="line-2407" name="line-2407"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">cur_iter</span><span class="p">;</span> +<a id="line-2408" name="line-2408"></a> +<a id="line-2409" name="line-2409"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">title</span><span class="p">)</span> +<a id="line-2410" name="line-2410"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2411" name="line-2411"></a> +<a id="line-2412" name="line-2412"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2413" name="line-2413"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2414" name="line-2414"></a> +<a id="line-2415" name="line-2415"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_TEXT_BUFFER</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">));</span> +<a id="line-2416" name="line-2416"></a> +<a id="line-2417" name="line-2417"></a><span class="w"> </span><span class="n">mark</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_create_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s">"block-cursor"</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2418" name="line-2418"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">cur_iter</span><span class="p">,</span><span class="w"> </span><span class="n">mark</span><span class="p">);</span> +<a id="line-2419" name="line-2419"></a> +<a id="line-2420" name="line-2420"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert_with_tags_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span> +<a id="line-2421" name="line-2421"></a><span class="w"> </span><span class="o">&</span><span class="n">cur_iter</span><span class="p">,</span> +<a id="line-2422" name="line-2422"></a><span class="w"> </span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">title</span><span class="p">),</span> +<a id="line-2423" name="line-2423"></a><span class="w"> </span><span class="s">"error-title"</span><span class="p">,</span><span class="w"> </span><span class="s">"big"</span><span class="p">,</span><span class="w"> </span><span class="s">"bold"</span><span class="p">,</span> +<a id="line-2424" name="line-2424"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2425" name="line-2425"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">cur_iter</span><span class="p">,</span><span class="w"> </span><span class="n">mark</span><span class="p">);</span> +<a id="line-2426" name="line-2426"></a> +<a id="line-2427" name="line-2427"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">cur_iter</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\n\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-2428" name="line-2428"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_mark</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">cur_iter</span><span class="p">,</span><span class="w"> </span><span class="n">mark</span><span class="p">);</span> +<a id="line-2429" name="line-2429"></a> +<a id="line-2430" name="line-2430"></a><span class="w"> </span><span class="n">gtk_text_buffer_insert_with_tags_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span> +<a id="line-2431" name="line-2431"></a><span class="w"> </span><span class="o">&</span><span class="n">cur_iter</span><span class="p">,</span> +<a id="line-2432" name="line-2432"></a><span class="w"> </span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">),</span> +<a id="line-2433" name="line-2433"></a><span class="w"> </span><span class="s">"error-message"</span><span class="p">,</span> +<a id="line-2434" name="line-2434"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2435" name="line-2435"></a><span class="p">}</span> +<a id="line-2436" name="line-2436"></a> +<a id="line-2437" name="line-2437"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2438" name="line-2438"></a><span class="n">definition_found_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-2439" name="line-2439"></a><span class="w"> </span><span class="n">GdictDefinition</span><span class="w"> </span><span class="o">*</span><span class="n">definition</span><span class="p">,</span> +<a id="line-2440" name="line-2440"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-2441" name="line-2441"></a><span class="p">{</span> +<a id="line-2442" name="line-2442"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-2443" name="line-2443"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2444" name="line-2444"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-2445" name="line-2445"></a><span class="w"> </span><span class="n">Definition</span><span class="w"> </span><span class="o">*</span><span class="n">def</span><span class="p">;</span> +<a id="line-2446" name="line-2446"></a> +<a id="line-2447" name="line-2447"></a><span class="w"> </span><span class="cm">/* insert the word if this is the first definition */</span> +<a id="line-2448" name="line-2448"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="p">)</span> +<a id="line-2449" name="line-2449"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2450" name="line-2450"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_start_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-2451" name="line-2451"></a><span class="w"> </span><span class="n">gdict_defbox_insert_word</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-2452" name="line-2452"></a><span class="w"> </span><span class="n">gdict_definition_get_word</span><span class="w"> </span><span class="p">(</span><span class="n">definition</span><span class="p">));</span> +<a id="line-2453" name="line-2453"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2454" name="line-2454"></a> +<a id="line-2455" name="line-2455"></a><span class="w"> </span><span class="n">def</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">definition_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2456" name="line-2456"></a> +<a id="line-2457" name="line-2457"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_end_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-2458" name="line-2458"></a><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">begin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_iter_get_offset</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-2459" name="line-2459"></a><span class="w"> </span><span class="n">gdict_defbox_insert_body</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_definition_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">definition</span><span class="p">));</span> +<a id="line-2460" name="line-2460"></a> +<a id="line-2461" name="line-2461"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_end_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-2462" name="line-2462"></a><span class="w"> </span><span class="n">gdict_defbox_insert_from</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_definition_get_database</span><span class="w"> </span><span class="p">(</span><span class="n">definition</span><span class="p">));</span> +<a id="line-2463" name="line-2463"></a> +<a id="line-2464" name="line-2464"></a><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_definition_ref</span><span class="w"> </span><span class="p">(</span><span class="n">definition</span><span class="p">);</span> +<a id="line-2465" name="line-2465"></a> +<a id="line-2466" name="line-2466"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_append</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="p">,</span><span class="w"> </span><span class="n">def</span><span class="p">);</span> +<a id="line-2467" name="line-2467"></a><span class="p">}</span> +<a id="line-2468" name="line-2468"></a> +<a id="line-2469" name="line-2469"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2470" name="line-2470"></a><span class="n">error_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-2471" name="line-2471"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">,</span> +<a id="line-2472" name="line-2472"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-2473" name="line-2473"></a><span class="p">{</span> +<a id="line-2474" name="line-2474"></a><span class="w"> </span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-2475" name="line-2475"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2476" name="line-2476"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-2477" name="line-2477"></a> +<a id="line-2478" name="line-2478"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">error</span><span class="p">)</span> +<a id="line-2479" name="line-2479"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2480" name="line-2480"></a> +<a id="line-2481" name="line-2481"></a><span class="w"> </span><span class="n">gdict_defbox_clear</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">);</span> +<a id="line-2482" name="line-2482"></a> +<a id="line-2483" name="line-2483"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_start_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-2484" name="line-2484"></a><span class="w"> </span><span class="n">gdict_defbox_insert_error</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-2485" name="line-2485"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Error while looking up definition"</span><span class="p">),</span> +<a id="line-2486" name="line-2486"></a><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-2487" name="line-2487"></a> +<a id="line-2488" name="line-2488"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-2489" name="line-2489"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2490" name="line-2490"></a> +<a id="line-2491" name="line-2491"></a><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">is_searching</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2492" name="line-2492"></a><span class="p">}</span> +<a id="line-2493" name="line-2493"></a> +<a id="line-2494" name="line-2494"></a><span class="cm">/**</span> +<a id="line-2495" name="line-2495"></a><span class="cm"> * gdict_defbox_lookup:</span> +<a id="line-2496" name="line-2496"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2497" name="line-2497"></a><span class="cm"> * @word: the word to look up</span> +<a id="line-2498" name="line-2498"></a><span class="cm"> *</span> +<a id="line-2499" name="line-2499"></a><span class="cm"> * Searches @word inside the dictionary sources using the #GdictContext</span> +<a id="line-2500" name="line-2500"></a><span class="cm"> * provided when creating @defbox or set using gdict_defbox_set_context().</span> +<a id="line-2501" name="line-2501"></a><span class="cm"> *</span> +<a id="line-2502" name="line-2502"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2503" name="line-2503"></a><span class="cm"> */</span> +<a id="line-2504" name="line-2504"></a><span class="kt">void</span> +<a id="line-2505" name="line-2505"></a><span class="n">gdict_defbox_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-2506" name="line-2506"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">)</span> +<a id="line-2507" name="line-2507"></a><span class="p">{</span> +<a id="line-2508" name="line-2508"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2509" name="line-2509"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">define_error</span><span class="p">;</span> +<a id="line-2510" name="line-2510"></a> +<a id="line-2511" name="line-2511"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2512" name="line-2512"></a> +<a id="line-2513" name="line-2513"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2514" name="line-2514"></a> +<a id="line-2515" name="line-2515"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-2516" name="line-2516"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2517" name="line-2517"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Attempting to look up `%s', but no GdictContext "</span> +<a id="line-2518" name="line-2518"></a><span class="w"> </span><span class="s">"has been set. Use gdict_defbox_set_context() "</span> +<a id="line-2519" name="line-2519"></a><span class="w"> </span><span class="s">"before invoking gdict_defbox_lookup()."</span><span class="p">,</span> +<a id="line-2520" name="line-2520"></a><span class="w"> </span><span class="n">word</span><span class="p">);</span> +<a id="line-2521" name="line-2521"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2522" name="line-2522"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2523" name="line-2523"></a> +<a id="line-2524" name="line-2524"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">is_searching</span><span class="p">)</span> +<a id="line-2525" name="line-2525"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2526" name="line-2526"></a><span class="w"> </span><span class="n">_gdict_show_error_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span> +<a id="line-2527" name="line-2527"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Another search is in progress"</span><span class="p">),</span> +<a id="line-2528" name="line-2528"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Please wait until the current search ends."</span><span class="p">));</span> +<a id="line-2529" name="line-2529"></a> +<a id="line-2530" name="line-2530"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2531" name="line-2531"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2532" name="line-2532"></a> +<a id="line-2533" name="line-2533"></a><span class="w"> </span><span class="n">gdict_defbox_clear</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">);</span> +<a id="line-2534" name="line-2534"></a> +<a id="line-2535" name="line-2535"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="p">)</span> +<a id="line-2536" name="line-2536"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2537" name="line-2537"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-start"</span><span class="p">,</span> +<a id="line-2538" name="line-2538"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">lookup_start_cb</span><span class="p">),</span> +<a id="line-2539" name="line-2539"></a><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-2540" name="line-2540"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">define_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"definition-found"</span><span class="p">,</span> +<a id="line-2541" name="line-2541"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">definition_found_cb</span><span class="p">),</span> +<a id="line-2542" name="line-2542"></a><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-2543" name="line-2543"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">end_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-end"</span><span class="p">,</span> +<a id="line-2544" name="line-2544"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">lookup_end_cb</span><span class="p">),</span> +<a id="line-2545" name="line-2545"></a><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-2546" name="line-2546"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2547" name="line-2547"></a> +<a id="line-2548" name="line-2548"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="p">)</span> +<a id="line-2549" name="line-2549"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span> +<a id="line-2550" name="line-2550"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">error_cb</span><span class="p">),</span> +<a id="line-2551" name="line-2551"></a><span class="w"> </span><span class="n">defbox</span><span class="p">);</span> +<a id="line-2552" name="line-2552"></a> +<a id="line-2553" name="line-2553"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-2554" name="line-2554"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-2555" name="line-2555"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="s">"word"</span><span class="p">);</span> +<a id="line-2556" name="line-2556"></a> +<a id="line-2557" name="line-2557"></a><span class="w"> </span><span class="n">define_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2558" name="line-2558"></a><span class="w"> </span><span class="n">gdict_context_define_word</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span> +<a id="line-2559" name="line-2559"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">,</span> +<a id="line-2560" name="line-2560"></a><span class="w"> </span><span class="n">word</span><span class="p">,</span> +<a id="line-2561" name="line-2561"></a><span class="w"> </span><span class="o">&</span><span class="n">define_error</span><span class="p">);</span> +<a id="line-2562" name="line-2562"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">define_error</span><span class="p">)</span> +<a id="line-2563" name="line-2563"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2564" name="line-2564"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-2565" name="line-2565"></a> +<a id="line-2566" name="line-2566"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_start_iter</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-2567" name="line-2567"></a><span class="w"> </span><span class="n">gdict_defbox_insert_error</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-2568" name="line-2568"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Error while retrieving the definition"</span><span class="p">),</span> +<a id="line-2569" name="line-2569"></a><span class="w"> </span><span class="n">define_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-2570" name="line-2570"></a> +<a id="line-2571" name="line-2571"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">define_error</span><span class="p">);</span> +<a id="line-2572" name="line-2572"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2573" name="line-2573"></a><span class="p">}</span> +<a id="line-2574" name="line-2574"></a> +<a id="line-2575" name="line-2575"></a><span class="cm">/**</span> +<a id="line-2576" name="line-2576"></a><span class="cm"> * gdict_defbox_clear:</span> +<a id="line-2577" name="line-2577"></a><span class="cm"> * @defbox: a @GdictDefbox</span> +<a id="line-2578" name="line-2578"></a><span class="cm"> *</span> +<a id="line-2579" name="line-2579"></a><span class="cm"> * Clears the buffer of @defbox</span> +<a id="line-2580" name="line-2580"></a><span class="cm"> *</span> +<a id="line-2581" name="line-2581"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2582" name="line-2582"></a><span class="cm"> */</span> +<a id="line-2583" name="line-2583"></a><span class="kt">void</span> +<a id="line-2584" name="line-2584"></a><span class="n">gdict_defbox_clear</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-2585" name="line-2585"></a><span class="p">{</span> +<a id="line-2586" name="line-2586"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2587" name="line-2587"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-2588" name="line-2588"></a> +<a id="line-2589" name="line-2589"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2590" name="line-2590"></a> +<a id="line-2591" name="line-2591"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2592" name="line-2592"></a> +<a id="line-2593" name="line-2593"></a><span class="w"> </span><span class="cm">/* destroy previously found definitions */</span> +<a id="line-2594" name="line-2594"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="p">)</span> +<a id="line-2595" name="line-2595"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2596" name="line-2596"></a><span class="w"> </span><span class="n">g_slist_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">GDestroyNotify</span><span class="p">)</span><span class="w"> </span><span class="n">definition_free</span><span class="p">);</span> +<a id="line-2597" name="line-2597"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2598" name="line-2598"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2599" name="line-2599"></a> +<a id="line-2600" name="line-2600"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_bounds</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-2601" name="line-2601"></a><span class="w"> </span><span class="n">gtk_text_buffer_delete</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-2602" name="line-2602"></a><span class="p">}</span> +<a id="line-2603" name="line-2603"></a> +<a id="line-2604" name="line-2604"></a><span class="cm">/**</span> +<a id="line-2605" name="line-2605"></a><span class="cm"> * gdict_defbox_find_next:</span> +<a id="line-2606" name="line-2606"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2607" name="line-2607"></a><span class="cm"> *</span> +<a id="line-2608" name="line-2608"></a><span class="cm"> * Emits the "find-next" signal.</span> +<a id="line-2609" name="line-2609"></a><span class="cm"> *</span> +<a id="line-2610" name="line-2610"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2611" name="line-2611"></a><span class="cm"> */</span> +<a id="line-2612" name="line-2612"></a><span class="kt">void</span> +<a id="line-2613" name="line-2613"></a><span class="n">gdict_defbox_find_next</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-2614" name="line-2614"></a><span class="p">{</span> +<a id="line-2615" name="line-2615"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2616" name="line-2616"></a> +<a id="line-2617" name="line-2617"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_defbox_signals</span><span class="p">[</span><span class="n">FIND_NEXT</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2618" name="line-2618"></a><span class="p">}</span> +<a id="line-2619" name="line-2619"></a> +<a id="line-2620" name="line-2620"></a><span class="cm">/**</span> +<a id="line-2621" name="line-2621"></a><span class="cm"> * gdict_defbox_find_previous:</span> +<a id="line-2622" name="line-2622"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2623" name="line-2623"></a><span class="cm"> *</span> +<a id="line-2624" name="line-2624"></a><span class="cm"> * Emits the "find-previous" signal.</span> +<a id="line-2625" name="line-2625"></a><span class="cm"> *</span> +<a id="line-2626" name="line-2626"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2627" name="line-2627"></a><span class="cm"> */</span> +<a id="line-2628" name="line-2628"></a><span class="kt">void</span> +<a id="line-2629" name="line-2629"></a><span class="n">gdict_defbox_find_previous</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-2630" name="line-2630"></a><span class="p">{</span> +<a id="line-2631" name="line-2631"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2632" name="line-2632"></a> +<a id="line-2633" name="line-2633"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_defbox_signals</span><span class="p">[</span><span class="n">FIND_PREVIOUS</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-2634" name="line-2634"></a><span class="p">}</span> +<a id="line-2635" name="line-2635"></a> +<a id="line-2636" name="line-2636"></a><span class="cm">/**</span> +<a id="line-2637" name="line-2637"></a><span class="cm"> * gdict_defbox_select_all:</span> +<a id="line-2638" name="line-2638"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2639" name="line-2639"></a><span class="cm"> *</span> +<a id="line-2640" name="line-2640"></a><span class="cm"> * Selects all the text displayed by @defbox</span> +<a id="line-2641" name="line-2641"></a><span class="cm"> *</span> +<a id="line-2642" name="line-2642"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2643" name="line-2643"></a><span class="cm"> */</span> +<a id="line-2644" name="line-2644"></a><span class="kt">void</span> +<a id="line-2645" name="line-2645"></a><span class="n">gdict_defbox_select_all</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-2646" name="line-2646"></a><span class="p">{</span> +<a id="line-2647" name="line-2647"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2648" name="line-2648"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-2649" name="line-2649"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-2650" name="line-2650"></a> +<a id="line-2651" name="line-2651"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2652" name="line-2652"></a> +<a id="line-2653" name="line-2653"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2654" name="line-2654"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-2655" name="line-2655"></a> +<a id="line-2656" name="line-2656"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_bounds</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-2657" name="line-2657"></a><span class="w"> </span><span class="n">gtk_text_buffer_select_range</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-2658" name="line-2658"></a><span class="p">}</span> +<a id="line-2659" name="line-2659"></a> +<a id="line-2660" name="line-2660"></a><span class="cm">/**</span> +<a id="line-2661" name="line-2661"></a><span class="cm"> * gdict_defbox_copy_to_clipboard:</span> +<a id="line-2662" name="line-2662"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2663" name="line-2663"></a><span class="cm"> * @clipboard: a #GtkClipboard</span> +<a id="line-2664" name="line-2664"></a><span class="cm"> *</span> +<a id="line-2665" name="line-2665"></a><span class="cm"> * Copies the selected text inside @defbox into @clipboard.</span> +<a id="line-2666" name="line-2666"></a><span class="cm"> *</span> +<a id="line-2667" name="line-2667"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2668" name="line-2668"></a><span class="cm"> */</span> +<a id="line-2669" name="line-2669"></a><span class="kt">void</span> +<a id="line-2670" name="line-2670"></a><span class="n">gdict_defbox_copy_to_clipboard</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-2671" name="line-2671"></a><span class="w"> </span><span class="n">GtkClipboard</span><span class="w"> </span><span class="o">*</span><span class="n">clipboard</span><span class="p">)</span> +<a id="line-2672" name="line-2672"></a><span class="p">{</span> +<a id="line-2673" name="line-2673"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2674" name="line-2674"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-2675" name="line-2675"></a> +<a id="line-2676" name="line-2676"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2677" name="line-2677"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_CLIPBOARD</span><span class="w"> </span><span class="p">(</span><span class="n">clipboard</span><span class="p">));</span> +<a id="line-2678" name="line-2678"></a> +<a id="line-2679" name="line-2679"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2680" name="line-2680"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-2681" name="line-2681"></a> +<a id="line-2682" name="line-2682"></a><span class="w"> </span><span class="n">gtk_text_buffer_copy_clipboard</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="n">clipboard</span><span class="p">);</span> +<a id="line-2683" name="line-2683"></a><span class="p">}</span> +<a id="line-2684" name="line-2684"></a> +<a id="line-2685" name="line-2685"></a><span class="cm">/**</span> +<a id="line-2686" name="line-2686"></a><span class="cm"> * gdict_defbox_count_definitions:</span> +<a id="line-2687" name="line-2687"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2688" name="line-2688"></a><span class="cm"> *</span> +<a id="line-2689" name="line-2689"></a><span class="cm"> * Gets the number of definitions displayed by @defbox</span> +<a id="line-2690" name="line-2690"></a><span class="cm"> *</span> +<a id="line-2691" name="line-2691"></a><span class="cm"> * Return value: the number of definitions.</span> +<a id="line-2692" name="line-2692"></a><span class="cm"> *</span> +<a id="line-2693" name="line-2693"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2694" name="line-2694"></a><span class="cm"> */</span> +<a id="line-2695" name="line-2695"></a><span class="n">gint</span> +<a id="line-2696" name="line-2696"></a><span class="n">gdict_defbox_count_definitions</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-2697" name="line-2697"></a><span class="p">{</span> +<a id="line-2698" name="line-2698"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2699" name="line-2699"></a> +<a id="line-2700" name="line-2700"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-2701" name="line-2701"></a> +<a id="line-2702" name="line-2702"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2703" name="line-2703"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="p">)</span> +<a id="line-2704" name="line-2704"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-2705" name="line-2705"></a> +<a id="line-2706" name="line-2706"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_slist_length</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="p">);</span> +<a id="line-2707" name="line-2707"></a><span class="p">}</span> +<a id="line-2708" name="line-2708"></a> +<a id="line-2709" name="line-2709"></a><span class="cm">/**</span> +<a id="line-2710" name="line-2710"></a><span class="cm"> * gdict_defbox_jump_to_definition:</span> +<a id="line-2711" name="line-2711"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2712" name="line-2712"></a><span class="cm"> * @number: the definition to jump to</span> +<a id="line-2713" name="line-2713"></a><span class="cm"> *</span> +<a id="line-2714" name="line-2714"></a><span class="cm"> * Scrolls to the definition identified by @number. If @number is -1,</span> +<a id="line-2715" name="line-2715"></a><span class="cm"> * jumps to the last definition.</span> +<a id="line-2716" name="line-2716"></a><span class="cm"> *</span> +<a id="line-2717" name="line-2717"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2718" name="line-2718"></a><span class="cm"> */</span> +<a id="line-2719" name="line-2719"></a><span class="kt">void</span> +<a id="line-2720" name="line-2720"></a><span class="n">gdict_defbox_jump_to_definition</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-2721" name="line-2721"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">number</span><span class="p">)</span> +<a id="line-2722" name="line-2722"></a><span class="p">{</span> +<a id="line-2723" name="line-2723"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2724" name="line-2724"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">count</span><span class="p">;</span> +<a id="line-2725" name="line-2725"></a><span class="w"> </span><span class="n">Definition</span><span class="w"> </span><span class="o">*</span><span class="n">def</span><span class="p">;</span> +<a id="line-2726" name="line-2726"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-2727" name="line-2727"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">def_start</span><span class="p">;</span> +<a id="line-2728" name="line-2728"></a> +<a id="line-2729" name="line-2729"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2730" name="line-2730"></a> +<a id="line-2731" name="line-2731"></a><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_count_definitions</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-2732" name="line-2732"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-2733" name="line-2733"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2734" name="line-2734"></a> +<a id="line-2735" name="line-2735"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">number</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">number</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">count</span><span class="p">))</span> +<a id="line-2736" name="line-2736"></a><span class="w"> </span><span class="n">number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">count</span><span class="p">;</span> +<a id="line-2737" name="line-2737"></a> +<a id="line-2738" name="line-2738"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2739" name="line-2739"></a><span class="w"> </span><span class="n">def</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">Definition</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">g_slist_nth_data</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">definitions</span><span class="p">,</span><span class="w"> </span><span class="n">number</span><span class="p">);</span> +<a id="line-2740" name="line-2740"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">def</span><span class="p">)</span> +<a id="line-2741" name="line-2741"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-2742" name="line-2742"></a> +<a id="line-2743" name="line-2743"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-2744" name="line-2744"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_iter_at_offset</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">def_start</span><span class="p">,</span><span class="w"> </span><span class="n">def</span><span class="o">-></span><span class="n">begin</span><span class="p">);</span> +<a id="line-2745" name="line-2745"></a><span class="w"> </span><span class="n">gtk_text_view_scroll_to_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">),</span> +<a id="line-2746" name="line-2746"></a><span class="w"> </span><span class="o">&</span><span class="n">def_start</span><span class="p">,</span> +<a id="line-2747" name="line-2747"></a><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span> +<a id="line-2748" name="line-2748"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-2749" name="line-2749"></a><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-2750" name="line-2750"></a><span class="p">}</span> +<a id="line-2751" name="line-2751"></a> +<a id="line-2752" name="line-2752"></a><span class="cm">/**</span> +<a id="line-2753" name="line-2753"></a><span class="cm"> * gdict_defbox_get_text:</span> +<a id="line-2754" name="line-2754"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2755" name="line-2755"></a><span class="cm"> * @length: return location for the text length or %NULL</span> +<a id="line-2756" name="line-2756"></a><span class="cm"> *</span> +<a id="line-2757" name="line-2757"></a><span class="cm"> * Gets the full contents of @defbox.</span> +<a id="line-2758" name="line-2758"></a><span class="cm"> *</span> +<a id="line-2759" name="line-2759"></a><span class="cm"> * Return value: a newly allocated string containing the text displayed by</span> +<a id="line-2760" name="line-2760"></a><span class="cm"> * @defbox.</span> +<a id="line-2761" name="line-2761"></a><span class="cm"> *</span> +<a id="line-2762" name="line-2762"></a><span class="cm"> * Since: 0.1</span> +<a id="line-2763" name="line-2763"></a><span class="cm"> */</span> +<a id="line-2764" name="line-2764"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-2765" name="line-2765"></a><span class="n">gdict_defbox_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-2766" name="line-2766"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="o">*</span><span class="n">length</span><span class="p">)</span> +<a id="line-2767" name="line-2767"></a><span class="p">{</span> +<a id="line-2768" name="line-2768"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2769" name="line-2769"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-2770" name="line-2770"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-2771" name="line-2771"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-2772" name="line-2772"></a> +<a id="line-2773" name="line-2773"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2774" name="line-2774"></a> +<a id="line-2775" name="line-2775"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2776" name="line-2776"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-2777" name="line-2777"></a> +<a id="line-2778" name="line-2778"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_bounds</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-2779" name="line-2779"></a> +<a id="line-2780" name="line-2780"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2781" name="line-2781"></a> +<a id="line-2782" name="line-2782"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">length</span><span class="p">)</span> +<a id="line-2783" name="line-2783"></a><span class="w"> </span><span class="o">*</span><span class="n">length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">retval</span><span class="p">);</span> +<a id="line-2784" name="line-2784"></a> +<a id="line-2785" name="line-2785"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-2786" name="line-2786"></a><span class="p">}</span> +<a id="line-2787" name="line-2787"></a> +<a id="line-2788" name="line-2788"></a><span class="cm">/**</span> +<a id="line-2789" name="line-2789"></a><span class="cm"> * gdict_defbox_set_font_name:</span> +<a id="line-2790" name="line-2790"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2791" name="line-2791"></a><span class="cm"> * @font_name: a font description, or %NULL</span> +<a id="line-2792" name="line-2792"></a><span class="cm"> *</span> +<a id="line-2793" name="line-2793"></a><span class="cm"> * Sets @font_name as the font for @defbox. It calls internally</span> +<a id="line-2794" name="line-2794"></a><span class="cm"> * pango_font_description_from_string() and gtk_widget_modify_font().</span> +<a id="line-2795" name="line-2795"></a><span class="cm"> *</span> +<a id="line-2796" name="line-2796"></a><span class="cm"> * Passing %NULL for @font_name will reset any previously set font.</span> +<a id="line-2797" name="line-2797"></a><span class="cm"> *</span> +<a id="line-2798" name="line-2798"></a><span class="cm"> * Since: 0.3.0</span> +<a id="line-2799" name="line-2799"></a><span class="cm"> */</span> +<a id="line-2800" name="line-2800"></a><span class="kt">void</span> +<a id="line-2801" name="line-2801"></a><span class="n">gdict_defbox_set_font_name</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-2802" name="line-2802"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">font_name</span><span class="p">)</span> +<a id="line-2803" name="line-2803"></a><span class="p">{</span> +<a id="line-2804" name="line-2804"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2805" name="line-2805"></a><span class="w"> </span><span class="n">PangoFontDescription</span><span class="w"> </span><span class="o">*</span><span class="n">font_desc</span><span class="p">;</span> +<a id="line-2806" name="line-2806"></a> +<a id="line-2807" name="line-2807"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2808" name="line-2808"></a> +<a id="line-2809" name="line-2809"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2810" name="line-2810"></a> +<a id="line-2811" name="line-2811"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">font_name</span><span class="p">)</span> +<a id="line-2812" name="line-2812"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2813" name="line-2813"></a><span class="w"> </span><span class="n">font_desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pango_font_description_from_string</span><span class="w"> </span><span class="p">(</span><span class="n">font_name</span><span class="p">);</span> +<a id="line-2814" name="line-2814"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">font_desc</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2815" name="line-2815"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2816" name="line-2816"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2817" name="line-2817"></a><span class="w"> </span><span class="n">font_desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2818" name="line-2818"></a> +<a id="line-2819" name="line-2819"></a><span class="w"> </span><span class="n">gtk_widget_override_font</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">,</span><span class="w"> </span><span class="n">font_desc</span><span class="p">);</span> +<a id="line-2820" name="line-2820"></a> +<a id="line-2821" name="line-2821"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">font_desc</span><span class="p">)</span> +<a id="line-2822" name="line-2822"></a><span class="w"> </span><span class="n">pango_font_description_free</span><span class="w"> </span><span class="p">(</span><span class="n">font_desc</span><span class="p">);</span> +<a id="line-2823" name="line-2823"></a> +<a id="line-2824" name="line-2824"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">font_name</span><span class="p">);</span> +<a id="line-2825" name="line-2825"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">font_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">font_name</span><span class="p">);</span> +<a id="line-2826" name="line-2826"></a><span class="p">}</span> +<a id="line-2827" name="line-2827"></a> +<a id="line-2828" name="line-2828"></a><span class="cm">/**</span> +<a id="line-2829" name="line-2829"></a><span class="cm"> * gdict_defbox_get_font_name:</span> +<a id="line-2830" name="line-2830"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2831" name="line-2831"></a><span class="cm"> *</span> +<a id="line-2832" name="line-2832"></a><span class="cm"> * Retrieves the font currently used by @defbox.</span> +<a id="line-2833" name="line-2833"></a><span class="cm"> *</span> +<a id="line-2834" name="line-2834"></a><span class="cm"> * Return value: a font name. The returned string is owned by @defbox and</span> +<a id="line-2835" name="line-2835"></a><span class="cm"> * should not be modified or freed.</span> +<a id="line-2836" name="line-2836"></a><span class="cm"> *</span> +<a id="line-2837" name="line-2837"></a><span class="cm"> * Since: 0.3</span> +<a id="line-2838" name="line-2838"></a><span class="cm"> */</span> +<a id="line-2839" name="line-2839"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-2840" name="line-2840"></a><span class="n">gdict_defbox_get_font_name</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-2841" name="line-2841"></a><span class="p">{</span> +<a id="line-2842" name="line-2842"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2843" name="line-2843"></a> +<a id="line-2844" name="line-2844"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">font_name</span><span class="p">;</span> +<a id="line-2845" name="line-2845"></a><span class="p">}</span> +<a id="line-2846" name="line-2846"></a> +<a id="line-2847" name="line-2847"></a><span class="cm">/**</span> +<a id="line-2848" name="line-2848"></a><span class="cm"> * gdict_defbox_get_selected_word:</span> +<a id="line-2849" name="line-2849"></a><span class="cm"> * @defbox: a #GdictDefbox</span> +<a id="line-2850" name="line-2850"></a><span class="cm"> *</span> +<a id="line-2851" name="line-2851"></a><span class="cm"> * Retrieves the selected word from the defbox widget</span> +<a id="line-2852" name="line-2852"></a><span class="cm"> *</span> +<a id="line-2853" name="line-2853"></a><span class="cm"> * Return value: a newly allocated string containing the selected</span> +<a id="line-2854" name="line-2854"></a><span class="cm"> * word. Use g_free() when done using it.</span> +<a id="line-2855" name="line-2855"></a><span class="cm"> *</span> +<a id="line-2856" name="line-2856"></a><span class="cm"> * Since: 0.12</span> +<a id="line-2857" name="line-2857"></a><span class="cm"> */</span> +<a id="line-2858" name="line-2858"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-2859" name="line-2859"></a><span class="n">gdict_defbox_get_selected_word</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">)</span> +<a id="line-2860" name="line-2860"></a><span class="p">{</span> +<a id="line-2861" name="line-2861"></a><span class="w"> </span><span class="n">GdictDefboxPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-2862" name="line-2862"></a><span class="w"> </span><span class="n">GtkTextBuffer</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">;</span> +<a id="line-2863" name="line-2863"></a> +<a id="line-2864" name="line-2864"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2865" name="line-2865"></a> +<a id="line-2866" name="line-2866"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">defbox</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-2867" name="line-2867"></a><span class="w"> </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_view_get_buffer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TEXT_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">text_view</span><span class="p">));</span> +<a id="line-2868" name="line-2868"></a> +<a id="line-2869" name="line-2869"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_text_buffer_get_has_selection</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">))</span> +<a id="line-2870" name="line-2870"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2871" name="line-2871"></a><span class="w"> </span><span class="k">else</span> +<a id="line-2872" name="line-2872"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2873" name="line-2873"></a><span class="w"> </span><span class="n">GtkTextIter</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="n">end</span><span class="p">;</span> +<a id="line-2874" name="line-2874"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-2875" name="line-2875"></a> +<a id="line-2876" name="line-2876"></a><span class="w"> </span><span class="n">gtk_text_buffer_get_selection_bounds</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">);</span> +<a id="line-2877" name="line-2877"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_text_buffer_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-2878" name="line-2878"></a> +<a id="line-2879" name="line-2879"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-2880" name="line-2880"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2881" name="line-2881"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/29.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/29.html new file mode 100644 index 00000000..e9c13ad9 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/29.html @@ -0,0 +1,2039 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-dictionary/libgdict/gdict-source-chooser.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gdict-source-chooser.c</p> +<a href="29.html#line-92"> unknownMacro 92</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span> +<span class="normal">533</span> +<span class="normal">534</span> +<span class="normal">535</span> +<span class="normal">536</span> +<span class="normal">537</span> +<span class="normal">538</span> +<span class="normal">539</span> +<span class="normal">540</span> +<span class="normal">541</span> +<span class="normal">542</span> +<span class="normal">543</span> +<span class="normal">544</span> +<span class="normal">545</span> +<span class="normal">546</span> +<span class="normal">547</span> +<span class="normal">548</span> +<span class="normal">549</span> +<span class="normal">550</span> +<span class="normal">551</span> +<span class="normal">552</span> +<span class="normal">553</span> +<span class="normal">554</span> +<span class="normal">555</span> +<span class="normal">556</span> +<span class="normal">557</span> +<span class="normal">558</span> +<span class="normal">559</span> +<span class="normal">560</span> +<span class="normal">561</span> +<span class="normal">562</span> +<span class="normal">563</span> +<span class="normal">564</span> +<span class="normal">565</span> +<span class="normal">566</span> +<span class="normal">567</span> +<span class="normal">568</span> +<span class="normal">569</span> +<span class="normal">570</span> +<span class="normal">571</span> +<span class="normal">572</span> +<span class="normal">573</span> +<span class="normal">574</span> +<span class="normal">575</span> +<span class="normal">576</span> +<span class="normal">577</span> +<span class="normal">578</span> +<span class="normal">579</span> +<span class="normal">580</span> +<span class="normal">581</span> +<span class="normal">582</span> +<span class="normal">583</span> +<span class="normal">584</span> +<span class="normal">585</span> +<span class="normal">586</span> +<span class="normal">587</span> +<span class="normal">588</span> +<span class="normal">589</span> +<span class="normal">590</span> +<span class="normal">591</span> +<span class="normal">592</span> +<span class="normal">593</span> +<span class="normal">594</span> +<span class="normal">595</span> +<span class="normal">596</span> +<span class="normal">597</span> +<span class="normal">598</span> +<span class="normal">599</span> +<span class="normal">600</span> +<span class="normal">601</span> +<span class="normal">602</span> +<span class="normal">603</span> +<span class="normal">604</span> +<span class="normal">605</span> +<span class="normal">606</span> +<span class="normal">607</span> +<span class="normal">608</span> +<span class="normal">609</span> +<span class="normal">610</span> +<span class="normal">611</span> +<span class="normal">612</span> +<span class="normal">613</span> +<span class="normal">614</span> +<span class="normal">615</span> +<span class="normal">616</span> +<span class="normal">617</span> +<span class="normal">618</span> +<span class="normal">619</span> +<span class="normal">620</span> +<span class="normal">621</span> +<span class="normal">622</span> +<span class="normal">623</span> +<span class="normal">624</span> +<span class="normal">625</span> +<span class="normal">626</span> +<span class="normal">627</span> +<span class="normal">628</span> +<span class="normal">629</span> +<span class="normal">630</span> +<span class="normal">631</span> +<span class="normal">632</span> +<span class="normal">633</span> +<span class="normal">634</span> +<span class="normal">635</span> +<span class="normal">636</span> +<span class="normal">637</span> +<span class="normal">638</span> +<span class="normal">639</span> +<span class="normal">640</span> +<span class="normal">641</span> +<span class="normal">642</span> +<span class="normal">643</span> +<span class="normal">644</span> +<span class="normal">645</span> +<span class="normal">646</span> +<span class="normal">647</span> +<span class="normal">648</span> +<span class="normal">649</span> +<span class="normal">650</span> +<span class="normal">651</span> +<span class="normal">652</span> +<span class="normal">653</span> +<span class="normal">654</span> +<span class="normal">655</span> +<span class="normal">656</span> +<span class="normal">657</span> +<span class="normal">658</span> +<span class="normal">659</span> +<span class="normal">660</span> +<span class="normal">661</span> +<span class="normal">662</span> +<span class="normal">663</span> +<span class="normal">664</span> +<span class="normal">665</span> +<span class="normal">666</span> +<span class="normal">667</span> +<span class="normal">668</span> +<span class="normal">669</span> +<span class="normal">670</span> +<span class="normal">671</span> +<span class="normal">672</span> +<span class="normal">673</span> +<span class="normal">674</span> +<span class="normal">675</span> +<span class="normal">676</span> +<span class="normal">677</span> +<span class="normal">678</span> +<span class="normal">679</span> +<span class="normal">680</span> +<span class="normal">681</span> +<span class="normal">682</span> +<span class="normal">683</span> +<span class="normal">684</span> +<span class="normal">685</span> +<span class="normal">686</span> +<span class="normal">687</span> +<span class="normal">688</span> +<span class="normal">689</span> +<span class="normal">690</span> +<span class="normal">691</span> +<span class="normal">692</span> +<span class="normal">693</span> +<span class="normal">694</span> +<span class="normal">695</span> +<span class="normal">696</span> +<span class="normal">697</span> +<span class="normal">698</span> +<span class="normal">699</span> +<span class="normal">700</span> +<span class="normal">701</span> +<span class="normal">702</span> +<span class="normal">703</span> +<span class="normal">704</span> +<span class="normal">705</span> +<span class="normal">706</span> +<span class="normal">707</span> +<span class="normal">708</span> +<span class="normal">709</span> +<span class="normal">710</span> +<span class="normal">711</span> +<span class="normal">712</span> +<span class="normal">713</span> +<span class="normal">714</span> +<span class="normal">715</span> +<span class="normal">716</span> +<span class="normal">717</span> +<span class="normal">718</span> +<span class="normal">719</span> +<span class="normal">720</span> +<span class="normal">721</span> +<span class="normal">722</span> +<span class="normal">723</span> +<span class="normal">724</span> +<span class="normal">725</span> +<span class="normal">726</span> +<span class="normal">727</span> +<span class="normal">728</span> +<span class="normal">729</span> +<span class="normal">730</span> +<span class="normal">731</span> +<span class="normal">732</span> +<span class="normal">733</span> +<span class="normal">734</span> +<span class="normal">735</span> +<span class="normal">736</span> +<span class="normal">737</span> +<span class="normal">738</span> +<span class="normal">739</span> +<span class="normal">740</span> +<span class="normal">741</span> +<span class="normal">742</span> +<span class="normal">743</span> +<span class="normal">744</span> +<span class="normal">745</span> +<span class="normal">746</span> +<span class="normal">747</span> +<span class="normal">748</span> +<span class="normal">749</span> +<span class="normal">750</span> +<span class="normal">751</span> +<span class="normal">752</span> +<span class="normal">753</span> +<span class="normal">754</span> +<span class="normal">755</span> +<span class="normal">756</span> +<span class="normal">757</span> +<span class="normal">758</span> +<span class="normal">759</span> +<span class="normal">760</span> +<span class="normal">761</span> +<span class="normal">762</span> +<span class="normal">763</span> +<span class="normal">764</span> +<span class="normal">765</span> +<span class="normal">766</span> +<span class="normal">767</span> +<span class="normal">768</span> +<span class="normal">769</span> +<span class="normal">770</span> +<span class="normal">771</span> +<span class="normal">772</span> +<span class="normal">773</span> +<span class="normal">774</span> +<span class="normal">775</span> +<span class="normal">776</span> +<span class="normal">777</span> +<span class="normal">778</span> +<span class="normal">779</span> +<span class="normal">780</span> +<span class="normal">781</span> +<span class="normal">782</span> +<span class="normal">783</span> +<span class="normal">784</span> +<span class="normal">785</span> +<span class="normal">786</span> +<span class="normal">787</span> +<span class="normal">788</span> +<span class="normal">789</span> +<span class="normal">790</span> +<span class="normal">791</span> +<span class="normal">792</span> +<span class="normal">793</span> +<span class="normal">794</span> +<span class="normal">795</span> +<span class="normal">796</span> +<span class="normal">797</span> +<span class="normal">798</span> +<span class="normal">799</span> +<span class="normal">800</span> +<span class="normal">801</span> +<span class="normal">802</span> +<span class="normal">803</span> +<span class="normal">804</span> +<span class="normal">805</span> +<span class="normal">806</span> +<span class="normal">807</span> +<span class="normal">808</span> +<span class="normal">809</span> +<span class="normal">810</span> +<span class="normal">811</span> +<span class="normal">812</span> +<span class="normal">813</span> +<span class="normal">814</span> +<span class="normal">815</span> +<span class="normal">816</span> +<span class="normal">817</span> +<span class="normal">818</span> +<span class="normal">819</span> +<span class="normal">820</span> +<span class="normal">821</span> +<span class="normal">822</span> +<span class="normal">823</span> +<span class="normal">824</span> +<span class="normal">825</span> +<span class="normal">826</span> +<span class="normal">827</span> +<span class="normal">828</span> +<span class="normal">829</span> +<span class="normal">830</span> +<span class="normal">831</span> +<span class="normal">832</span> +<span class="normal">833</span> +<span class="normal">834</span> +<span class="normal">835</span> +<span class="normal">836</span> +<span class="normal">837</span> +<span class="normal">838</span> +<span class="normal">839</span> +<span class="normal">840</span> +<span class="normal">841</span> +<span class="normal">842</span> +<span class="normal">843</span> +<span class="normal">844</span> +<span class="normal">845</span> +<span class="normal">846</span> +<span class="normal">847</span> +<span class="normal">848</span> +<span class="normal">849</span> +<span class="normal">850</span> +<span class="normal">851</span> +<span class="normal">852</span> +<span class="normal">853</span> +<span class="normal">854</span> +<span class="normal">855</span> +<span class="normal">856</span> +<span class="normal">857</span> +<span class="normal">858</span> +<span class="normal">859</span> +<span class="normal">860</span> +<span class="normal">861</span> +<span class="normal">862</span> +<span class="normal">863</span> +<span class="normal">864</span> +<span class="normal">865</span> +<span class="normal">866</span> +<span class="normal">867</span> +<span class="normal">868</span> +<span class="normal">869</span> +<span class="normal">870</span> +<span class="normal">871</span> +<span class="normal">872</span> +<span class="normal">873</span> +<span class="normal">874</span> +<span class="normal">875</span> +<span class="normal">876</span> +<span class="normal">877</span> +<span class="normal">878</span> +<span class="normal">879</span> +<span class="normal">880</span> +<span class="normal">881</span> +<span class="normal">882</span> +<span class="normal">883</span> +<span class="normal">884</span> +<span class="normal">885</span> +<span class="normal">886</span> +<span class="normal">887</span> +<span class="normal">888</span> +<span class="normal">889</span> +<span class="normal">890</span> +<span class="normal">891</span> +<span class="normal">892</span> +<span class="normal">893</span> +<span class="normal">894</span> +<span class="normal">895</span> +<span class="normal">896</span> +<span class="normal">897</span> +<span class="normal">898</span> +<span class="normal">899</span> +<span class="normal">900</span> +<span class="normal">901</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2007 Emmanuele Bassi <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cm">/**</span> +<a id="line-21" name="line-21"></a><span class="cm"> * SECTION:gdict-source-chooser</span> +<a id="line-22" name="line-22"></a><span class="cm"> * @short_description: Display the list of available sources</span> +<a id="line-23" name="line-23"></a><span class="cm"> *</span> +<a id="line-24" name="line-24"></a><span class="cm"> * #GdictSourceChooser is a widget that shows the list of available</span> +<a id="line-25" name="line-25"></a><span class="cm"> * dictionary sources using a #GdictSourceLoader instance as a model.</span> +<a id="line-26" name="line-26"></a><span class="cm"> * It can be used to allow choosing the current dictionary source.</span> +<a id="line-27" name="line-27"></a><span class="cm"> *</span> +<a id="line-28" name="line-28"></a><span class="cm"> * #GdictSourceChooser is available since Gdict 0.12.</span> +<a id="line-29" name="line-29"></a><span class="cm"> */</span> +<a id="line-30" name="line-30"></a> +<a id="line-31" name="line-31"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-33" name="line-33"></a><span class="cp">#endif</span> +<a id="line-34" name="line-34"></a> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-37" name="line-37"></a> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n-lib.h></span> +<a id="line-39" name="line-39"></a> +<a id="line-40" name="line-40"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdk.h></span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-source-chooser.h"</span> +<a id="line-45" name="line-45"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-utils.h"</span> +<a id="line-46" name="line-46"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-private.h"</span> +<a id="line-47" name="line-47"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-enum-types.h"</span> +<a id="line-48" name="line-48"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-marshal.h"</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_GdictSourceChooserPrivate</span> +<a id="line-51" name="line-51"></a><span class="p">{</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">;</span> +<a id="line-53" name="line-53"></a> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">treeview</span><span class="p">;</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">refresh_button</span><span class="p">;</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">buttons_box</span><span class="p">;</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">GdictSourceLoader</span><span class="w"> </span><span class="o">*</span><span class="n">loader</span><span class="p">;</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">n_sources</span><span class="p">;</span> +<a id="line-60" name="line-60"></a> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">current_source</span><span class="p">;</span> +<a id="line-62" name="line-62"></a><span class="p">};</span> +<a id="line-63" name="line-63"></a> +<a id="line-64" name="line-64"></a><span class="k">enum</span> +<a id="line-65" name="line-65"></a><span class="p">{</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">SOURCE_TRANSPORT</span><span class="p">,</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">SOURCE_NAME</span><span class="p">,</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">SOURCE_DESCRIPTION</span><span class="p">,</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">SOURCE_CURRENT</span><span class="p">,</span> +<a id="line-70" name="line-70"></a> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">SOURCE_N_COLUMNS</span> +<a id="line-72" name="line-72"></a><span class="p">};</span> +<a id="line-73" name="line-73"></a> +<a id="line-74" name="line-74"></a><span class="k">enum</span> +<a id="line-75" name="line-75"></a><span class="p">{</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">PROP_0</span><span class="p">,</span> +<a id="line-77" name="line-77"></a> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="n">PROP_LOADER</span><span class="p">,</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="n">PROP_COUNT</span> +<a id="line-80" name="line-80"></a><span class="p">};</span> +<a id="line-81" name="line-81"></a> +<a id="line-82" name="line-82"></a><span class="k">enum</span> +<a id="line-83" name="line-83"></a><span class="p">{</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">SOURCE_ACTIVATED</span><span class="p">,</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">SELECTION_CHANGED</span><span class="p">,</span> +<a id="line-86" name="line-86"></a> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-88" name="line-88"></a><span class="p">};</span> +<a id="line-89" name="line-89"></a> +<a id="line-90" name="line-90"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">source_chooser_signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="p">};</span> +<a id="line-91" name="line-91"></a> +<a id="line-92" name="line-92"></a><span class="hll"><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_source_chooser</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_BOX</span><span class="p">)</span><span class="error2"><--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</span> +</span><a id="line-93" name="line-93"></a> +<a id="line-94" name="line-94"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-95" name="line-95"></a><span class="n">gdict_source_chooser_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">gobject</span><span class="p">)</span> +<a id="line-96" name="line-96"></a><span class="p">{</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-99" name="line-99"></a> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">current_source</span><span class="p">);</span> +<a id="line-101" name="line-101"></a> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_source_chooser_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-103" name="line-103"></a><span class="p">}</span> +<a id="line-104" name="line-104"></a> +<a id="line-105" name="line-105"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-106" name="line-106"></a><span class="n">gdict_source_chooser_dispose</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">gobject</span><span class="p">)</span> +<a id="line-107" name="line-107"></a><span class="p">{</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-110" name="line-110"></a> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">)</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="p">{</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">);</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="p">}</span> +<a id="line-116" name="line-116"></a> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">)</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="p">{</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="p">}</span> +<a id="line-122" name="line-122"></a> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_source_chooser_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">dispose</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-124" name="line-124"></a><span class="p">}</span> +<a id="line-125" name="line-125"></a> +<a id="line-126" name="line-126"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-127" name="line-127"></a><span class="n">gdict_source_chooser_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">gobject</span><span class="p">,</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-131" name="line-131"></a><span class="p">{</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="p">{</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_LOADER</span><span class="p">:</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">gdict_source_chooser_set_loader</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">),</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">g_value_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="p">}</span> +<a id="line-142" name="line-142"></a><span class="p">}</span> +<a id="line-143" name="line-143"></a> +<a id="line-144" name="line-144"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-145" name="line-145"></a><span class="n">gdict_source_chooser_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">gobject</span><span class="p">,</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-149" name="line-149"></a><span class="p">{</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-151" name="line-151"></a> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-153" name="line-153"></a> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="p">{</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_LOADER</span><span class="p">:</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">g_value_set_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_COUNT</span><span class="p">:</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">g_value_set_int</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">n_sources</span><span class="p">);</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="p">}</span> +<a id="line-166" name="line-166"></a><span class="p">}</span> +<a id="line-167" name="line-167"></a> +<a id="line-168" name="line-168"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-169" name="line-169"></a><span class="n">row_activated_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="n">treeview</span><span class="p">,</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">column</span><span class="p">,</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-173" name="line-173"></a><span class="p">{</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">);</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">;</span> +<a id="line-179" name="line-179"></a> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">)</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-182" name="line-182"></a> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">))</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-185" name="line-185"></a> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">SOURCE_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">name</span><span class="p">)</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_loader_get_source</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">source</span><span class="p">)</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="p">{</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="p">}</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">,</span><span class="w"> </span><span class="n">source_chooser_signals</span><span class="p">[</span><span class="n">SOURCE_ACTIVATED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">source</span><span class="p">);</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-204" name="line-204"></a><span class="p">}</span> +<a id="line-205" name="line-205"></a> +<a id="line-206" name="line-206"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-207" name="line-207"></a><span class="n">refresh_button_clicked_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkButton</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">,</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-209" name="line-209"></a><span class="p">{</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">gdict_source_chooser_refresh</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">));</span> +<a id="line-211" name="line-211"></a><span class="p">}</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-214" name="line-214"></a><span class="n">selection_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">,</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-216" name="line-216"></a><span class="p">{</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="n">source_chooser_signals</span><span class="p">[</span><span class="n">SELECTION_CHANGED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-218" name="line-218"></a><span class="p">}</span> +<a id="line-219" name="line-219"></a> +<a id="line-220" name="line-220"></a><span class="k">static</span><span class="w"> </span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span> +<a id="line-221" name="line-221"></a><span class="n">gdict_source_chooser_constructor</span><span class="w"> </span><span class="p">(</span><span class="n">GType</span><span class="w"> </span><span class="n">gtype</span><span class="p">,</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">n_params</span><span class="p">,</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">GObjectConstructParam</span><span class="w"> </span><span class="o">*</span><span class="n">params</span><span class="p">)</span> +<a id="line-224" name="line-224"></a><span class="p">{</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">;</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">parent_class</span><span class="p">;</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">sw</span><span class="p">;</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="n">renderer</span><span class="p">;</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">column</span><span class="p">;</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hbox</span><span class="p">;</span> +<a id="line-233" name="line-233"></a> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">parent_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_source_chooser_parent_class</span><span class="p">);</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">parent_class</span><span class="o">-></span><span class="n">constructor</span><span class="w"> </span><span class="p">(</span><span class="n">gtype</span><span class="p">,</span><span class="w"> </span><span class="n">n_params</span><span class="p">,</span><span class="w"> </span><span class="n">params</span><span class="p">);</span> +<a id="line-236" name="line-236"></a> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">retval</span><span class="p">);</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-239" name="line-239"></a> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">sw</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_scrolled_window_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">gtk_widget_set_vexpand</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_policy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">),</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">,</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">);</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_shadow_type</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">),</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">GTK_SHADOW_IN</span><span class="p">);</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="n">sw</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">);</span> +<a id="line-249" name="line-249"></a> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new_with_attributes</span><span class="w"> </span><span class="p">(</span><span class="s">"sources"</span><span class="p">,</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_DESCRIPTION</span><span class="p">,</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="s">"weight"</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_CURRENT</span><span class="p">,</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">gtk_tree_view_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">),</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">));</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">gtk_tree_view_set_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">),</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">)),</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">selection_changed_cb</span><span class="p">),</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">chooser</span><span class="p">);</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">,</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="s">"row-activated"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">row_activated_cb</span><span class="p">),</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">chooser</span><span class="p">);</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">);</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">);</span> +<a id="line-269" name="line-269"></a> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">buttons_box</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hbox</span><span class="p">;</span> +<a id="line-272" name="line-272"></a> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">refresh_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="n">gtk_button_set_image</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">refresh_button</span><span class="p">),</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"view-refresh"</span><span class="p">,</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">GTK_ICON_SIZE_BUTTON</span><span class="p">));</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">refresh_button</span><span class="p">,</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">refresh_button_clicked_cb</span><span class="p">),</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">chooser</span><span class="p">);</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">refresh_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">refresh_button</span><span class="p">);</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">gtk_widget_set_tooltip_text</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">refresh_button</span><span class="p">,</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Reload the list of available sources"</span><span class="p">));</span> +<a id="line-284" name="line-284"></a> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">);</span> +<a id="line-287" name="line-287"></a> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-289" name="line-289"></a><span class="p">}</span> +<a id="line-290" name="line-290"></a> +<a id="line-291" name="line-291"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-292" name="line-292"></a><span class="n">gdict_source_chooser_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooserClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-293" name="line-293"></a><span class="p">{</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">gobject_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-295" name="line-295"></a> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_chooser_finalize</span><span class="p">;</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">dispose</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_chooser_dispose</span><span class="p">;</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">set_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_chooser_set_property</span><span class="p">;</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">get_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_chooser_get_property</span><span class="p">;</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">constructor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_chooser_constructor</span><span class="p">;</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-303" name="line-303"></a><span class="cm"> * GdictSourceChooser:loader:</span> +<a id="line-304" name="line-304"></a><span class="cm"> *</span> +<a id="line-305" name="line-305"></a><span class="cm"> * The #GdictSourceLoader used to retrieve the list of available</span> +<a id="line-306" name="line-306"></a><span class="cm"> * dictionary sources.</span> +<a id="line-307" name="line-307"></a><span class="cm"> *</span> +<a id="line-308" name="line-308"></a><span class="cm"> * Since: 0.12</span> +<a id="line-309" name="line-309"></a><span class="cm"> */</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">PROP_LOADER</span><span class="p">,</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">g_param_spec_object</span><span class="w"> </span><span class="p">(</span><span class="s">"loader"</span><span class="p">,</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="s">"Loader"</span><span class="p">,</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="s">"The GdictSourceLoader used to get the list of sources"</span><span class="p">,</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">GDICT_TYPE_SOURCE_LOADER</span><span class="p">,</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_CONSTRUCT</span><span class="p">));</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-318" name="line-318"></a><span class="cm"> * GdictSourceChooser:count:</span> +<a id="line-319" name="line-319"></a><span class="cm"> *</span> +<a id="line-320" name="line-320"></a><span class="cm"> * The number of available dictionary sources, or -1 if no</span> +<a id="line-321" name="line-321"></a><span class="cm"> * #GdictSourceLoader is set.</span> +<a id="line-322" name="line-322"></a><span class="cm"> *</span> +<a id="line-323" name="line-323"></a><span class="cm"> * Since: 0.12</span> +<a id="line-324" name="line-324"></a><span class="cm"> */</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">PROP_COUNT</span><span class="p">,</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">g_param_spec_int</span><span class="w"> </span><span class="p">(</span><span class="s">"count"</span><span class="p">,</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="s">"Count"</span><span class="p">,</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="s">"The number of available dictionary sources"</span><span class="p">,</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">G_MAXINT</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">G_PARAM_READABLE</span><span class="p">));</span> +<a id="line-332" name="line-332"></a> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-334" name="line-334"></a><span class="cm"> * GdictSourceChooser::source-activated:</span> +<a id="line-335" name="line-335"></a><span class="cm"> * @chooser: the #GdictSourceChooser that received the signal</span> +<a id="line-336" name="line-336"></a><span class="cm"> * @source_name: the name of the activated source</span> +<a id="line-337" name="line-337"></a><span class="cm"> * @source: the activated #GdictSource</span> +<a id="line-338" name="line-338"></a><span class="cm"> *</span> +<a id="line-339" name="line-339"></a><span class="cm"> * The ::source-activated signal is emitted each time the user</span> +<a id="line-340" name="line-340"></a><span class="cm"> * activates a row in the source chooser widget, either by double</span> +<a id="line-341" name="line-341"></a><span class="cm"> * clicking on it or by a keyboard event.</span> +<a id="line-342" name="line-342"></a><span class="cm"> *</span> +<a id="line-343" name="line-343"></a><span class="cm"> * Since: 0.12</span> +<a id="line-344" name="line-344"></a><span class="cm"> */</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">source_chooser_signals</span><span class="p">[</span><span class="n">SOURCE_ACTIVATED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"source-activated"</span><span class="p">,</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooserClass</span><span class="p">,</span><span class="w"> </span><span class="n">source_activated</span><span class="p">),</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">gdict_marshal_VOID__STRING_OBJECT</span><span class="p">,</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">GDICT_TYPE_SOURCE</span><span class="p">);</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-356" name="line-356"></a><span class="cm"> * GdictSourceChooser::selection-changed:</span> +<a id="line-357" name="line-357"></a><span class="cm"> * @chooser: the #GdictSourceChooser that received the signal</span> +<a id="line-358" name="line-358"></a><span class="cm"> *</span> +<a id="line-359" name="line-359"></a><span class="cm"> * The ::selection-changed signal is emitted each time the</span> +<a id="line-360" name="line-360"></a><span class="cm"> * selection inside the source chooser widget has been changed.</span> +<a id="line-361" name="line-361"></a><span class="cm"> *</span> +<a id="line-362" name="line-362"></a><span class="cm"> * Since: 0.12</span> +<a id="line-363" name="line-363"></a><span class="cm"> */</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">source_chooser_signals</span><span class="p">[</span><span class="n">SELECTION_CHANGED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"selection-changed"</span><span class="p">,</span> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooserClass</span><span class="p">,</span><span class="w"> </span><span class="n">selection_changed</span><span class="p">),</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">gdict_marshal_VOID__VOID</span><span class="p">,</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-372" name="line-372"></a><span class="p">}</span> +<a id="line-373" name="line-373"></a> +<a id="line-374" name="line-374"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-375" name="line-375"></a><span class="n">gdict_source_chooser_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">)</span> +<a id="line-376" name="line-376"></a><span class="p">{</span> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-378" name="line-378"></a> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_chooser_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">);</span> +<a id="line-380" name="line-380"></a> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">gtk_orientable_set_orientation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTABLE</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">);</span> +<a id="line-382" name="line-382"></a> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_list_store_new</span><span class="w"> </span><span class="p">(</span><span class="n">SOURCE_N_COLUMNS</span><span class="p">,</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">G_TYPE_INT</span><span class="p">,</span><span class="w"> </span><span class="cm">/* TRANSPORT */</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span><span class="w"> </span><span class="cm">/* NAME */</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span><span class="w"> </span><span class="cm">/* DESCRIPTION */</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="n">G_TYPE_INT</span><span class="w"> </span><span class="cm">/* CURRENT */</span><span class="p">);</span> +<a id="line-388" name="line-388"></a> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">n_sources</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-391" name="line-391"></a><span class="p">}</span> +<a id="line-392" name="line-392"></a> +<a id="line-393" name="line-393"></a><span class="cm">/**</span> +<a id="line-394" name="line-394"></a><span class="cm"> * gdict_source_chooser_new:</span> +<a id="line-395" name="line-395"></a><span class="cm"> *</span> +<a id="line-396" name="line-396"></a><span class="cm"> * Creates a new #GdictSourceChooser widget. This widget can be used to</span> +<a id="line-397" name="line-397"></a><span class="cm"> * display the list of available dictionary sources.</span> +<a id="line-398" name="line-398"></a><span class="cm"> *</span> +<a id="line-399" name="line-399"></a><span class="cm"> * Return value: the newly created #GdictSourceChooser widget.</span> +<a id="line-400" name="line-400"></a><span class="cm"> *</span> +<a id="line-401" name="line-401"></a><span class="cm"> * Since: 0.12</span> +<a id="line-402" name="line-402"></a><span class="cm"> */</span> +<a id="line-403" name="line-403"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-404" name="line-404"></a><span class="n">gdict_source_chooser_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-405" name="line-405"></a><span class="p">{</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_SOURCE_CHOOSER</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-407" name="line-407"></a><span class="p">}</span> +<a id="line-408" name="line-408"></a> +<a id="line-409" name="line-409"></a><span class="cm">/**</span> +<a id="line-410" name="line-410"></a><span class="cm"> * gdict_source_chooser_new_with_loader:</span> +<a id="line-411" name="line-411"></a><span class="cm"> * @loader: a #GdictSourceLoader</span> +<a id="line-412" name="line-412"></a><span class="cm"> *</span> +<a id="line-413" name="line-413"></a><span class="cm"> * Creates a new #GdictSourceChooser widget and sets @loader as the</span> +<a id="line-414" name="line-414"></a><span class="cm"> * #GdictSourceLoader object to be used to retrieve the list of</span> +<a id="line-415" name="line-415"></a><span class="cm"> * available dictionary sources.</span> +<a id="line-416" name="line-416"></a><span class="cm"> *</span> +<a id="line-417" name="line-417"></a><span class="cm"> * Return value: the newly created #GdictSourceChooser widget.</span> +<a id="line-418" name="line-418"></a><span class="cm"> *</span> +<a id="line-419" name="line-419"></a><span class="cm"> * Since: 0.12</span> +<a id="line-420" name="line-420"></a><span class="cm"> */</span> +<a id="line-421" name="line-421"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-422" name="line-422"></a><span class="n">gdict_source_chooser_new_with_loader</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceLoader</span><span class="w"> </span><span class="o">*</span><span class="n">loader</span><span class="p">)</span> +<a id="line-423" name="line-423"></a><span class="p">{</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_LOADER</span><span class="w"> </span><span class="p">(</span><span class="n">loader</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-425" name="line-425"></a> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_SOURCE_CHOOSER</span><span class="p">,</span><span class="w"> </span><span class="s">"loader"</span><span class="p">,</span><span class="w"> </span><span class="n">loader</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-427" name="line-427"></a><span class="p">}</span> +<a id="line-428" name="line-428"></a> +<a id="line-429" name="line-429"></a><span class="cm">/**</span> +<a id="line-430" name="line-430"></a><span class="cm"> * gdict_source_chooser_set_loader:</span> +<a id="line-431" name="line-431"></a><span class="cm"> * @chooser: a #GdictSourceChooser</span> +<a id="line-432" name="line-432"></a><span class="cm"> * @loader: a #GdictSourceLoader or %NULL to unset it</span> +<a id="line-433" name="line-433"></a><span class="cm"> *</span> +<a id="line-434" name="line-434"></a><span class="cm"> * Sets the #GdictSourceLoader to be used by the source chooser</span> +<a id="line-435" name="line-435"></a><span class="cm"> * widget.</span> +<a id="line-436" name="line-436"></a><span class="cm"> *</span> +<a id="line-437" name="line-437"></a><span class="cm"> * Since: 0.12</span> +<a id="line-438" name="line-438"></a><span class="cm"> */</span> +<a id="line-439" name="line-439"></a><span class="kt">void</span> +<a id="line-440" name="line-440"></a><span class="n">gdict_source_chooser_set_loader</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">GdictSourceLoader</span><span class="w"> </span><span class="o">*</span><span class="n">loader</span><span class="p">)</span> +<a id="line-442" name="line-442"></a><span class="p">{</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-444" name="line-444"></a> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">));</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">loader</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">GDICT_IS_SOURCE_LOADER</span><span class="w"> </span><span class="p">(</span><span class="n">loader</span><span class="p">));</span> +<a id="line-447" name="line-447"></a> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-449" name="line-449"></a> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">loader</span><span class="p">)</span> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="p">{</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">)</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-454" name="line-454"></a> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">loader</span><span class="p">)</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="p">{</span> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">loader</span><span class="p">);</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">gdict_source_chooser_refresh</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">);</span> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="p">}</span> +<a id="line-460" name="line-460"></a> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="s">"loader"</span><span class="p">);</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="p">}</span> +<a id="line-463" name="line-463"></a><span class="p">}</span> +<a id="line-464" name="line-464"></a> +<a id="line-465" name="line-465"></a><span class="cm">/**</span> +<a id="line-466" name="line-466"></a><span class="cm"> * gdict_source_chooser_get_loader:</span> +<a id="line-467" name="line-467"></a><span class="cm"> * @chooser: a #GdictSourceChooser</span> +<a id="line-468" name="line-468"></a><span class="cm"> *</span> +<a id="line-469" name="line-469"></a><span class="cm"> * Retrieves the #GdictSourceLoader used by @chooser.</span> +<a id="line-470" name="line-470"></a><span class="cm"> *</span> +<a id="line-471" name="line-471"></a><span class="cm"> * Return value: a #GdictSourceLoader or %NULL is none is set</span> +<a id="line-472" name="line-472"></a><span class="cm"> *</span> +<a id="line-473" name="line-473"></a><span class="cm"> * Since: 0.12</span> +<a id="line-474" name="line-474"></a><span class="cm"> */</span> +<a id="line-475" name="line-475"></a><span class="n">GdictSourceLoader</span><span class="w"> </span><span class="o">*</span> +<a id="line-476" name="line-476"></a><span class="n">gdict_source_chooser_get_loader</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">)</span> +<a id="line-477" name="line-477"></a><span class="p">{</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-479" name="line-479"></a> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">;</span> +<a id="line-481" name="line-481"></a><span class="p">}</span> +<a id="line-482" name="line-482"></a> +<a id="line-483" name="line-483"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span> +<a id="line-484" name="line-484"></a><span class="p">{</span> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="p">;</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">;</span> +<a id="line-487" name="line-487"></a> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">do_select</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">do_activate</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-491" name="line-491"></a><span class="p">}</span><span class="w"> </span><span class="n">SelectData</span><span class="p">;</span> +<a id="line-492" name="line-492"></a> +<a id="line-493" name="line-493"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-494" name="line-494"></a><span class="nf">scan_for_source_name</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-498" name="line-498"></a><span class="p">{</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="n">SelectData</span><span class="w"> </span><span class="o">*</span><span class="n">select_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-501" name="line-501"></a> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">select_data</span><span class="p">)</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-504" name="line-504"></a> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">source_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">source_name</span><span class="p">)</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-508" name="line-508"></a> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="p">,</span><span class="w"> </span><span class="n">select_data</span><span class="o">-></span><span class="n">source_name</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="p">{</span> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="n">tree_view</span><span class="p">;</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-513" name="line-513"></a> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">select_data</span><span class="o">-></span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-515" name="line-515"></a> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="n">tree_view</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">select_data</span><span class="o">-></span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">);</span> +<a id="line-517" name="line-517"></a> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">select_data</span><span class="o">-></span><span class="n">do_activate</span><span class="p">)</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="p">{</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">column</span><span class="p">;</span> +<a id="line-521" name="line-521"></a> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_column</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-523" name="line-523"></a> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="n">SOURCE_CURRENT</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_WEIGHT_BOLD</span><span class="p">,</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-527" name="line-527"></a> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="n">gtk_tree_view_row_activated</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="p">}</span> +<a id="line-530" name="line-530"></a> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">);</span> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">select_data</span><span class="o">-></span><span class="n">do_select</span><span class="p">)</span> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="n">gtk_tree_selection_select_path</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="k">else</span> +<a id="line-535" name="line-535"></a><span class="w"> </span><span class="n">gtk_tree_selection_unselect_path</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="p">}</span> +<a id="line-537" name="line-537"></a><span class="w"> </span><span class="k">else</span> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="p">{</span> +<a id="line-539" name="line-539"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="n">SOURCE_CURRENT</span><span class="p">,</span><span class="w"> </span><span class="n">PANGO_WEIGHT_NORMAL</span><span class="p">,</span> +<a id="line-541" name="line-541"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="p">}</span> +<a id="line-543" name="line-543"></a> +<a id="line-544" name="line-544"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="p">);</span> +<a id="line-545" name="line-545"></a> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-547" name="line-547"></a><span class="p">}</span> +<a id="line-548" name="line-548"></a> +<a id="line-549" name="line-549"></a><span class="cm">/**</span> +<a id="line-550" name="line-550"></a><span class="cm"> * gdict_source_chooser_select_source:</span> +<a id="line-551" name="line-551"></a><span class="cm"> * @chooser: a #GdictSourceChooser</span> +<a id="line-552" name="line-552"></a><span class="cm"> * @source_name: the name of a dictionary source</span> +<a id="line-553" name="line-553"></a><span class="cm"> *</span> +<a id="line-554" name="line-554"></a><span class="cm"> * Selects the dictionary source named @source_name inside @chooser.</span> +<a id="line-555" name="line-555"></a><span class="cm"> * The selection is moved but the row containing the dictionary source</span> +<a id="line-556" name="line-556"></a><span class="cm"> * is not activated.</span> +<a id="line-557" name="line-557"></a><span class="cm"> *</span> +<a id="line-558" name="line-558"></a><span class="cm"> * Return value: %TRUE if the source was found and selected</span> +<a id="line-559" name="line-559"></a><span class="cm"> *</span> +<a id="line-560" name="line-560"></a><span class="cm"> * Since: 0.12</span> +<a id="line-561" name="line-561"></a><span class="cm"> */</span> +<a id="line-562" name="line-562"></a><span class="n">gboolean</span> +<a id="line-563" name="line-563"></a><span class="nf">gdict_source_chooser_select_source</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="p">)</span> +<a id="line-565" name="line-565"></a><span class="p">{</span> +<a id="line-566" name="line-566"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="n">SelectData</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-569" name="line-569"></a> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-571" name="line-571"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-572" name="line-572"></a> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-574" name="line-574"></a> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">source_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="p">);</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="p">;</span> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">do_select</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-579" name="line-579"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">do_activate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-580" name="line-580"></a> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="n">gtk_tree_model_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">),</span> +<a id="line-582" name="line-582"></a><span class="w"> </span><span class="n">scan_for_source_name</span><span class="p">,</span> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="o">&</span><span class="n">data</span><span class="p">);</span> +<a id="line-584" name="line-584"></a> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">found</span><span class="p">;</span> +<a id="line-586" name="line-586"></a> +<a id="line-587" name="line-587"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">source_name</span><span class="p">);</span> +<a id="line-588" name="line-588"></a> +<a id="line-589" name="line-589"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-590" name="line-590"></a><span class="p">}</span> +<a id="line-591" name="line-591"></a> +<a id="line-592" name="line-592"></a><span class="cm">/**</span> +<a id="line-593" name="line-593"></a><span class="cm"> * gdict_source_chooser_unselect_source:</span> +<a id="line-594" name="line-594"></a><span class="cm"> * @chooser: a #GdictSourceChooser</span> +<a id="line-595" name="line-595"></a><span class="cm"> * @source_name: the name of a dictionary source</span> +<a id="line-596" name="line-596"></a><span class="cm"> *</span> +<a id="line-597" name="line-597"></a><span class="cm"> * Unselects @source_name inside @chooser.</span> +<a id="line-598" name="line-598"></a><span class="cm"> *</span> +<a id="line-599" name="line-599"></a><span class="cm"> * Return value: %TRUE if the source was found and unselected</span> +<a id="line-600" name="line-600"></a><span class="cm"> *</span> +<a id="line-601" name="line-601"></a><span class="cm"> * Since: 0.12</span> +<a id="line-602" name="line-602"></a><span class="cm"> */</span> +<a id="line-603" name="line-603"></a><span class="n">gboolean</span> +<a id="line-604" name="line-604"></a><span class="nf">gdict_source_chooser_unselect_source</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="p">)</span> +<a id="line-606" name="line-606"></a><span class="p">{</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="n">SelectData</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-610" name="line-610"></a> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-613" name="line-613"></a> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-615" name="line-615"></a> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">source_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="p">);</span> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="p">;</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">do_select</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">do_activate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-621" name="line-621"></a> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="n">gtk_tree_model_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">),</span> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="n">scan_for_source_name</span><span class="p">,</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="o">&</span><span class="n">data</span><span class="p">);</span> +<a id="line-625" name="line-625"></a> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">found</span><span class="p">;</span> +<a id="line-627" name="line-627"></a> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">source_name</span><span class="p">);</span> +<a id="line-629" name="line-629"></a> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-631" name="line-631"></a><span class="p">}</span> +<a id="line-632" name="line-632"></a> +<a id="line-633" name="line-633"></a><span class="cm">/**</span> +<a id="line-634" name="line-634"></a><span class="cm"> * gdict_source_chooser_set_current_source:</span> +<a id="line-635" name="line-635"></a><span class="cm"> * @chooser: a #GdictSourceChooser</span> +<a id="line-636" name="line-636"></a><span class="cm"> * @source_name: the name of a dictionary source</span> +<a id="line-637" name="line-637"></a><span class="cm"> *</span> +<a id="line-638" name="line-638"></a><span class="cm"> * Sets the current dictionary source named @source_name. The row</span> +<a id="line-639" name="line-639"></a><span class="cm"> * of the source, if found, will be selected and activated.</span> +<a id="line-640" name="line-640"></a><span class="cm"> *</span> +<a id="line-641" name="line-641"></a><span class="cm"> * Return value: %TRUE if the source was found</span> +<a id="line-642" name="line-642"></a><span class="cm"> *</span> +<a id="line-643" name="line-643"></a><span class="cm"> * Since: 0.12</span> +<a id="line-644" name="line-644"></a><span class="cm"> */</span> +<a id="line-645" name="line-645"></a><span class="n">gboolean</span> +<a id="line-646" name="line-646"></a><span class="nf">gdict_source_chooser_set_current_source</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="p">)</span> +<a id="line-648" name="line-648"></a><span class="p">{</span> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="n">SelectData</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-652" name="line-652"></a> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-655" name="line-655"></a> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-657" name="line-657"></a> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">current_source</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">current_source</span><span class="p">,</span><span class="w"> </span><span class="n">source_name</span><span class="p">))</span> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-660" name="line-660"></a> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">source_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="p">);</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="p">;</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">found</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">do_select</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">do_activate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-666" name="line-666"></a> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="n">gtk_tree_model_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">),</span> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="n">scan_for_source_name</span><span class="p">,</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="o">&</span><span class="n">data</span><span class="p">);</span> +<a id="line-670" name="line-670"></a> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">found</span><span class="p">;</span> +<a id="line-672" name="line-672"></a> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">CHOOSER</span><span class="p">,</span><span class="w"> </span><span class="s">"%s current source: %s"</span><span class="p">,</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">found</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"set"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"not set"</span><span class="p">,</span> +<a id="line-675" name="line-675"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">source_name</span><span class="p">);</span> +<a id="line-676" name="line-676"></a> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">found</span><span class="p">)</span> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="p">{</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">current_source</span><span class="p">);</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">current_source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">source_name</span><span class="p">;</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="p">}</span> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="k">else</span> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">source_name</span><span class="p">);</span> +<a id="line-684" name="line-684"></a> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-686" name="line-686"></a><span class="p">}</span> +<a id="line-687" name="line-687"></a> +<a id="line-688" name="line-688"></a><span class="cm">/**</span> +<a id="line-689" name="line-689"></a><span class="cm"> * gdict_source_chooser_get_current_source:</span> +<a id="line-690" name="line-690"></a><span class="cm"> * @chooser: a #GdictSourceChooser</span> +<a id="line-691" name="line-691"></a><span class="cm"> *</span> +<a id="line-692" name="line-692"></a><span class="cm"> * Retrieves the currently selected source.</span> +<a id="line-693" name="line-693"></a><span class="cm"> *</span> +<a id="line-694" name="line-694"></a><span class="cm"> * Return value: a newly allocated string containing the name of</span> +<a id="line-695" name="line-695"></a><span class="cm"> * the currently selected source. Use g_free() when done using it</span> +<a id="line-696" name="line-696"></a><span class="cm"> *</span> +<a id="line-697" name="line-697"></a><span class="cm"> * Since: 0.12</span> +<a id="line-698" name="line-698"></a><span class="cm"> */</span> +<a id="line-699" name="line-699"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-700" name="line-700"></a><span class="nf">gdict_source_chooser_get_current_source</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">)</span> +<a id="line-701" name="line-701"></a><span class="p">{</span> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-703" name="line-703"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-704" name="line-704"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-707" name="line-707"></a> +<a id="line-708" name="line-708"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-709" name="line-709"></a> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-711" name="line-711"></a> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">));</span> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_tree_selection_get_selected</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">))</span> +<a id="line-714" name="line-714"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-715" name="line-715"></a> +<a id="line-716" name="line-716"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">retval</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-717" name="line-717"></a> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">current_source</span><span class="p">);</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">current_source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">retval</span><span class="p">);</span> +<a id="line-720" name="line-720"></a> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-722" name="line-722"></a><span class="p">}</span> +<a id="line-723" name="line-723"></a> +<a id="line-724" name="line-724"></a><span class="cm">/**</span> +<a id="line-725" name="line-725"></a><span class="cm"> * gdict_source_chooser_get_sources:</span> +<a id="line-726" name="line-726"></a><span class="cm"> * @chooser: a #GdictSouceChooser</span> +<a id="line-727" name="line-727"></a><span class="cm"> * @length: return location for the length of the returned vector</span> +<a id="line-728" name="line-728"></a><span class="cm"> *</span> +<a id="line-729" name="line-729"></a><span class="cm"> * Retrieves the names of the available dictionary sources.</span> +<a id="line-730" name="line-730"></a><span class="cm"> *</span> +<a id="line-731" name="line-731"></a><span class="cm"> * Return value: a newly allocated, %NULL terminated string vector</span> +<a id="line-732" name="line-732"></a><span class="cm"> * containing the names of the available sources. Use g_strfreev()</span> +<a id="line-733" name="line-733"></a><span class="cm"> * when done using it.</span> +<a id="line-734" name="line-734"></a><span class="cm"> *</span> +<a id="line-735" name="line-735"></a><span class="cm"> * Since: 0.12</span> +<a id="line-736" name="line-736"></a><span class="cm"> */</span> +<a id="line-737" name="line-737"></a><span class="n">gchar</span><span class="w"> </span><span class="o">**</span> +<a id="line-738" name="line-738"></a><span class="nf">gdict_source_chooser_get_sources</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="o">*</span><span class="n">length</span><span class="p">)</span> +<a id="line-740" name="line-740"></a><span class="p">{</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">retval</span><span class="p">;</span> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">retval_len</span><span class="p">;</span> +<a id="line-744" name="line-744"></a> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-746" name="line-746"></a> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-748" name="line-748"></a> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">)</span> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-751" name="line-751"></a> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_loader_get_names</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">retval_len</span><span class="p">);</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">length</span><span class="p">)</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="o">*</span><span class="n">length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">retval_len</span><span class="p">;</span> +<a id="line-755" name="line-755"></a> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-757" name="line-757"></a><span class="p">}</span> +<a id="line-758" name="line-758"></a> +<a id="line-759" name="line-759"></a><span class="cm">/**</span> +<a id="line-760" name="line-760"></a><span class="cm"> * gdict_source_chooser_count_sources:</span> +<a id="line-761" name="line-761"></a><span class="cm"> * @chooser: a #GdictSourceChooser</span> +<a id="line-762" name="line-762"></a><span class="cm"> *</span> +<a id="line-763" name="line-763"></a><span class="cm"> * Retrieve the number of available dictionary sources.</span> +<a id="line-764" name="line-764"></a><span class="cm"> *</span> +<a id="line-765" name="line-765"></a><span class="cm"> * Return value: the number of available sources, or -1 if no</span> +<a id="line-766" name="line-766"></a><span class="cm"> * #GdictSourceLoader has been set</span> +<a id="line-767" name="line-767"></a><span class="cm"> *</span> +<a id="line-768" name="line-768"></a><span class="cm"> * Since: 0.12</span> +<a id="line-769" name="line-769"></a><span class="cm"> */</span> +<a id="line-770" name="line-770"></a><span class="n">gint</span> +<a id="line-771" name="line-771"></a><span class="nf">gdict_source_chooser_count_sources</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">)</span> +<a id="line-772" name="line-772"></a><span class="p">{</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-774" name="line-774"></a> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">n_sources</span><span class="p">;</span> +<a id="line-776" name="line-776"></a><span class="p">}</span> +<a id="line-777" name="line-777"></a> +<a id="line-778" name="line-778"></a><span class="cm">/**</span> +<a id="line-779" name="line-779"></a><span class="cm"> * gdict_source_chooser_has_source:</span> +<a id="line-780" name="line-780"></a><span class="cm"> * @chooser: a #GdictSourceChooser</span> +<a id="line-781" name="line-781"></a><span class="cm"> * @source_name: the name of a dictionary source</span> +<a id="line-782" name="line-782"></a><span class="cm"> *</span> +<a id="line-783" name="line-783"></a><span class="cm"> * Checks whether @chooser has a dictionary source named @source_name.</span> +<a id="line-784" name="line-784"></a><span class="cm"> *</span> +<a id="line-785" name="line-785"></a><span class="cm"> * Return value: %TRUE if the dictionary source was found</span> +<a id="line-786" name="line-786"></a><span class="cm"> *</span> +<a id="line-787" name="line-787"></a><span class="cm"> * Since: 0.12</span> +<a id="line-788" name="line-788"></a><span class="cm"> */</span> +<a id="line-789" name="line-789"></a><span class="n">gboolean</span> +<a id="line-790" name="line-790"></a><span class="nf">gdict_source_chooser_has_source</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-791" name="line-791"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="p">)</span> +<a id="line-792" name="line-792"></a><span class="p">{</span> +<a id="line-793" name="line-793"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-794" name="line-794"></a> +<a id="line-795" name="line-795"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-796" name="line-796"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-797" name="line-797"></a> +<a id="line-798" name="line-798"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-799" name="line-799"></a> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">)</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-802" name="line-802"></a> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">gdict_source_loader_has_source</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span><span class="w"> </span><span class="n">source_name</span><span class="p">);</span> +<a id="line-804" name="line-804"></a><span class="p">}</span> +<a id="line-805" name="line-805"></a> +<a id="line-806" name="line-806"></a><span class="cm">/**</span> +<a id="line-807" name="line-807"></a><span class="cm"> * gdict_source_chooser_refresh:</span> +<a id="line-808" name="line-808"></a><span class="cm"> * @chooser: a #GdictSourceChooser</span> +<a id="line-809" name="line-809"></a><span class="cm"> *</span> +<a id="line-810" name="line-810"></a><span class="cm"> * Forces a refresh on the contents of the source chooser widget</span> +<a id="line-811" name="line-811"></a><span class="cm"> *</span> +<a id="line-812" name="line-812"></a><span class="cm"> * Since: 0.12</span> +<a id="line-813" name="line-813"></a><span class="cm"> */</span> +<a id="line-814" name="line-814"></a><span class="kt">void</span> +<a id="line-815" name="line-815"></a><span class="nf">gdict_source_chooser_refresh</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">)</span> +<a id="line-816" name="line-816"></a><span class="p">{</span> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-818" name="line-818"></a> +<a id="line-819" name="line-819"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">));</span> +<a id="line-820" name="line-820"></a> +<a id="line-821" name="line-821"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-822" name="line-822"></a> +<a id="line-823" name="line-823"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">)</span> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="p">{</span> +<a id="line-825" name="line-825"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">sources</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-826" name="line-826"></a> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">)</span> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="n">gtk_tree_view_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-829" name="line-829"></a> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="n">gtk_list_store_clear</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">);</span> +<a id="line-831" name="line-831"></a> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="n">sources</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_loader_get_sources</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sources</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="p">{</span> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">description</span><span class="p">;</span> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="n">GdictSourceTransport</span><span class="w"> </span><span class="n">transport</span><span class="p">;</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">weight</span><span class="p">;</span> +<a id="line-839" name="line-839"></a> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="n">transport</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_transport</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_description</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="n">weight</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PANGO_WEIGHT_NORMAL</span><span class="p">;</span> +<a id="line-844" name="line-844"></a> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">current_source</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">current_source</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">))</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="n">weight</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PANGO_WEIGHT_BOLD</span><span class="p">;</span> +<a id="line-847" name="line-847"></a> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">gtk_list_store_insert_with_values</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="n">SOURCE_TRANSPORT</span><span class="p">,</span><span class="w"> </span><span class="n">transport</span><span class="p">,</span> +<a id="line-850" name="line-850"></a><span class="w"> </span><span class="n">SOURCE_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">,</span> +<a id="line-851" name="line-851"></a><span class="w"> </span><span class="n">SOURCE_DESCRIPTION</span><span class="p">,</span><span class="w"> </span><span class="n">description</span><span class="p">,</span> +<a id="line-852" name="line-852"></a><span class="w"> </span><span class="n">SOURCE_CURRENT</span><span class="p">,</span><span class="w"> </span><span class="n">weight</span><span class="p">,</span> +<a id="line-853" name="line-853"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-854" name="line-854"></a><span class="w"> </span><span class="p">}</span> +<a id="line-855" name="line-855"></a> +<a id="line-856" name="line-856"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">)</span> +<a id="line-857" name="line-857"></a><span class="w"> </span><span class="n">gtk_tree_view_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">),</span> +<a id="line-858" name="line-858"></a><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">));</span> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="p">}</span> +<a id="line-860" name="line-860"></a><span class="p">}</span> +<a id="line-861" name="line-861"></a> +<a id="line-862" name="line-862"></a><span class="cm">/**</span> +<a id="line-863" name="line-863"></a><span class="cm"> * gdict_source_chooser_add_button:</span> +<a id="line-864" name="line-864"></a><span class="cm"> * @chooser: a #GdictSourceChooser</span> +<a id="line-865" name="line-865"></a><span class="cm"> * @button_text: text of the button</span> +<a id="line-866" name="line-866"></a><span class="cm"> *</span> +<a id="line-867" name="line-867"></a><span class="cm"> * Adds a #GtkButton with @button_text to the button area on</span> +<a id="line-868" name="line-868"></a><span class="cm"> * the bottom of @chooser. The @button_text can also be a</span> +<a id="line-869" name="line-869"></a><span class="cm"> * stock ID.</span> +<a id="line-870" name="line-870"></a><span class="cm"> *</span> +<a id="line-871" name="line-871"></a><span class="cm"> * Return value: the newly packed button.</span> +<a id="line-872" name="line-872"></a><span class="cm"> *</span> +<a id="line-873" name="line-873"></a><span class="cm"> * Since: 0.12</span> +<a id="line-874" name="line-874"></a><span class="cm"> */</span> +<a id="line-875" name="line-875"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-876" name="line-876"></a><span class="nf">gdict_source_chooser_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">button_text</span><span class="p">)</span> +<a id="line-878" name="line-878"></a><span class="p">{</span> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="n">GdictSourceChooserPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-880" name="line-880"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">;</span> +<a id="line-881" name="line-881"></a> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">button_text</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-884" name="line-884"></a> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chooser</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-886" name="line-886"></a> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TYPE_BUTTON</span><span class="p">,</span> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="s">"label"</span><span class="p">,</span><span class="w"> </span><span class="n">button_text</span><span class="p">,</span> +<a id="line-889" name="line-889"></a><span class="w"> </span><span class="s">"use-stock"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-890" name="line-890"></a><span class="w"> </span><span class="s">"use-underline"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-891" name="line-891"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">));</span> +<a id="line-892" name="line-892"></a> +<a id="line-893" name="line-893"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-894" name="line-894"></a> +<a id="line-895" name="line-895"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">);</span> +<a id="line-896" name="line-896"></a> +<a id="line-897" name="line-897"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">buttons_box</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-898" name="line-898"></a> +<a id="line-899" name="line-899"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">button</span><span class="p">;</span> +<a id="line-900" name="line-900"></a><span class="p">}</span> +<a id="line-901" name="line-901"></a> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/3.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/3.html new file mode 100644 index 00000000..6bb3a0a4 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/3.html @@ -0,0 +1,1143 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: baobab/src/baobab-resources.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> baobab-resources.c</p> +<a href="3.html#line-9"> unusedStructMember 9</a><a href="3.html#line-9"> unusedStructMember 9</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-2" name="line-2"></a> +<a id="line-3" name="line-3"></a><span class="cp">#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))</span> +<a id="line-4" name="line-4"></a><span class="cp"># define SECTION __attribute__ ((section (".gresource.baobab"), aligned (8)))</span> +<a id="line-5" name="line-5"></a><span class="cp">#else</span> +<a id="line-6" name="line-6"></a><span class="cp"># define SECTION</span> +<a id="line-7" name="line-7"></a><span class="cp">#endif</span> +<a id="line-8" name="line-8"></a> +<a id="line-9" name="line-9"></a><span class="hll"><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">SECTION</span><span class="w"> </span><span class="k">union</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">guint8</span><span class="w"> </span><span class="n">data</span><span class="p">[</span><span class="mi">3969</span><span class="p">];</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">alignment</span><span class="p">;</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">ptr</span><span class="p">;}</span><span class="w"> </span><span class="n">baobab_resource_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">{</span><span class="error2"><--- union member 'Anonymous0::alignment' is never used.</span><span class="error2"><--- union member 'Anonymous0::ptr' is never used.</span> +</span><a id="line-10" name="line-10"></a><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-11" name="line-11"></a><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-12" name="line-12"></a><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-13" name="line-13"></a><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-14" name="line-14"></a><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-15" name="line-15"></a><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-16" name="line-16"></a><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-17" name="line-17"></a><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-18" name="line-18"></a><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-19" name="line-19"></a><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-20" name="line-20"></a><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-21" name="line-21"></a><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-22" name="line-22"></a><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span> +<a id="line-23" name="line-23"></a><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-24" name="line-24"></a><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span> +<a id="line-25" name="line-25"></a><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span> +<a id="line-26" name="line-26"></a><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span> +<a id="line-27" name="line-27"></a><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span> +<a id="line-28" name="line-28"></a><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span> +<a id="line-29" name="line-29"></a><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span> +<a id="line-30" name="line-30"></a><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span> +<a id="line-31" name="line-31"></a><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span> +<a id="line-32" name="line-32"></a><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span> +<a id="line-33" name="line-33"></a><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span> +<a id="line-34" name="line-34"></a><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span> +<a id="line-35" name="line-35"></a><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span> +<a id="line-38" name="line-38"></a><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span> +<a id="line-39" name="line-39"></a><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span> +<a id="line-40" name="line-40"></a><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span> +<a id="line-41" name="line-41"></a><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span> +<a id="line-42" name="line-42"></a><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span> +<a id="line-43" name="line-43"></a><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span> +<a id="line-258" name="line-258"></a><span class="p">}</span><span class="w"> </span><span class="p">};</span> +<a id="line-259" name="line-259"></a> +<a id="line-260" name="line-260"></a><span class="k">static</span><span class="w"> </span><span class="n">GStaticResource</span><span class="w"> </span><span class="n">static_resource</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">baobab_resource_data</span><span class="p">.</span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_resource_data</span><span class="p">.</span><span class="n">data</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="cm">/* nul terminator */</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">};</span> +<a id="line-261" name="line-261"></a> +<a id="line-262" name="line-262"></a><span class="n">G_MODULE_EXPORT</span> +<a id="line-263" name="line-263"></a><span class="n">GResource</span><span class="w"> </span><span class="o">*</span><span class="n">baobab_get_resource</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> +<a id="line-264" name="line-264"></a><span class="n">GResource</span><span class="w"> </span><span class="o">*</span><span class="nf">baobab_get_resource</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-265" name="line-265"></a><span class="p">{</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_static_resource_get_resource</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">static_resource</span><span class="p">);</span> +<a id="line-267" name="line-267"></a><span class="p">}</span> +<a id="line-268" name="line-268"></a><span class="cm">/* GLIB - Library of useful routines for C programming</span> +<a id="line-269" name="line-269"></a><span class="cm"> * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald</span> +<a id="line-270" name="line-270"></a><span class="cm"> *</span> +<a id="line-271" name="line-271"></a><span class="cm"> * SPDX-License-Identifier: LGPL-2.1-or-later</span> +<a id="line-272" name="line-272"></a><span class="cm"> *</span> +<a id="line-273" name="line-273"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span> +<a id="line-274" name="line-274"></a><span class="cm"> * modify it under the terms of the GNU Lesser General Public</span> +<a id="line-275" name="line-275"></a><span class="cm"> * License as published by the Free Software Foundation; either</span> +<a id="line-276" name="line-276"></a><span class="cm"> * version 2.1 of the License, or (at your option) any later version.</span> +<a id="line-277" name="line-277"></a><span class="cm"> *</span> +<a id="line-278" name="line-278"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span> +<a id="line-279" name="line-279"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-280" name="line-280"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> +<a id="line-281" name="line-281"></a><span class="cm"> * Lesser General Public License for more details.</span> +<a id="line-282" name="line-282"></a><span class="cm"> *</span> +<a id="line-283" name="line-283"></a><span class="cm"> * You should have received a copy of the GNU Lesser General Public</span> +<a id="line-284" name="line-284"></a><span class="cm"> * License along with this library; if not, see <http://www.gnu.org/licenses/>.</span> +<a id="line-285" name="line-285"></a><span class="cm"> */</span> +<a id="line-286" name="line-286"></a> +<a id="line-287" name="line-287"></a><span class="cm">/*</span> +<a id="line-288" name="line-288"></a><span class="cm"> * Modified by the GLib Team and others 1997-2000. See the AUTHORS</span> +<a id="line-289" name="line-289"></a><span class="cm"> * file for a list of people on the GLib Team. See the ChangeLog</span> +<a id="line-290" name="line-290"></a><span class="cm"> * files for a list of changes. These files are distributed with</span> +<a id="line-291" name="line-291"></a><span class="cm"> * GLib at ftp://ftp.gtk.org/pub/gtk/.</span> +<a id="line-292" name="line-292"></a><span class="cm"> */</span> +<a id="line-293" name="line-293"></a> +<a id="line-294" name="line-294"></a><span class="cp">#ifndef __G_CONSTRUCTOR_H__</span> +<a id="line-295" name="line-295"></a><span class="cp">#define __G_CONSTRUCTOR_H__</span> +<a id="line-296" name="line-296"></a> +<a id="line-297" name="line-297"></a><span class="cm">/*</span> +<a id="line-298" name="line-298"></a><span class="cm"> If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and</span> +<a id="line-299" name="line-299"></a><span class="cm"> destructors, in a usable way, including e.g. on library unload. If not you're on</span> +<a id="line-300" name="line-300"></a><span class="cm"> your own.</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="cm"> Some compilers need #pragma to handle this, which does not work with macros,</span> +<a id="line-303" name="line-303"></a><span class="cm"> so the way you need to use this is (for constructors):</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="cm"> #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA</span> +<a id="line-306" name="line-306"></a><span class="cm"> #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)</span> +<a id="line-307" name="line-307"></a><span class="cm"> #endif</span> +<a id="line-308" name="line-308"></a><span class="cm"> G_DEFINE_CONSTRUCTOR(my_constructor)</span> +<a id="line-309" name="line-309"></a><span class="cm"> static void my_constructor(void) {</span> +<a id="line-310" name="line-310"></a><span class="cm"> ...</span> +<a id="line-311" name="line-311"></a><span class="cm"> }</span> +<a id="line-312" name="line-312"></a> +<a id="line-313" name="line-313"></a><span class="cm">*/</span> +<a id="line-314" name="line-314"></a> +<a id="line-315" name="line-315"></a><span class="cp">#ifndef __GTK_DOC_IGNORE__</span> +<a id="line-316" name="line-316"></a> +<a id="line-317" name="line-317"></a><span class="cp">#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)</span> +<a id="line-318" name="line-318"></a> +<a id="line-319" name="line-319"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-320" name="line-320"></a> +<a id="line-321" name="line-321"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);</span> +<a id="line-322" name="line-322"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);</span> +<a id="line-323" name="line-323"></a> +<a id="line-324" name="line-324"></a><span class="cp">#elif defined (_MSC_VER) && (_MSC_VER >= 1500)</span> +<a id="line-325" name="line-325"></a><span class="cm">/* Visual studio 2008 and later has _Pragma */</span> +<a id="line-326" name="line-326"></a> +<a id="line-327" name="line-327"></a><span class="cm">/*</span> +<a id="line-328" name="line-328"></a><span class="cm"> * Only try to include gslist.h if not already included via glib.h,</span> +<a id="line-329" name="line-329"></a><span class="cm"> * so that items using gconstructor.h outside of GLib (such as</span> +<a id="line-330" name="line-330"></a><span class="cm"> * GResources) continue to build properly.</span> +<a id="line-331" name="line-331"></a><span class="cm"> */</span> +<a id="line-332" name="line-332"></a><span class="cp">#ifndef __G_LIB_H__</span> +<a id="line-333" name="line-333"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gslist.h"</span> +<a id="line-334" name="line-334"></a><span class="cp">#endif</span> +<a id="line-335" name="line-335"></a> +<a id="line-336" name="line-336"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-337" name="line-337"></a> +<a id="line-338" name="line-338"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-339" name="line-339"></a> +<a id="line-340" name="line-340"></a><span class="cm">/* We do some weird things to avoid the constructors being optimized</span> +<a id="line-341" name="line-341"></a><span class="cm"> * away on VS2015 if WholeProgramOptimization is enabled. First we</span> +<a id="line-342" name="line-342"></a><span class="cm"> * make a reference to the array from the wrapper to make sure its</span> +<a id="line-343" name="line-343"></a><span class="cm"> * references. Then we use a pragma to make sure the wrapper function</span> +<a id="line-344" name="line-344"></a><span class="cm"> * symbol is always included at the link stage. Also, the symbols</span> +<a id="line-345" name="line-345"></a><span class="cm"> * need to be extern (but not dllexport), even though they are not</span> +<a id="line-346" name="line-346"></a><span class="cm"> * really used from another object file.</span> +<a id="line-347" name="line-347"></a><span class="cm"> */</span> +<a id="line-348" name="line-348"></a> +<a id="line-349" name="line-349"></a><span class="cm">/* We need to account for differences between the mangling of symbols</span> +<a id="line-350" name="line-350"></a><span class="cm"> * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed</span> +<a id="line-351" name="line-351"></a><span class="cm"> * with an underscore but symbols on x64/ARM/ARM64 are not.</span> +<a id="line-352" name="line-352"></a><span class="cm"> */</span> +<a id="line-353" name="line-353"></a><span class="cp">#ifdef _M_IX86</span> +<a id="line-354" name="line-354"></a><span class="cp">#define G_MSVC_SYMBOL_PREFIX "_"</span> +<a id="line-355" name="line-355"></a><span class="cp">#else</span> +<a id="line-356" name="line-356"></a><span class="cp">#define G_MSVC_SYMBOL_PREFIX ""</span> +<a id="line-357" name="line-357"></a><span class="cp">#endif</span> +<a id="line-358" name="line-358"></a> +<a id="line-359" name="line-359"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)</span> +<a id="line-360" name="line-360"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX)</span> +<a id="line-361" name="line-361"></a> +<a id="line-362" name="line-362"></a><span class="cp">#define G_MSVC_CTOR(_func,_sym_prefix) \</span> +<a id="line-363" name="line-363"></a><span class="cp"> static void _func(void); \</span> +<a id="line-364" name="line-364"></a><span class="cp"> extern int (* _array ## _func)(void); \</span> +<a id="line-365" name="line-365"></a><span class="cp"> int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \</span> +<a id="line-366" name="line-366"></a><span class="cp"> __pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \</span> +<a id="line-367" name="line-367"></a><span class="cp"> __pragma(section(".CRT$XCU",read)) \</span> +<a id="line-368" name="line-368"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _wrapper;</span> +<a id="line-369" name="line-369"></a> +<a id="line-370" name="line-370"></a><span class="cp">#define G_MSVC_DTOR(_func,_sym_prefix) \</span> +<a id="line-371" name="line-371"></a><span class="cp"> static void _func(void); \</span> +<a id="line-372" name="line-372"></a><span class="cp"> extern int (* _array ## _func)(void); \</span> +<a id="line-373" name="line-373"></a><span class="cp"> int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \</span> +<a id="line-374" name="line-374"></a><span class="cp"> __pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \</span> +<a id="line-375" name="line-375"></a><span class="cp"> __pragma(section(".CRT$XCU",read)) \</span> +<a id="line-376" name="line-376"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _constructor;</span> +<a id="line-377" name="line-377"></a> +<a id="line-378" name="line-378"></a><span class="cp">#elif defined (_MSC_VER)</span> +<a id="line-379" name="line-379"></a> +<a id="line-380" name="line-380"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-381" name="line-381"></a> +<a id="line-382" name="line-382"></a><span class="cm">/* Pre Visual studio 2008 must use #pragma section */</span> +<a id="line-383" name="line-383"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-384" name="line-384"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-385" name="line-385"></a> +<a id="line-386" name="line-386"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-387" name="line-387"></a><span class="cp"> section(".CRT$XCU",read)</span> +<a id="line-388" name="line-388"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) \</span> +<a id="line-389" name="line-389"></a><span class="cp"> static void _func(void); \</span> +<a id="line-390" name="line-390"></a><span class="cp"> static int _func ## _wrapper(void) { _func(); return 0; } \</span> +<a id="line-391" name="line-391"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper;</span> +<a id="line-392" name="line-392"></a> +<a id="line-393" name="line-393"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-394" name="line-394"></a><span class="cp"> section(".CRT$XCU",read)</span> +<a id="line-395" name="line-395"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) \</span> +<a id="line-396" name="line-396"></a><span class="cp"> static void _func(void); \</span> +<a id="line-397" name="line-397"></a><span class="cp"> static int _func ## _constructor(void) { atexit (_func); return 0; } \</span> +<a id="line-398" name="line-398"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;</span> +<a id="line-399" name="line-399"></a> +<a id="line-400" name="line-400"></a><span class="cp">#elif defined(__SUNPRO_C)</span> +<a id="line-401" name="line-401"></a> +<a id="line-402" name="line-402"></a><span class="cm">/* This is not tested, but i believe it should work, based on:</span> +<a id="line-403" name="line-403"></a><span class="cm"> * http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c</span> +<a id="line-404" name="line-404"></a><span class="cm"> */</span> +<a id="line-405" name="line-405"></a> +<a id="line-406" name="line-406"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-407" name="line-407"></a> +<a id="line-408" name="line-408"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-409" name="line-409"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-410" name="line-410"></a> +<a id="line-411" name="line-411"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-412" name="line-412"></a><span class="cp"> init(_func)</span> +<a id="line-413" name="line-413"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) \</span> +<a id="line-414" name="line-414"></a><span class="cp"> static void _func(void);</span> +<a id="line-415" name="line-415"></a> +<a id="line-416" name="line-416"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-417" name="line-417"></a><span class="cp"> fini(_func)</span> +<a id="line-418" name="line-418"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) \</span> +<a id="line-419" name="line-419"></a><span class="cp"> static void _func(void);</span> +<a id="line-420" name="line-420"></a> +<a id="line-421" name="line-421"></a><span class="cp">#else</span> +<a id="line-422" name="line-422"></a> +<a id="line-423" name="line-423"></a><span class="cm">/* constructors not supported for this compiler */</span> +<a id="line-424" name="line-424"></a> +<a id="line-425" name="line-425"></a><span class="cp">#endif</span> +<a id="line-426" name="line-426"></a> +<a id="line-427" name="line-427"></a><span class="cp">#endif </span><span class="cm">/* __GTK_DOC_IGNORE__ */</span> +<a id="line-428" name="line-428"></a><span class="cp">#endif </span><span class="cm">/* __G_CONSTRUCTOR_H__ */</span> +<a id="line-429" name="line-429"></a> +<a id="line-430" name="line-430"></a><span class="cp">#ifdef G_HAS_CONSTRUCTORS</span> +<a id="line-431" name="line-431"></a> +<a id="line-432" name="line-432"></a><span class="cp">#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA</span> +<a id="line-433" name="line-433"></a><span class="cp">#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(baobabresource_constructor)</span> +<a id="line-434" name="line-434"></a><span class="cp">#endif</span> +<a id="line-435" name="line-435"></a><span class="n">G_DEFINE_CONSTRUCTOR</span><span class="p">(</span><span class="n">baobabresource_constructor</span><span class="p">)</span> +<a id="line-436" name="line-436"></a><span class="cp">#ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA</span> +<a id="line-437" name="line-437"></a><span class="cp">#pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(baobabresource_destructor)</span> +<a id="line-438" name="line-438"></a><span class="cp">#endif</span> +<a id="line-439" name="line-439"></a><span class="n">G_DEFINE_DESTRUCTOR</span><span class="p">(</span><span class="n">baobabresource_destructor</span><span class="p">)</span> +<a id="line-440" name="line-440"></a> +<a id="line-441" name="line-441"></a><span class="cp">#else</span> +<a id="line-442" name="line-442"></a><span class="cp">#warning "Constructor not supported on this compiler, linking in resources will not work"</span> +<a id="line-443" name="line-443"></a><span class="cp">#endif</span> +<a id="line-444" name="line-444"></a> +<a id="line-445" name="line-445"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">baobabresource_constructor</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-446" name="line-446"></a><span class="p">{</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">g_static_resource_init</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">static_resource</span><span class="p">);</span> +<a id="line-448" name="line-448"></a><span class="p">}</span> +<a id="line-449" name="line-449"></a> +<a id="line-450" name="line-450"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">baobabresource_destructor</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-451" name="line-451"></a><span class="p">{</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">g_static_resource_fini</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">static_resource</span><span class="p">);</span> +<a id="line-453" name="line-453"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/30.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/30.html new file mode 100644 index 00000000..f453d93b --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/30.html @@ -0,0 +1,2609 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-dictionary/libgdict/gdict-source.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gdict-source.c</p> +<a href="30.html#line-411"> duplicateConditionalAssign 411</a><a href="30.html#line-412"> duplicateConditionalAssign 412</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2005 Emmanuele Bassi <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cm">/**</span> +<a id="line-21" name="line-21"></a><span class="cm"> * SECTION:gdict-source</span> +<a id="line-22" name="line-22"></a><span class="cm"> * @short_description: A dictionary source definition</span> +<a id="line-23" name="line-23"></a><span class="cm"> *</span> +<a id="line-24" name="line-24"></a><span class="cm"> * #GdictSource is the representation of a #GdictContext. Each dictionary</span> +<a id="line-25" name="line-25"></a><span class="cm"> * source provides a list of available dictionaries (databases) and a list</span> +<a id="line-26" name="line-26"></a><span class="cm"> * of available matching strategies. Using a #GdictContext you can query</span> +<a id="line-27" name="line-27"></a><span class="cm"> * the dictionary source for matching words and for definitions.</span> +<a id="line-28" name="line-28"></a><span class="cm"> *</span> +<a id="line-29" name="line-29"></a><span class="cm"> * By using a #GdictSource object you can retrieve the appropriate</span> +<a id="line-30" name="line-30"></a><span class="cm"> * #GdictContext, already set up with the right parameters.</span> +<a id="line-31" name="line-31"></a><span class="cm"> */</span> +<a id="line-32" name="line-32"></a> +<a id="line-33" name="line-33"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-35" name="line-35"></a><span class="cp">#endif</span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n-lib.h></span> +<a id="line-42" name="line-42"></a> +<a id="line-43" name="line-43"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-source.h"</span> +<a id="line-44" name="line-44"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-client-context.h"</span> +<a id="line-45" name="line-45"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-utils.h"</span> +<a id="line-46" name="line-46"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-enum-types.h"</span> +<a id="line-47" name="line-47"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-private.h"</span> +<a id="line-48" name="line-48"></a> +<a id="line-49" name="line-49"></a><span class="cm">/* Main group */</span> +<a id="line-50" name="line-50"></a><span class="cp">#define SOURCE_GROUP "Dictionary Source"</span> +<a id="line-51" name="line-51"></a> +<a id="line-52" name="line-52"></a><span class="cm">/* Common keys */</span> +<a id="line-53" name="line-53"></a><span class="cp">#define SOURCE_KEY_NAME "Name"</span> +<a id="line-54" name="line-54"></a><span class="cp">#define SOURCE_KEY_DESCRIPTION "Description"</span> +<a id="line-55" name="line-55"></a><span class="cp">#define SOURCE_KEY_TRANSPORT "Transport"</span> +<a id="line-56" name="line-56"></a><span class="cp">#define SOURCE_KEY_DATABASE "Database"</span> +<a id="line-57" name="line-57"></a><span class="cp">#define SOURCE_KEY_STRATEGY "Strategy"</span> +<a id="line-58" name="line-58"></a> +<a id="line-59" name="line-59"></a><span class="cm">/* dictd transport keys */</span> +<a id="line-60" name="line-60"></a><span class="cp">#define SOURCE_KEY_HOSTNAME "Hostname"</span> +<a id="line-61" name="line-61"></a><span class="cp">#define SOURCE_KEY_PORT "Port"</span> +<a id="line-62" name="line-62"></a> +<a id="line-63" name="line-63"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_GdictSourcePrivate</span> +<a id="line-64" name="line-64"></a><span class="p">{</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">filename</span><span class="p">;</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">keyfile</span><span class="p">;</span> +<a id="line-67" name="line-67"></a> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">description</span><span class="p">;</span> +<a id="line-70" name="line-70"></a> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">;</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">strategy</span><span class="p">;</span> +<a id="line-73" name="line-73"></a> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">GdictSourceTransport</span><span class="w"> </span><span class="n">transport</span><span class="p">;</span> +<a id="line-75" name="line-75"></a> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-77" name="line-77"></a><span class="p">};</span> +<a id="line-78" name="line-78"></a> +<a id="line-79" name="line-79"></a><span class="k">enum</span> +<a id="line-80" name="line-80"></a><span class="p">{</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="n">PROP_0</span><span class="p">,</span> +<a id="line-82" name="line-82"></a> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">PROP_FILENAME</span><span class="p">,</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">PROP_NAME</span><span class="p">,</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">PROP_DESCRIPTION</span><span class="p">,</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">PROP_DATABASE</span><span class="p">,</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">PROP_STRATEGY</span><span class="p">,</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">PROP_TRANSPORT</span><span class="p">,</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">PROP_CONTEXT</span> +<a id="line-90" name="line-90"></a><span class="p">};</span> +<a id="line-91" name="line-91"></a> +<a id="line-92" name="line-92"></a><span class="cm">/* keep in sync with GdictSourceTransport */</span> +<a id="line-93" name="line-93"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">valid_transports</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span> +<a id="line-94" name="line-94"></a><span class="p">{</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="s">"dictd"</span><span class="p">,</span><span class="w"> </span><span class="cm">/* GDICT_SOURCE_TRANSPORT_DICTD */</span> +<a id="line-96" name="line-96"></a> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="cm">/* GDICT_SOURCE_TRANSPORT_INVALID */</span> +<a id="line-98" name="line-98"></a><span class="p">};</span> +<a id="line-99" name="line-99"></a> +<a id="line-100" name="line-100"></a><span class="cp">#define IS_VALID_TRANSPORT(t) (((t) >= GDICT_SOURCE_TRANSPORT_DICTD) && \</span> +<a id="line-101" name="line-101"></a><span class="cp"> ((t) < GDICT_SOURCE_TRANSPORT_INVALID))</span> +<a id="line-102" name="line-102"></a> +<a id="line-103" name="line-103"></a><span class="n">GQuark</span> +<a id="line-104" name="line-104"></a><span class="nf">gdict_source_error_quark</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-105" name="line-105"></a><span class="p">{</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GQuark</span><span class="w"> </span><span class="n">quark</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-107" name="line-107"></a> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">G_UNLIKELY</span><span class="w"> </span><span class="p">(</span><span class="n">quark</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">quark</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_quark_from_static_string</span><span class="w"> </span><span class="p">(</span><span class="s">"gdict-source-error-quark"</span><span class="p">);</span> +<a id="line-110" name="line-110"></a> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">quark</span><span class="p">;</span> +<a id="line-112" name="line-112"></a><span class="p">}</span> +<a id="line-113" name="line-113"></a> +<a id="line-114" name="line-114"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_source</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_OBJECT</span><span class="p">);</span> +<a id="line-115" name="line-115"></a> +<a id="line-116" name="line-116"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-117" name="line-117"></a><span class="nf">gdict_source_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-121" name="line-121"></a><span class="p">{</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="p">{</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_NAME</span><span class="p">:</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">gdict_source_set_name</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DESCRIPTION</span><span class="p">:</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">gdict_source_set_description</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_TRANSPORT</span><span class="p">:</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">gdict_source_set_transport</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_enum</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DATABASE</span><span class="p">:</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">gdict_source_set_database</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_STRATEGY</span><span class="p">:</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">gdict_source_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="p">}</span> +<a id="line-145" name="line-145"></a><span class="p">}</span> +<a id="line-146" name="line-146"></a> +<a id="line-147" name="line-147"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-148" name="line-148"></a><span class="nf">gdict_source_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-152" name="line-152"></a><span class="p">{</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">GdictSourcePrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-155" name="line-155"></a> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="p">{</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_FILENAME</span><span class="p">:</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">filename</span><span class="p">);</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_NAME</span><span class="p">:</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DESCRIPTION</span><span class="p">:</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="p">);</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DATABASE</span><span class="p">:</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_STRATEGY</span><span class="p">:</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_TRANSPORT</span><span class="p">:</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">g_value_set_enum</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="p">);</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_CONTEXT</span><span class="p">:</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">g_value_set_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_source_peek_context</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="p">}</span> +<a id="line-183" name="line-183"></a><span class="p">}</span> +<a id="line-184" name="line-184"></a> +<a id="line-185" name="line-185"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-186" name="line-186"></a><span class="nf">gdict_source_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-187" name="line-187"></a><span class="p">{</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">GdictSourcePrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">));</span> +<a id="line-189" name="line-189"></a> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">filename</span><span class="p">);</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">)</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">);</span> +<a id="line-194" name="line-194"></a> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="p">);</span> +<a id="line-197" name="line-197"></a> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-200" name="line-200"></a> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_source_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-205" name="line-205"></a><span class="p">}</span> +<a id="line-206" name="line-206"></a> +<a id="line-207" name="line-207"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-208" name="line-208"></a><span class="nf">gdict_source_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-209" name="line-209"></a><span class="p">{</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">gobject_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-211" name="line-211"></a> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">set_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_set_property</span><span class="p">;</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">get_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_property</span><span class="p">;</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_finalize</span><span class="p">;</span> +<a id="line-215" name="line-215"></a> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-217" name="line-217"></a><span class="cm"> * GdictSource:filename</span> +<a id="line-218" name="line-218"></a><span class="cm"> *</span> +<a id="line-219" name="line-219"></a><span class="cm"> * The filename used by this dictionary source.</span> +<a id="line-220" name="line-220"></a><span class="cm"> *</span> +<a id="line-221" name="line-221"></a><span class="cm"> * Since: 1.0</span> +<a id="line-222" name="line-222"></a><span class="cm"> */</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">PROP_FILENAME</span><span class="p">,</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"filename"</span><span class="p">,</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Filename"</span><span class="p">),</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The filename used by this dictionary source"</span><span class="p">),</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">G_PARAM_READABLE</span><span class="p">));</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-231" name="line-231"></a><span class="cm"> * GdictSource:name</span> +<a id="line-232" name="line-232"></a><span class="cm"> *</span> +<a id="line-233" name="line-233"></a><span class="cm"> * The display name of this dictionary source.</span> +<a id="line-234" name="line-234"></a><span class="cm"> *</span> +<a id="line-235" name="line-235"></a><span class="cm"> * Since: 1.0</span> +<a id="line-236" name="line-236"></a><span class="cm"> */</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">PROP_NAME</span><span class="p">,</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"name"</span><span class="p">,</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Name"</span><span class="p">),</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The display name of this dictionary source"</span><span class="p">),</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-245" name="line-245"></a><span class="cm"> * GdictSource:description</span> +<a id="line-246" name="line-246"></a><span class="cm"> *</span> +<a id="line-247" name="line-247"></a><span class="cm"> * The description of this dictionary source.</span> +<a id="line-248" name="line-248"></a><span class="cm"> *</span> +<a id="line-249" name="line-249"></a><span class="cm"> * Since: 1.0</span> +<a id="line-250" name="line-250"></a><span class="cm"> */</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">PROP_DESCRIPTION</span><span class="p">,</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"description"</span><span class="p">,</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Description"</span><span class="p">),</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The description of this dictionary source"</span><span class="p">),</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-259" name="line-259"></a><span class="cm"> * GdictSource:database</span> +<a id="line-260" name="line-260"></a><span class="cm"> *</span> +<a id="line-261" name="line-261"></a><span class="cm"> * The default database of this dictionary source.</span> +<a id="line-262" name="line-262"></a><span class="cm"> *</span> +<a id="line-263" name="line-263"></a><span class="cm"> * Since: 1.0</span> +<a id="line-264" name="line-264"></a><span class="cm"> */</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">PROP_DATABASE</span><span class="p">,</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"database"</span><span class="p">,</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Database"</span><span class="p">),</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The default database of this dictionary source"</span><span class="p">),</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-273" name="line-273"></a><span class="cm"> * GdictSource:strategy</span> +<a id="line-274" name="line-274"></a><span class="cm"> *</span> +<a id="line-275" name="line-275"></a><span class="cm"> * The default strategy of this dictionary source.</span> +<a id="line-276" name="line-276"></a><span class="cm"> *</span> +<a id="line-277" name="line-277"></a><span class="cm"> * Since: 1.0</span> +<a id="line-278" name="line-278"></a><span class="cm"> */</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">PROP_STRATEGY</span><span class="p">,</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"strategy"</span><span class="p">,</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Strategy"</span><span class="p">),</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The default strategy of this dictionary source"</span><span class="p">),</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-287" name="line-287"></a><span class="cm"> * GdictSource:transport</span> +<a id="line-288" name="line-288"></a><span class="cm"> *</span> +<a id="line-289" name="line-289"></a><span class="cm"> * The transport mechanism used by this source.</span> +<a id="line-290" name="line-290"></a><span class="cm"> *</span> +<a id="line-291" name="line-291"></a><span class="cm"> * Since: 1.0</span> +<a id="line-292" name="line-292"></a><span class="cm"> */</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">PROP_TRANSPORT</span><span class="p">,</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="n">g_param_spec_enum</span><span class="w"> </span><span class="p">(</span><span class="s">"transport"</span><span class="p">,</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Transport"</span><span class="p">),</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The transport mechanism used by this dictionary source"</span><span class="p">),</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">GDICT_TYPE_SOURCE_TRANSPORT</span><span class="p">,</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="n">GDICT_SOURCE_TRANSPORT_INVALID</span><span class="p">,</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="cm">/**</span> +<a id="line-302" name="line-302"></a><span class="cm"> * GdictSource:context</span> +<a id="line-303" name="line-303"></a><span class="cm"> *</span> +<a id="line-304" name="line-304"></a><span class="cm"> * The #GdictContext bound to this source.</span> +<a id="line-305" name="line-305"></a><span class="cm"> *</span> +<a id="line-306" name="line-306"></a><span class="cm"> * Since: 1.0</span> +<a id="line-307" name="line-307"></a><span class="cm"> */</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">PROP_CONTEXT</span><span class="p">,</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">g_param_spec_object</span><span class="w"> </span><span class="p">(</span><span class="s">"context"</span><span class="p">,</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Context"</span><span class="p">),</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The GdictContext bound to this source"</span><span class="p">),</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">GDICT_TYPE_CONTEXT</span><span class="p">,</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">G_PARAM_READABLE</span><span class="p">));</span> +<a id="line-315" name="line-315"></a><span class="p">}</span> +<a id="line-316" name="line-316"></a> +<a id="line-317" name="line-317"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-318" name="line-318"></a><span class="nf">gdict_source_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">)</span> +<a id="line-319" name="line-319"></a><span class="p">{</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="n">GdictSourcePrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-321" name="line-321"></a> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="p">;</span> +<a id="line-324" name="line-324"></a> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-327" name="line-327"></a> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SOURCE_TRANSPORT_INVALID</span><span class="p">;</span> +<a id="line-333" name="line-333"></a> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-335" name="line-335"></a><span class="p">}</span> +<a id="line-336" name="line-336"></a> +<a id="line-337" name="line-337"></a><span class="cm">/**</span> +<a id="line-338" name="line-338"></a><span class="cm"> * gdict_source_new:</span> +<a id="line-339" name="line-339"></a><span class="cm"> *</span> +<a id="line-340" name="line-340"></a><span class="cm"> * Creates an empty #GdictSource object. Use gdict_load_from_file() to</span> +<a id="line-341" name="line-341"></a><span class="cm"> * read an existing dictionary source definition file.</span> +<a id="line-342" name="line-342"></a><span class="cm"> *</span> +<a id="line-343" name="line-343"></a><span class="cm"> * Return value: an empty #GdictSource</span> +<a id="line-344" name="line-344"></a><span class="cm"> */</span> +<a id="line-345" name="line-345"></a><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span> +<a id="line-346" name="line-346"></a><span class="nf">gdict_source_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-347" name="line-347"></a><span class="p">{</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_SOURCE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-349" name="line-349"></a><span class="p">}</span> +<a id="line-350" name="line-350"></a> +<a id="line-351" name="line-351"></a><span class="k">static</span><span class="w"> </span><span class="n">GdictSourceTransport</span> +<a id="line-352" name="line-352"></a><span class="nf">gdict_source_resolve_transport</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">transport</span><span class="p">)</span> +<a id="line-353" name="line-353"></a><span class="p">{</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">transport</span><span class="p">)</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">GDICT_SOURCE_TRANSPORT_INVALID</span><span class="p">;</span> +<a id="line-356" name="line-356"></a> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">transport</span><span class="p">,</span><span class="w"> </span><span class="s">"dictd"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">GDICT_SOURCE_TRANSPORT_DICTD</span><span class="p">;</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="k">else</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">GDICT_SOURCE_TRANSPORT_INVALID</span><span class="p">;</span> +<a id="line-361" name="line-361"></a> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-363" name="line-363"></a><span class="p">}</span> +<a id="line-364" name="line-364"></a> +<a id="line-365" name="line-365"></a><span class="k">static</span><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span> +<a id="line-366" name="line-366"></a><span class="nf">gdict_source_create_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">GdictSourceTransport</span><span class="w"> </span><span class="n">transport</span><span class="p">,</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-369" name="line-369"></a><span class="p">{</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">GdictSourcePrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-372" name="line-372"></a> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-374" name="line-374"></a> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">transport</span><span class="p">)</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="p">{</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_SOURCE_TRANSPORT_DICTD</span><span class="p">:</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="p">{</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">hostname</span><span class="p">;</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">port</span><span class="p">;</span> +<a id="line-383" name="line-383"></a> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">hostname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">SOURCE_KEY_HOSTNAME</span><span class="p">,</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-388" name="line-388"></a> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_integer</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="n">SOURCE_KEY_PORT</span><span class="p">,</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">port</span><span class="p">)</span> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">port</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-395" name="line-395"></a> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_new</span><span class="w"> </span><span class="p">(</span><span class="n">hostname</span><span class="p">,</span><span class="w"> </span><span class="n">port</span><span class="p">);</span> +<a id="line-397" name="line-397"></a> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">hostname</span><span class="p">);</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="p">}</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR</span><span class="p">,</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR_PARSE</span><span class="p">,</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Invalid transport type '%d'"</span><span class="p">),</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">transport</span><span class="p">);</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="p">}</span> +<a id="line-408" name="line-408"></a> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-410" name="line-410"></a> +<a id="line-411" name="line-411"></a><span class="hll"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">transport</span><span class="p">)</span><span class="error2"><--- Condition 'priv->transport!=transport' is redundant</span> +</span><a id="line-412" name="line-412"></a><span class="hll"><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">transport</span><span class="p">;</span><span class="error2"><--- Assignment 'priv->transport=transport'</span> +</span><a id="line-413" name="line-413"></a> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">context</span><span class="p">;</span> +<a id="line-415" name="line-415"></a><span class="p">}</span> +<a id="line-416" name="line-416"></a> +<a id="line-417" name="line-417"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-418" name="line-418"></a><span class="nf">gdict_source_parse</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-420" name="line-420"></a><span class="p">{</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="n">GdictSourcePrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">parse_error</span><span class="p">;</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">transport</span><span class="p">;</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">GdictSourceTransport</span><span class="w"> </span><span class="n">t</span><span class="p">;</span> +<a id="line-425" name="line-425"></a> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-427" name="line-427"></a> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_key_file_has_group</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">))</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="p">{</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR</span><span class="p">,</span> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR_PARSE</span><span class="p">,</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"No '%s' group found inside the dictionary source definition"</span><span class="p">),</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">);</span> +<a id="line-434" name="line-434"></a> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="p">}</span> +<a id="line-437" name="line-437"></a> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="cm">/* fetch the name for the dictionary source definition */</span> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="n">parse_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="n">SOURCE_KEY_NAME</span><span class="p">,</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="o">&</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">)</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="p">{</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR</span><span class="p">,</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR_PARSE</span><span class="p">,</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to get the '%s' key inside the dictionary "</span> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="s">"source definition: %s"</span><span class="p">),</span> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="n">SOURCE_KEY_NAME</span><span class="p">,</span> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="n">parse_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-453" name="line-453"></a> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">);</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-456" name="line-456"></a> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="p">}</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="cm">/* if present, fetch the localized description */</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_has_key</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_KEY_DESCRIPTION</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="p">{</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_locale_string</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="n">SOURCE_KEY_DESCRIPTION</span><span class="p">,</span> +<a id="line-466" name="line-466"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="o">&</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">)</span> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="p">{</span> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR</span><span class="p">,</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR_PARSE</span><span class="p">,</span> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to get the '%s' key inside the dictionary "</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="s">"source definition: %s"</span><span class="p">),</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="n">SOURCE_KEY_DESCRIPTION</span><span class="p">,</span> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="n">parse_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-476" name="line-476"></a> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">);</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-481" name="line-481"></a> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="p">}</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="p">}</span> +<a id="line-485" name="line-485"></a> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_has_key</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_KEY_DATABASE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="p">{</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">SOURCE_KEY_DATABASE</span><span class="p">,</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="o">&</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">)</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="p">{</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR</span><span class="p">,</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR_PARSE</span><span class="p">,</span> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to get the '%s' key inside the dictionary "</span> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="s">"source definition: %s"</span><span class="p">),</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="n">SOURCE_KEY_DATABASE</span><span class="p">,</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="n">parse_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-500" name="line-500"></a> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">);</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="p">);</span> +<a id="line-506" name="line-506"></a> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="p">}</span> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="p">}</span> +<a id="line-510" name="line-510"></a> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_has_key</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCE_KEY_STRATEGY</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="p">{</span> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="n">SOURCE_KEY_STRATEGY</span><span class="p">,</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="o">&</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">)</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="p">{</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR</span><span class="p">,</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR_PARSE</span><span class="p">,</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to get the '%s' key inside the dictionary "</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="s">"source definition: %s"</span><span class="p">),</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="n">SOURCE_KEY_STRATEGY</span><span class="p">,</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="n">parse_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-525" name="line-525"></a> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">);</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-529" name="line-529"></a> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="p">);</span> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-533" name="line-533"></a> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-535" name="line-535"></a><span class="w"> </span><span class="p">}</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="p">}</span> +<a id="line-537" name="line-537"></a> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="n">transport</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-539" name="line-539"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="n">SOURCE_KEY_TRANSPORT</span><span class="p">,</span> +<a id="line-541" name="line-541"></a><span class="w"> </span><span class="o">&</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">)</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="p">{</span> +<a id="line-544" name="line-544"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR</span><span class="p">,</span> +<a id="line-545" name="line-545"></a><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR_PARSE</span><span class="p">,</span> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to get the '%s' key inside the dictionary "</span> +<a id="line-547" name="line-547"></a><span class="w"> </span><span class="s">"source definition file: %s"</span><span class="p">),</span> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="n">SOURCE_KEY_TRANSPORT</span><span class="p">,</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="n">parse_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-550" name="line-550"></a> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">);</span> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="p">);</span> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-558" name="line-558"></a> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="p">}</span> +<a id="line-561" name="line-561"></a> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_resolve_transport</span><span class="w"> </span><span class="p">(</span><span class="n">transport</span><span class="p">);</span> +<a id="line-563" name="line-563"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">transport</span><span class="p">);</span> +<a id="line-564" name="line-564"></a> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_create_context</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-566" name="line-566"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">)</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="p">{</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-569" name="line-569"></a> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">);</span> +<a id="line-571" name="line-571"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-572" name="line-572"></a> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="p">);</span> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-577" name="line-577"></a> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-579" name="line-579"></a><span class="w"> </span><span class="p">}</span> +<a id="line-580" name="line-580"></a> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-582" name="line-582"></a><span class="p">}</span> +<a id="line-583" name="line-583"></a> +<a id="line-584" name="line-584"></a><span class="cm">/**</span> +<a id="line-585" name="line-585"></a><span class="cm"> * gdict_source_load_from_file:</span> +<a id="line-586" name="line-586"></a><span class="cm"> * @source: an empty #GdictSource</span> +<a id="line-587" name="line-587"></a><span class="cm"> * @filename: path to a dictionary source file</span> +<a id="line-588" name="line-588"></a><span class="cm"> * @error: return location for a #GError or %NULL</span> +<a id="line-589" name="line-589"></a><span class="cm"> *</span> +<a id="line-590" name="line-590"></a><span class="cm"> * Loads a dictionary source definition file into an empty #GdictSource</span> +<a id="line-591" name="line-591"></a><span class="cm"> * object.</span> +<a id="line-592" name="line-592"></a><span class="cm"> *</span> +<a id="line-593" name="line-593"></a><span class="cm"> * Return value: %TRUE if @filename was loaded successfully.</span> +<a id="line-594" name="line-594"></a><span class="cm"> *</span> +<a id="line-595" name="line-595"></a><span class="cm"> * Since: 1.0</span> +<a id="line-596" name="line-596"></a><span class="cm"> */</span> +<a id="line-597" name="line-597"></a><span class="n">gboolean</span> +<a id="line-598" name="line-598"></a><span class="nf">gdict_source_load_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">filename</span><span class="p">,</span> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-601" name="line-601"></a><span class="p">{</span> +<a id="line-602" name="line-602"></a><span class="w"> </span><span class="n">GdictSourcePrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">read_error</span><span class="p">;</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">parse_error</span><span class="p">;</span> +<a id="line-605" name="line-605"></a> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-608" name="line-608"></a> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-610" name="line-610"></a> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">)</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-613" name="line-613"></a> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="n">read_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="n">g_key_file_load_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="n">filename</span><span class="p">,</span> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="n">G_KEY_FILE_KEEP_TRANSLATIONS</span><span class="p">,</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="o">&</span><span class="n">read_error</span><span class="p">);</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">read_error</span><span class="p">)</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="p">{</span> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">read_error</span><span class="p">);</span> +<a id="line-622" name="line-622"></a> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="p">}</span> +<a id="line-625" name="line-625"></a> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="n">parse_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">gdict_source_parse</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">)</span> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="p">{</span> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-631" name="line-631"></a> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="p">}</span> +<a id="line-634" name="line-634"></a> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-636" name="line-636"></a> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">);</span> +<a id="line-638" name="line-638"></a> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-640" name="line-640"></a><span class="p">}</span> +<a id="line-641" name="line-641"></a> +<a id="line-642" name="line-642"></a><span class="cm">/**</span> +<a id="line-643" name="line-643"></a><span class="cm"> * gdict_source_load_from_data:</span> +<a id="line-644" name="line-644"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-645" name="line-645"></a><span class="cm"> * @data: string containing a dictionary source</span> +<a id="line-646" name="line-646"></a><span class="cm"> * @length: length of @data</span> +<a id="line-647" name="line-647"></a><span class="cm"> * @error: return location for a #GError or %NULL</span> +<a id="line-648" name="line-648"></a><span class="cm"> *</span> +<a id="line-649" name="line-649"></a><span class="cm"> * Loads a dictionary source definition from @data inside an empty</span> +<a id="line-650" name="line-650"></a><span class="cm"> * #GdictSource object.</span> +<a id="line-651" name="line-651"></a><span class="cm"> *</span> +<a id="line-652" name="line-652"></a><span class="cm"> * Return value: %TRUE if @filename was loaded successfully.</span> +<a id="line-653" name="line-653"></a><span class="cm"> *</span> +<a id="line-654" name="line-654"></a><span class="cm"> * Since: 1.0</span> +<a id="line-655" name="line-655"></a><span class="cm"> */</span> +<a id="line-656" name="line-656"></a><span class="n">gboolean</span> +<a id="line-657" name="line-657"></a><span class="nf">gdict_source_load_from_data</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">,</span> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">length</span><span class="p">,</span> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-661" name="line-661"></a><span class="p">{</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="n">GdictSourcePrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">read_error</span><span class="p">;</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">parse_error</span><span class="p">;</span> +<a id="line-665" name="line-665"></a> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-668" name="line-668"></a> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-670" name="line-670"></a> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">)</span> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-673" name="line-673"></a> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="n">read_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-675" name="line-675"></a><span class="w"> </span><span class="n">g_key_file_load_from_data</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="n">data</span><span class="p">,</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="n">length</span><span class="p">,</span> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="n">G_KEY_FILE_KEEP_TRANSLATIONS</span><span class="p">,</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="o">&</span><span class="n">read_error</span><span class="p">);</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">read_error</span><span class="p">)</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="p">{</span> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">read_error</span><span class="p">);</span> +<a id="line-683" name="line-683"></a> +<a id="line-684" name="line-684"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="p">}</span> +<a id="line-686" name="line-686"></a> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="n">parse_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="n">gdict_source_parse</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parse_error</span><span class="p">)</span> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="p">{</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">parse_error</span><span class="p">);</span> +<a id="line-692" name="line-692"></a> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-694" name="line-694"></a><span class="w"> </span><span class="p">}</span> +<a id="line-695" name="line-695"></a> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-697" name="line-697"></a> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">filename</span><span class="p">);</span> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-700" name="line-700"></a> +<a id="line-701" name="line-701"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-702" name="line-702"></a><span class="p">}</span> +<a id="line-703" name="line-703"></a> +<a id="line-704" name="line-704"></a><span class="cm">/**</span> +<a id="line-705" name="line-705"></a><span class="cm"> * gdict_source_to_data:</span> +<a id="line-706" name="line-706"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-707" name="line-707"></a><span class="cm"> * @length: return loaction for the length of the string, or %NULL</span> +<a id="line-708" name="line-708"></a><span class="cm"> * @error: return location for a #GError or %NULL</span> +<a id="line-709" name="line-709"></a><span class="cm"> *</span> +<a id="line-710" name="line-710"></a><span class="cm"> * Outputs a dictionary source as a string.</span> +<a id="line-711" name="line-711"></a><span class="cm"> *</span> +<a id="line-712" name="line-712"></a><span class="cm"> * Return value: a newly allocated string holding the contents of @source.</span> +<a id="line-713" name="line-713"></a><span class="cm"> *</span> +<a id="line-714" name="line-714"></a><span class="cm"> * Since: 1.0</span> +<a id="line-715" name="line-715"></a><span class="cm"> */</span> +<a id="line-716" name="line-716"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-717" name="line-717"></a><span class="nf">gdict_source_to_data</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="o">*</span><span class="n">length</span><span class="p">,</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-720" name="line-720"></a><span class="p">{</span> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="n">GdictSourcePrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-723" name="line-723"></a> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-725" name="line-725"></a> +<a id="line-726" name="line-726"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-727" name="line-727"></a> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">)</span> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="p">{</span> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR</span><span class="p">,</span> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR_INVALID_NAME</span><span class="p">,</span> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Dictionary source does not have name"</span><span class="p">));</span> +<a id="line-733" name="line-733"></a> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-735" name="line-735"></a><span class="w"> </span><span class="p">}</span> +<a id="line-736" name="line-736"></a> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">IS_VALID_TRANSPORT</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="p">))</span> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="p">{</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="n">g_set_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR</span><span class="p">,</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="n">GDICT_SOURCE_ERROR_INVALID_TRANSPORT</span><span class="p">,</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Dictionary source '%s' has invalid transport '%s'"</span><span class="p">),</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">,</span> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="n">valid_transports</span><span class="p">[</span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="p">]);</span> +<a id="line-744" name="line-744"></a> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="p">}</span> +<a id="line-747" name="line-747"></a> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">)</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="p">{</span> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">write_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-751" name="line-751"></a> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_to_data</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">length</span><span class="p">,</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="o">&</span><span class="n">write_error</span><span class="p">);</span> +<a id="line-755" name="line-755"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">write_error</span><span class="p">)</span> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="n">g_propagate_error</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="n">write_error</span><span class="p">);</span> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="p">}</span> +<a id="line-758" name="line-758"></a> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-760" name="line-760"></a><span class="p">}</span> +<a id="line-761" name="line-761"></a> +<a id="line-762" name="line-762"></a><span class="cm">/**</span> +<a id="line-763" name="line-763"></a><span class="cm"> * gdict_source_set_name:</span> +<a id="line-764" name="line-764"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-765" name="line-765"></a><span class="cm"> * @name: the UTF8-encoded name of the dictionary source</span> +<a id="line-766" name="line-766"></a><span class="cm"> *</span> +<a id="line-767" name="line-767"></a><span class="cm"> * Sets @name as the displayable name of the dictionary source.</span> +<a id="line-768" name="line-768"></a><span class="cm"> *</span> +<a id="line-769" name="line-769"></a><span class="cm"> * Since: 1.0</span> +<a id="line-770" name="line-770"></a><span class="cm"> */</span> +<a id="line-771" name="line-771"></a><span class="kt">void</span> +<a id="line-772" name="line-772"></a><span class="nf">gdict_source_set_name</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">)</span> +<a id="line-774" name="line-774"></a><span class="p">{</span> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-777" name="line-777"></a> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-780" name="line-780"></a> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">)</span> +<a id="line-782" name="line-782"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-783" name="line-783"></a> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-786" name="line-786"></a><span class="w"> </span><span class="n">SOURCE_KEY_NAME</span><span class="p">,</span> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-788" name="line-788"></a><span class="p">}</span> +<a id="line-789" name="line-789"></a> +<a id="line-790" name="line-790"></a><span class="cm">/**</span> +<a id="line-791" name="line-791"></a><span class="cm"> * gdict_source_get_name:</span> +<a id="line-792" name="line-792"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-793" name="line-793"></a><span class="cm"> *</span> +<a id="line-794" name="line-794"></a><span class="cm"> * Retrieves the name of @source.</span> +<a id="line-795" name="line-795"></a><span class="cm"> *</span> +<a id="line-796" name="line-796"></a><span class="cm"> * Return value: the name of a #GdictSource. The returned string is owned</span> +<a id="line-797" name="line-797"></a><span class="cm"> * by the #GdictSource object, and should not be modified or freed.</span> +<a id="line-798" name="line-798"></a><span class="cm"> *</span> +<a id="line-799" name="line-799"></a><span class="cm"> * Since: 1.0</span> +<a id="line-800" name="line-800"></a><span class="cm"> */</span> +<a id="line-801" name="line-801"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-802" name="line-802"></a><span class="nf">gdict_source_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">)</span> +<a id="line-803" name="line-803"></a><span class="p">{</span> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-805" name="line-805"></a> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">name</span><span class="p">;</span> +<a id="line-807" name="line-807"></a><span class="p">}</span> +<a id="line-808" name="line-808"></a> +<a id="line-809" name="line-809"></a><span class="cm">/**</span> +<a id="line-810" name="line-810"></a><span class="cm"> * gdict_source_set_description:</span> +<a id="line-811" name="line-811"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-812" name="line-812"></a><span class="cm"> * @description: a UTF-8 encoded description or %NULL</span> +<a id="line-813" name="line-813"></a><span class="cm"> *</span> +<a id="line-814" name="line-814"></a><span class="cm"> * Sets the description of @source. If @description is %NULL, unsets the</span> +<a id="line-815" name="line-815"></a><span class="cm"> * currently set description.</span> +<a id="line-816" name="line-816"></a><span class="cm"> *</span> +<a id="line-817" name="line-817"></a><span class="cm"> * Since: 1.0</span> +<a id="line-818" name="line-818"></a><span class="cm"> */</span> +<a id="line-819" name="line-819"></a><span class="kt">void</span> +<a id="line-820" name="line-820"></a><span class="nf">gdict_source_set_description</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-821" name="line-821"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">description</span><span class="p">)</span> +<a id="line-822" name="line-822"></a><span class="p">{</span> +<a id="line-823" name="line-823"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-824" name="line-824"></a> +<a id="line-825" name="line-825"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="p">);</span> +<a id="line-826" name="line-826"></a> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">)</span> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-829" name="line-829"></a> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">description</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">description</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-831" name="line-831"></a><span class="w"> </span><span class="p">{</span> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">description</span><span class="p">);</span> +<a id="line-833" name="line-833"></a> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="n">SOURCE_KEY_DESCRIPTION</span><span class="p">,</span> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="n">description</span><span class="p">);</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="p">}</span> +<a id="line-839" name="line-839"></a><span class="w"> </span><span class="k">else</span> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="p">{</span> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_has_key</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="n">SOURCE_KEY_DESCRIPTION</span><span class="p">,</span> +<a id="line-844" name="line-844"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="n">g_key_file_remove_key</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="n">SOURCE_KEY_DESCRIPTION</span><span class="p">,</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="p">}</span> +<a id="line-850" name="line-850"></a><span class="p">}</span> +<a id="line-851" name="line-851"></a> +<a id="line-852" name="line-852"></a><span class="cm">/**</span> +<a id="line-853" name="line-853"></a><span class="cm"> * gdict_source_get_description:</span> +<a id="line-854" name="line-854"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-855" name="line-855"></a><span class="cm"> *</span> +<a id="line-856" name="line-856"></a><span class="cm"> * Retrieves the description of @source.</span> +<a id="line-857" name="line-857"></a><span class="cm"> *</span> +<a id="line-858" name="line-858"></a><span class="cm"> * Return value: the description of a #GdictSource. The returned string is</span> +<a id="line-859" name="line-859"></a><span class="cm"> * owned by the #GdictSource object, and should not be modified or freed.</span> +<a id="line-860" name="line-860"></a><span class="cm"> *</span> +<a id="line-861" name="line-861"></a><span class="cm"> * Since: 1.0</span> +<a id="line-862" name="line-862"></a><span class="cm"> */</span> +<a id="line-863" name="line-863"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-864" name="line-864"></a><span class="nf">gdict_source_get_description</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">)</span> +<a id="line-865" name="line-865"></a><span class="p">{</span> +<a id="line-866" name="line-866"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-867" name="line-867"></a> +<a id="line-868" name="line-868"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">description</span><span class="p">;</span> +<a id="line-869" name="line-869"></a><span class="p">}</span> +<a id="line-870" name="line-870"></a> +<a id="line-871" name="line-871"></a><span class="cm">/**</span> +<a id="line-872" name="line-872"></a><span class="cm"> * gdict_source_set_database:</span> +<a id="line-873" name="line-873"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-874" name="line-874"></a><span class="cm"> * @database: a UTF-8 encoded database name or %NULL</span> +<a id="line-875" name="line-875"></a><span class="cm"> *</span> +<a id="line-876" name="line-876"></a><span class="cm"> * Sets the default database of @source. If @database is %NULL, unsets the</span> +<a id="line-877" name="line-877"></a><span class="cm"> * currently set database.</span> +<a id="line-878" name="line-878"></a><span class="cm"> *</span> +<a id="line-879" name="line-879"></a><span class="cm"> * Since: 1.0</span> +<a id="line-880" name="line-880"></a><span class="cm"> */</span> +<a id="line-881" name="line-881"></a><span class="kt">void</span> +<a id="line-882" name="line-882"></a><span class="nf">gdict_source_set_database</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">)</span> +<a id="line-884" name="line-884"></a><span class="p">{</span> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-886" name="line-886"></a> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-888" name="line-888"></a> +<a id="line-889" name="line-889"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">)</span> +<a id="line-890" name="line-890"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-891" name="line-891"></a> +<a id="line-892" name="line-892"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">database</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">database</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-893" name="line-893"></a><span class="w"> </span><span class="p">{</span> +<a id="line-894" name="line-894"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">database</span><span class="p">);</span> +<a id="line-895" name="line-895"></a> +<a id="line-896" name="line-896"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-897" name="line-897"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-898" name="line-898"></a><span class="w"> </span><span class="n">SOURCE_KEY_DATABASE</span><span class="p">,</span> +<a id="line-899" name="line-899"></a><span class="w"> </span><span class="n">database</span><span class="p">);</span> +<a id="line-900" name="line-900"></a><span class="w"> </span><span class="p">}</span> +<a id="line-901" name="line-901"></a><span class="w"> </span><span class="k">else</span> +<a id="line-902" name="line-902"></a><span class="w"> </span><span class="p">{</span> +<a id="line-903" name="line-903"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_has_key</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-904" name="line-904"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-905" name="line-905"></a><span class="w"> </span><span class="n">SOURCE_KEY_DATABASE</span><span class="p">,</span> +<a id="line-906" name="line-906"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="n">g_key_file_remove_key</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-908" name="line-908"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="n">SOURCE_KEY_DATABASE</span><span class="p">,</span> +<a id="line-910" name="line-910"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-911" name="line-911"></a><span class="w"> </span><span class="p">}</span> +<a id="line-912" name="line-912"></a><span class="p">}</span> +<a id="line-913" name="line-913"></a> +<a id="line-914" name="line-914"></a><span class="cm">/**</span> +<a id="line-915" name="line-915"></a><span class="cm"> * gdict_source_get_database:</span> +<a id="line-916" name="line-916"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-917" name="line-917"></a><span class="cm"> *</span> +<a id="line-918" name="line-918"></a><span class="cm"> * Retrieves the default database of @source.</span> +<a id="line-919" name="line-919"></a><span class="cm"> *</span> +<a id="line-920" name="line-920"></a><span class="cm"> * Return value: the default strategy of a #GdictSource. The returned string</span> +<a id="line-921" name="line-921"></a><span class="cm"> * is owned by the #GdictSource object, and should not be modified or freed.</span> +<a id="line-922" name="line-922"></a><span class="cm"> *</span> +<a id="line-923" name="line-923"></a><span class="cm"> * Since: 1.0</span> +<a id="line-924" name="line-924"></a><span class="cm"> */</span> +<a id="line-925" name="line-925"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-926" name="line-926"></a><span class="nf">gdict_source_get_database</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">)</span> +<a id="line-927" name="line-927"></a><span class="p">{</span> +<a id="line-928" name="line-928"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-929" name="line-929"></a> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">;</span> +<a id="line-931" name="line-931"></a><span class="p">}</span> +<a id="line-932" name="line-932"></a> +<a id="line-933" name="line-933"></a><span class="cm">/**</span> +<a id="line-934" name="line-934"></a><span class="cm"> * gdict_source_set_strategy:</span> +<a id="line-935" name="line-935"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-936" name="line-936"></a><span class="cm"> * @strategy: a UTF-8 encoded strategy or %NULL</span> +<a id="line-937" name="line-937"></a><span class="cm"> *</span> +<a id="line-938" name="line-938"></a><span class="cm"> * Sets the description of @source. If @strategy is %NULL, unsets the</span> +<a id="line-939" name="line-939"></a><span class="cm"> * currently set strategy.</span> +<a id="line-940" name="line-940"></a><span class="cm"> *</span> +<a id="line-941" name="line-941"></a><span class="cm"> * Since: 1.0</span> +<a id="line-942" name="line-942"></a><span class="cm"> */</span> +<a id="line-943" name="line-943"></a><span class="kt">void</span> +<a id="line-944" name="line-944"></a><span class="nf">gdict_source_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-945" name="line-945"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">strategy</span><span class="p">)</span> +<a id="line-946" name="line-946"></a><span class="p">{</span> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-948" name="line-948"></a> +<a id="line-949" name="line-949"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-950" name="line-950"></a> +<a id="line-951" name="line-951"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">)</span> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-953" name="line-953"></a> +<a id="line-954" name="line-954"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strategy</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">strategy</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-955" name="line-955"></a><span class="w"> </span><span class="p">{</span> +<a id="line-956" name="line-956"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">strategy</span><span class="p">);</span> +<a id="line-957" name="line-957"></a> +<a id="line-958" name="line-958"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-959" name="line-959"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-960" name="line-960"></a><span class="w"> </span><span class="n">SOURCE_KEY_STRATEGY</span><span class="p">,</span> +<a id="line-961" name="line-961"></a><span class="w"> </span><span class="n">strategy</span><span class="p">);</span> +<a id="line-962" name="line-962"></a><span class="w"> </span><span class="p">}</span> +<a id="line-963" name="line-963"></a><span class="w"> </span><span class="k">else</span> +<a id="line-964" name="line-964"></a><span class="w"> </span><span class="p">{</span> +<a id="line-965" name="line-965"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_has_key</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-966" name="line-966"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-967" name="line-967"></a><span class="w"> </span><span class="n">SOURCE_KEY_STRATEGY</span><span class="p">,</span> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-969" name="line-969"></a><span class="w"> </span><span class="n">g_key_file_remove_key</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-970" name="line-970"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-971" name="line-971"></a><span class="w"> </span><span class="n">SOURCE_KEY_STRATEGY</span><span class="p">,</span> +<a id="line-972" name="line-972"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-973" name="line-973"></a><span class="w"> </span><span class="p">}</span> +<a id="line-974" name="line-974"></a><span class="p">}</span> +<a id="line-975" name="line-975"></a> +<a id="line-976" name="line-976"></a><span class="cm">/**</span> +<a id="line-977" name="line-977"></a><span class="cm"> * gdict_source_get_strategy:</span> +<a id="line-978" name="line-978"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-979" name="line-979"></a><span class="cm"> *</span> +<a id="line-980" name="line-980"></a><span class="cm"> * Retrieves the default strategy of @source.</span> +<a id="line-981" name="line-981"></a><span class="cm"> *</span> +<a id="line-982" name="line-982"></a><span class="cm"> * Return value: the default strategy of a #GdictSource. The returned string</span> +<a id="line-983" name="line-983"></a><span class="cm"> * is owned by the #GdictSource object, and should not be modified or freed.</span> +<a id="line-984" name="line-984"></a><span class="cm"> *</span> +<a id="line-985" name="line-985"></a><span class="cm"> * Since: 1.0</span> +<a id="line-986" name="line-986"></a><span class="cm"> */</span> +<a id="line-987" name="line-987"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-988" name="line-988"></a><span class="nf">gdict_source_get_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">)</span> +<a id="line-989" name="line-989"></a><span class="p">{</span> +<a id="line-990" name="line-990"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-991" name="line-991"></a> +<a id="line-992" name="line-992"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">;</span> +<a id="line-993" name="line-993"></a><span class="p">}</span> +<a id="line-994" name="line-994"></a> +<a id="line-995" name="line-995"></a><span class="cm">/**</span> +<a id="line-996" name="line-996"></a><span class="cm"> * gdict_source_set_transportv</span> +<a id="line-997" name="line-997"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-998" name="line-998"></a><span class="cm"> * @transport: a #GdictSourceTransport</span> +<a id="line-999" name="line-999"></a><span class="cm"> * @first_transport_property: FIXME</span> +<a id="line-1000" name="line-1000"></a><span class="cm"> * @var_args: FIXME</span> +<a id="line-1001" name="line-1001"></a><span class="cm"> *</span> +<a id="line-1002" name="line-1002"></a><span class="cm"> * FIXME</span> +<a id="line-1003" name="line-1003"></a><span class="cm"> *</span> +<a id="line-1004" name="line-1004"></a><span class="cm"> * Since: 1.0</span> +<a id="line-1005" name="line-1005"></a><span class="cm"> */</span> +<a id="line-1006" name="line-1006"></a><span class="kt">void</span> +<a id="line-1007" name="line-1007"></a><span class="nf">gdict_source_set_transportv</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-1008" name="line-1008"></a><span class="w"> </span><span class="n">GdictSourceTransport</span><span class="w"> </span><span class="n">transport</span><span class="p">,</span> +<a id="line-1009" name="line-1009"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">first_transport_property</span><span class="p">,</span> +<a id="line-1010" name="line-1010"></a><span class="w"> </span><span class="kt">va_list</span><span class="w"> </span><span class="n">var_args</span><span class="p">)</span> +<a id="line-1011" name="line-1011"></a><span class="p">{</span> +<a id="line-1012" name="line-1012"></a><span class="w"> </span><span class="n">GdictSourcePrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-1013" name="line-1013"></a> +<a id="line-1014" name="line-1014"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-1015" name="line-1015"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">IS_VALID_TRANSPORT</span><span class="w"> </span><span class="p">(</span><span class="n">transport</span><span class="p">));</span> +<a id="line-1016" name="line-1016"></a> +<a id="line-1017" name="line-1017"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-1018" name="line-1018"></a> +<a id="line-1019" name="line-1019"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">transport</span><span class="p">;</span> +<a id="line-1020" name="line-1020"></a> +<a id="line-1021" name="line-1021"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-1022" name="line-1022"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-1023" name="line-1023"></a> +<a id="line-1024" name="line-1024"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="p">)</span> +<a id="line-1025" name="line-1025"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1026" name="line-1026"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_SOURCE_TRANSPORT_DICTD</span><span class="p">:</span> +<a id="line-1027" name="line-1027"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_client_context_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1028" name="line-1028"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">));</span> +<a id="line-1029" name="line-1029"></a> +<a id="line-1030" name="line-1030"></a><span class="w"> </span><span class="n">g_object_set_valist</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">),</span> +<a id="line-1031" name="line-1031"></a><span class="w"> </span><span class="n">first_transport_property</span><span class="p">,</span> +<a id="line-1032" name="line-1032"></a><span class="w"> </span><span class="n">var_args</span><span class="p">);</span> +<a id="line-1033" name="line-1033"></a> +<a id="line-1034" name="line-1034"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1035" name="line-1035"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_SOURCE_TRANSPORT_INVALID</span><span class="p">:</span> +<a id="line-1036" name="line-1036"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1037" name="line-1037"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1039" name="line-1039"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1040" name="line-1040"></a> +<a id="line-1041" name="line-1041"></a><span class="w"> </span><span class="cm">/* update the keyfile */</span> +<a id="line-1042" name="line-1042"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">)</span> +<a id="line-1043" name="line-1043"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1044" name="line-1044"></a> +<a id="line-1045" name="line-1045"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-1046" name="line-1046"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-1047" name="line-1047"></a><span class="w"> </span><span class="n">SOURCE_KEY_TRANSPORT</span><span class="p">,</span> +<a id="line-1048" name="line-1048"></a><span class="w"> </span><span class="n">valid_transports</span><span class="p">[</span><span class="n">transport</span><span class="p">]);</span> +<a id="line-1049" name="line-1049"></a> +<a id="line-1050" name="line-1050"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="p">)</span> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1052" name="line-1052"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_SOURCE_TRANSPORT_DICTD</span><span class="p">:</span> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-1054" name="line-1054"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-1055" name="line-1055"></a><span class="w"> </span><span class="n">SOURCE_KEY_HOSTNAME</span><span class="p">,</span> +<a id="line-1056" name="line-1056"></a><span class="w"> </span><span class="n">gdict_client_context_get_hostname</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)));</span> +<a id="line-1057" name="line-1057"></a><span class="w"> </span><span class="n">g_key_file_set_integer</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">keyfile</span><span class="p">,</span> +<a id="line-1058" name="line-1058"></a><span class="w"> </span><span class="n">SOURCE_GROUP</span><span class="p">,</span> +<a id="line-1059" name="line-1059"></a><span class="w"> </span><span class="n">SOURCE_KEY_PORT</span><span class="p">,</span> +<a id="line-1060" name="line-1060"></a><span class="w"> </span><span class="n">gdict_client_context_get_port</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_CLIENT_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)));</span> +<a id="line-1061" name="line-1061"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1062" name="line-1062"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_SOURCE_TRANSPORT_INVALID</span><span class="p">:</span> +<a id="line-1063" name="line-1063"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1064" name="line-1064"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-1065" name="line-1065"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1066" name="line-1066"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1067" name="line-1067"></a><span class="p">}</span> +<a id="line-1068" name="line-1068"></a> +<a id="line-1069" name="line-1069"></a><span class="cm">/**</span> +<a id="line-1070" name="line-1070"></a><span class="cm"> * gdict_source_set_transport:</span> +<a id="line-1071" name="line-1071"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-1072" name="line-1072"></a><span class="cm"> * @transport: a valid transport</span> +<a id="line-1073" name="line-1073"></a><span class="cm"> * @first_transport_property: property for the context bound to</span> +<a id="line-1074" name="line-1074"></a><span class="cm"> * the transport, or %NULL</span> +<a id="line-1075" name="line-1075"></a><span class="cm"> * @Varargs: property value for first property name, then additionary</span> +<a id="line-1076" name="line-1076"></a><span class="cm"> * properties, ending with %NULL</span> +<a id="line-1077" name="line-1077"></a><span class="cm"> *</span> +<a id="line-1078" name="line-1078"></a><span class="cm"> * Sets @transport as the choosen transport for @source. The @transport</span> +<a id="line-1079" name="line-1079"></a><span class="cm"> * argument is a method of retrieving dictionary data from a source; it is</span> +<a id="line-1080" name="line-1080"></a><span class="cm"> * used to create the right #GdictContext for this #GdictSource. After</span> +<a id="line-1081" name="line-1081"></a><span class="cm"> * @transport, property name/value pairs should be listed, with a %NULL</span> +<a id="line-1082" name="line-1082"></a><span class="cm"> * pointer ending the list. Properties are the same passed to a #GdictContext</span> +<a id="line-1083" name="line-1083"></a><span class="cm"> * implementation instance using g_object_set().</span> +<a id="line-1084" name="line-1084"></a><span class="cm"> *</span> +<a id="line-1085" name="line-1085"></a><span class="cm"> * Here's a simple example:</span> +<a id="line-1086" name="line-1086"></a><span class="cm"> *</span> +<a id="line-1087" name="line-1087"></a><span class="cm"> * <informalexample><programlisting></span> +<a id="line-1088" name="line-1088"></a><span class="cm"> * #include &lt;gdict/gdict.h&gt;</span> +<a id="line-1089" name="line-1089"></a><span class="cm"> * GdictSource *source = gdict_source_new ();</span> +<a id="line-1090" name="line-1090"></a><span class="cm"> *</span> +<a id="line-1091" name="line-1091"></a><span class="cm"> * gdict_source_set_name (source, "My Source");</span> +<a id="line-1092" name="line-1092"></a><span class="cm"> * gdict_source_set_transport (source, GDICT_SOURCE_TRANSPORT_DICTD,</span> +<a id="line-1093" name="line-1093"></a><span class="cm"> * "hostname", "dictionary-server.org",</span> +<a id="line-1094" name="line-1094"></a><span class="cm"> * "port", 2628,</span> +<a id="line-1095" name="line-1095"></a><span class="cm"> * NULL);</span> +<a id="line-1096" name="line-1096"></a><span class="cm"> * </programlisting></informalexample></span> +<a id="line-1097" name="line-1097"></a><span class="cm"> *</span> +<a id="line-1098" name="line-1098"></a><span class="cm"> * Since: 1.0</span> +<a id="line-1099" name="line-1099"></a><span class="cm"> */</span> +<a id="line-1100" name="line-1100"></a><span class="kt">void</span> +<a id="line-1101" name="line-1101"></a><span class="nf">gdict_source_set_transport</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-1102" name="line-1102"></a><span class="w"> </span><span class="n">GdictSourceTransport</span><span class="w"> </span><span class="n">transport</span><span class="p">,</span> +<a id="line-1103" name="line-1103"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">first_transport_property</span><span class="p">,</span> +<a id="line-1104" name="line-1104"></a><span class="w"> </span><span class="p">...)</span> +<a id="line-1105" name="line-1105"></a><span class="p">{</span> +<a id="line-1106" name="line-1106"></a><span class="w"> </span><span class="kt">va_list</span><span class="w"> </span><span class="n">args</span><span class="p">;</span> +<a id="line-1107" name="line-1107"></a> +<a id="line-1108" name="line-1108"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-1109" name="line-1109"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">IS_VALID_TRANSPORT</span><span class="w"> </span><span class="p">(</span><span class="n">transport</span><span class="p">));</span> +<a id="line-1110" name="line-1110"></a> +<a id="line-1111" name="line-1111"></a><span class="w"> </span><span class="n">va_start</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="w"> </span><span class="n">first_transport_property</span><span class="p">);</span> +<a id="line-1112" name="line-1112"></a> +<a id="line-1113" name="line-1113"></a><span class="w"> </span><span class="n">gdict_source_set_transportv</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="n">transport</span><span class="p">,</span> +<a id="line-1114" name="line-1114"></a><span class="w"> </span><span class="n">first_transport_property</span><span class="p">,</span> +<a id="line-1115" name="line-1115"></a><span class="w"> </span><span class="n">args</span><span class="p">);</span> +<a id="line-1116" name="line-1116"></a> +<a id="line-1117" name="line-1117"></a><span class="w"> </span><span class="n">va_end</span><span class="w"> </span><span class="p">(</span><span class="n">args</span><span class="p">);</span> +<a id="line-1118" name="line-1118"></a><span class="p">}</span> +<a id="line-1119" name="line-1119"></a> +<a id="line-1120" name="line-1120"></a><span class="cm">/**</span> +<a id="line-1121" name="line-1121"></a><span class="cm"> * gdict_source_get_transport:</span> +<a id="line-1122" name="line-1122"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-1123" name="line-1123"></a><span class="cm"> *</span> +<a id="line-1124" name="line-1124"></a><span class="cm"> * FIXME</span> +<a id="line-1125" name="line-1125"></a><span class="cm"> *</span> +<a id="line-1126" name="line-1126"></a><span class="cm"> * Return value: FIXME</span> +<a id="line-1127" name="line-1127"></a><span class="cm"> *</span> +<a id="line-1128" name="line-1128"></a><span class="cm"> * Since: 1.0</span> +<a id="line-1129" name="line-1129"></a><span class="cm"> */</span> +<a id="line-1130" name="line-1130"></a><span class="n">GdictSourceTransport</span> +<a id="line-1131" name="line-1131"></a><span class="nf">gdict_source_get_transport</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">)</span> +<a id="line-1132" name="line-1132"></a><span class="p">{</span> +<a id="line-1133" name="line-1133"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span><span class="w"> </span><span class="n">GDICT_SOURCE_TRANSPORT_INVALID</span><span class="p">);</span> +<a id="line-1134" name="line-1134"></a> +<a id="line-1135" name="line-1135"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="p">;</span> +<a id="line-1136" name="line-1136"></a><span class="p">}</span> +<a id="line-1137" name="line-1137"></a> +<a id="line-1138" name="line-1138"></a><span class="cm">/**</span> +<a id="line-1139" name="line-1139"></a><span class="cm"> * gdict_source_get_context:</span> +<a id="line-1140" name="line-1140"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-1141" name="line-1141"></a><span class="cm"> *</span> +<a id="line-1142" name="line-1142"></a><span class="cm"> * Gets the #GdictContext bound to @source.</span> +<a id="line-1143" name="line-1143"></a><span class="cm"> *</span> +<a id="line-1144" name="line-1144"></a><span class="cm"> * Return value: a #GdictContext for @source. Use g_object_unref()</span> +<a id="line-1145" name="line-1145"></a><span class="cm"> * when you don't need it anymore.</span> +<a id="line-1146" name="line-1146"></a><span class="cm"> *</span> +<a id="line-1147" name="line-1147"></a><span class="cm"> * Since: 1.0</span> +<a id="line-1148" name="line-1148"></a><span class="cm"> */</span> +<a id="line-1149" name="line-1149"></a><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span> +<a id="line-1150" name="line-1150"></a><span class="nf">gdict_source_get_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">)</span> +<a id="line-1151" name="line-1151"></a><span class="p">{</span> +<a id="line-1152" name="line-1152"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-1153" name="line-1153"></a> +<a id="line-1154" name="line-1154"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1155" name="line-1155"></a> +<a id="line-1156" name="line-1156"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_create_context</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span> +<a id="line-1157" name="line-1157"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="p">,</span> +<a id="line-1158" name="line-1158"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1159" name="line-1159"></a> +<a id="line-1160" name="line-1160"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-1161" name="line-1161"></a><span class="p">}</span> +<a id="line-1162" name="line-1162"></a> +<a id="line-1163" name="line-1163"></a><span class="cm">/**</span> +<a id="line-1164" name="line-1164"></a><span class="cm"> * gdict_source_peek_context:</span> +<a id="line-1165" name="line-1165"></a><span class="cm"> * @source: a #GdictSource</span> +<a id="line-1166" name="line-1166"></a><span class="cm"> *</span> +<a id="line-1167" name="line-1167"></a><span class="cm"> * Gets the #GdictContext bound to @source. The returned object is a</span> +<a id="line-1168" name="line-1168"></a><span class="cm"> * referenced copy of the context held by @source; if you want a different</span> +<a id="line-1169" name="line-1169"></a><span class="cm"> * instance, use gdict_source_get_context().</span> +<a id="line-1170" name="line-1170"></a><span class="cm"> *</span> +<a id="line-1171" name="line-1171"></a><span class="cm"> * Return value: a referenced #GdictContext. Use g_object_unref() when</span> +<a id="line-1172" name="line-1172"></a><span class="cm"> * finished using it.</span> +<a id="line-1173" name="line-1173"></a><span class="cm"> *</span> +<a id="line-1174" name="line-1174"></a><span class="cm"> * Since: 1.0</span> +<a id="line-1175" name="line-1175"></a><span class="cm"> */</span> +<a id="line-1176" name="line-1176"></a><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span> +<a id="line-1177" name="line-1177"></a><span class="nf">gdict_source_peek_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">)</span> +<a id="line-1178" name="line-1178"></a><span class="p">{</span> +<a id="line-1179" name="line-1179"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1180" name="line-1180"></a> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-1182" name="line-1182"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_create_context</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">transport</span><span class="p">,</span> +<a id="line-1184" name="line-1184"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1185" name="line-1185"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-1186" name="line-1186"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/31.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/31.html new file mode 100644 index 00000000..7975729f --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/31.html @@ -0,0 +1,1877 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-dictionary/libgdict/gdict-speller.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gdict-speller.c</p> +<a href="31.html#line-108"> unknownMacro 108</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span> +<span class="normal">533</span> +<span class="normal">534</span> +<span class="normal">535</span> +<span class="normal">536</span> +<span class="normal">537</span> +<span class="normal">538</span> +<span class="normal">539</span> +<span class="normal">540</span> +<span class="normal">541</span> +<span class="normal">542</span> +<span class="normal">543</span> +<span class="normal">544</span> +<span class="normal">545</span> +<span class="normal">546</span> +<span class="normal">547</span> +<span class="normal">548</span> +<span class="normal">549</span> +<span class="normal">550</span> +<span class="normal">551</span> +<span class="normal">552</span> +<span class="normal">553</span> +<span class="normal">554</span> +<span class="normal">555</span> +<span class="normal">556</span> +<span class="normal">557</span> +<span class="normal">558</span> +<span class="normal">559</span> +<span class="normal">560</span> +<span class="normal">561</span> +<span class="normal">562</span> +<span class="normal">563</span> +<span class="normal">564</span> +<span class="normal">565</span> +<span class="normal">566</span> +<span class="normal">567</span> +<span class="normal">568</span> +<span class="normal">569</span> +<span class="normal">570</span> +<span class="normal">571</span> +<span class="normal">572</span> +<span class="normal">573</span> +<span class="normal">574</span> +<span class="normal">575</span> +<span class="normal">576</span> +<span class="normal">577</span> +<span class="normal">578</span> +<span class="normal">579</span> +<span class="normal">580</span> +<span class="normal">581</span> +<span class="normal">582</span> +<span class="normal">583</span> +<span class="normal">584</span> +<span class="normal">585</span> +<span class="normal">586</span> +<span class="normal">587</span> +<span class="normal">588</span> +<span class="normal">589</span> +<span class="normal">590</span> +<span class="normal">591</span> +<span class="normal">592</span> +<span class="normal">593</span> +<span class="normal">594</span> +<span class="normal">595</span> +<span class="normal">596</span> +<span class="normal">597</span> +<span class="normal">598</span> +<span class="normal">599</span> +<span class="normal">600</span> +<span class="normal">601</span> +<span class="normal">602</span> +<span class="normal">603</span> +<span class="normal">604</span> +<span class="normal">605</span> +<span class="normal">606</span> +<span class="normal">607</span> +<span class="normal">608</span> +<span class="normal">609</span> +<span class="normal">610</span> +<span class="normal">611</span> +<span class="normal">612</span> +<span class="normal">613</span> +<span class="normal">614</span> +<span class="normal">615</span> +<span class="normal">616</span> +<span class="normal">617</span> +<span class="normal">618</span> +<span class="normal">619</span> +<span class="normal">620</span> +<span class="normal">621</span> +<span class="normal">622</span> +<span class="normal">623</span> +<span class="normal">624</span> +<span class="normal">625</span> +<span class="normal">626</span> +<span class="normal">627</span> +<span class="normal">628</span> +<span class="normal">629</span> +<span class="normal">630</span> +<span class="normal">631</span> +<span class="normal">632</span> +<span class="normal">633</span> +<span class="normal">634</span> +<span class="normal">635</span> +<span class="normal">636</span> +<span class="normal">637</span> +<span class="normal">638</span> +<span class="normal">639</span> +<span class="normal">640</span> +<span class="normal">641</span> +<span class="normal">642</span> +<span class="normal">643</span> +<span class="normal">644</span> +<span class="normal">645</span> +<span class="normal">646</span> +<span class="normal">647</span> +<span class="normal">648</span> +<span class="normal">649</span> +<span class="normal">650</span> +<span class="normal">651</span> +<span class="normal">652</span> +<span class="normal">653</span> +<span class="normal">654</span> +<span class="normal">655</span> +<span class="normal">656</span> +<span class="normal">657</span> +<span class="normal">658</span> +<span class="normal">659</span> +<span class="normal">660</span> +<span class="normal">661</span> +<span class="normal">662</span> +<span class="normal">663</span> +<span class="normal">664</span> +<span class="normal">665</span> +<span class="normal">666</span> +<span class="normal">667</span> +<span class="normal">668</span> +<span class="normal">669</span> +<span class="normal">670</span> +<span class="normal">671</span> +<span class="normal">672</span> +<span class="normal">673</span> +<span class="normal">674</span> +<span class="normal">675</span> +<span class="normal">676</span> +<span class="normal">677</span> +<span class="normal">678</span> +<span class="normal">679</span> +<span class="normal">680</span> +<span class="normal">681</span> +<span class="normal">682</span> +<span class="normal">683</span> +<span class="normal">684</span> +<span class="normal">685</span> +<span class="normal">686</span> +<span class="normal">687</span> +<span class="normal">688</span> +<span class="normal">689</span> +<span class="normal">690</span> +<span class="normal">691</span> +<span class="normal">692</span> +<span class="normal">693</span> +<span class="normal">694</span> +<span class="normal">695</span> +<span class="normal">696</span> +<span class="normal">697</span> +<span class="normal">698</span> +<span class="normal">699</span> +<span class="normal">700</span> +<span class="normal">701</span> +<span class="normal">702</span> +<span class="normal">703</span> +<span class="normal">704</span> +<span class="normal">705</span> +<span class="normal">706</span> +<span class="normal">707</span> +<span class="normal">708</span> +<span class="normal">709</span> +<span class="normal">710</span> +<span class="normal">711</span> +<span class="normal">712</span> +<span class="normal">713</span> +<span class="normal">714</span> +<span class="normal">715</span> +<span class="normal">716</span> +<span class="normal">717</span> +<span class="normal">718</span> +<span class="normal">719</span> +<span class="normal">720</span> +<span class="normal">721</span> +<span class="normal">722</span> +<span class="normal">723</span> +<span class="normal">724</span> +<span class="normal">725</span> +<span class="normal">726</span> +<span class="normal">727</span> +<span class="normal">728</span> +<span class="normal">729</span> +<span class="normal">730</span> +<span class="normal">731</span> +<span class="normal">732</span> +<span class="normal">733</span> +<span class="normal">734</span> +<span class="normal">735</span> +<span class="normal">736</span> +<span class="normal">737</span> +<span class="normal">738</span> +<span class="normal">739</span> +<span class="normal">740</span> +<span class="normal">741</span> +<span class="normal">742</span> +<span class="normal">743</span> +<span class="normal">744</span> +<span class="normal">745</span> +<span class="normal">746</span> +<span class="normal">747</span> +<span class="normal">748</span> +<span class="normal">749</span> +<span class="normal">750</span> +<span class="normal">751</span> +<span class="normal">752</span> +<span class="normal">753</span> +<span class="normal">754</span> +<span class="normal">755</span> +<span class="normal">756</span> +<span class="normal">757</span> +<span class="normal">758</span> +<span class="normal">759</span> +<span class="normal">760</span> +<span class="normal">761</span> +<span class="normal">762</span> +<span class="normal">763</span> +<span class="normal">764</span> +<span class="normal">765</span> +<span class="normal">766</span> +<span class="normal">767</span> +<span class="normal">768</span> +<span class="normal">769</span> +<span class="normal">770</span> +<span class="normal">771</span> +<span class="normal">772</span> +<span class="normal">773</span> +<span class="normal">774</span> +<span class="normal">775</span> +<span class="normal">776</span> +<span class="normal">777</span> +<span class="normal">778</span> +<span class="normal">779</span> +<span class="normal">780</span> +<span class="normal">781</span> +<span class="normal">782</span> +<span class="normal">783</span> +<span class="normal">784</span> +<span class="normal">785</span> +<span class="normal">786</span> +<span class="normal">787</span> +<span class="normal">788</span> +<span class="normal">789</span> +<span class="normal">790</span> +<span class="normal">791</span> +<span class="normal">792</span> +<span class="normal">793</span> +<span class="normal">794</span> +<span class="normal">795</span> +<span class="normal">796</span> +<span class="normal">797</span> +<span class="normal">798</span> +<span class="normal">799</span> +<span class="normal">800</span> +<span class="normal">801</span> +<span class="normal">802</span> +<span class="normal">803</span> +<span class="normal">804</span> +<span class="normal">805</span> +<span class="normal">806</span> +<span class="normal">807</span> +<span class="normal">808</span> +<span class="normal">809</span> +<span class="normal">810</span> +<span class="normal">811</span> +<span class="normal">812</span> +<span class="normal">813</span> +<span class="normal">814</span> +<span class="normal">815</span> +<span class="normal">816</span> +<span class="normal">817</span> +<span class="normal">818</span> +<span class="normal">819</span> +<span class="normal">820</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2006 Emmanuele Bassi <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cm">/**</span> +<a id="line-21" name="line-21"></a><span class="cm"> * SECTION:gdict-speller</span> +<a id="line-22" name="line-22"></a><span class="cm"> * @short_description: Display matching words</span> +<a id="line-23" name="line-23"></a><span class="cm"> *</span> +<a id="line-24" name="line-24"></a><span class="cm"> * #GdictSpeller is a widget showing a list of words returned by a</span> +<a id="line-25" name="line-25"></a><span class="cm"> * #GdictContext query, using a specific database and a matching strategy.</span> +<a id="line-26" name="line-26"></a><span class="cm"> */</span> +<a id="line-27" name="line-27"></a> +<a id="line-28" name="line-28"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-30" name="line-30"></a><span class="cp">#endif</span> +<a id="line-31" name="line-31"></a> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdarg.h></span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkkeysyms.h></span> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n-lib.h></span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-speller.h"</span> +<a id="line-42" name="line-42"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-utils.h"</span> +<a id="line-43" name="line-43"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-enum-types.h"</span> +<a id="line-44" name="line-44"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-marshal.h"</span> +<a id="line-45" name="line-45"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-debug.h"</span> +<a id="line-46" name="line-46"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-private.h"</span> +<a id="line-47" name="line-47"></a> +<a id="line-48" name="line-48"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_GdictSpellerPrivate</span> +<a id="line-49" name="line-49"></a><span class="p">{</span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">;</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">strategy</span><span class="p">;</span> +<a id="line-53" name="line-53"></a> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">;</span> +<a id="line-55" name="line-55"></a> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">treeview</span><span class="p">;</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">clear_button</span><span class="p">;</span> +<a id="line-58" name="line-58"></a> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">GdkCursor</span><span class="w"> </span><span class="o">*</span><span class="n">busy_cursor</span><span class="p">;</span> +<a id="line-60" name="line-60"></a> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">;</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">results</span><span class="p">;</span> +<a id="line-63" name="line-63"></a> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">start_id</span><span class="p">;</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">end_id</span><span class="p">;</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">match_id</span><span class="p">;</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">error_id</span><span class="p">;</span> +<a id="line-68" name="line-68"></a> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">is_searching</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-70" name="line-70"></a><span class="p">};</span> +<a id="line-71" name="line-71"></a> +<a id="line-72" name="line-72"></a><span class="k">typedef</span><span class="w"> </span><span class="k">enum</span> +<a id="line-73" name="line-73"></a><span class="p">{</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">MATCH_DB</span><span class="p">,</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">MATCH_WORD</span><span class="p">,</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">MATCH_ERROR</span> +<a id="line-77" name="line-77"></a><span class="p">}</span><span class="w"> </span><span class="n">MatchType</span><span class="p">;</span> +<a id="line-78" name="line-78"></a> +<a id="line-79" name="line-79"></a><span class="k">enum</span> +<a id="line-80" name="line-80"></a><span class="p">{</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="n">MATCH_COLUMN_TYPE</span><span class="p">,</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">MATCH_COLUMN_DB_NAME</span><span class="p">,</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">MATCH_COLUMN_WORD</span><span class="p">,</span> +<a id="line-84" name="line-84"></a> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">MATCH_N_COLUMNS</span> +<a id="line-86" name="line-86"></a><span class="p">};</span> +<a id="line-87" name="line-87"></a> +<a id="line-88" name="line-88"></a><span class="k">enum</span> +<a id="line-89" name="line-89"></a><span class="p">{</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">PROP_0</span><span class="p">,</span> +<a id="line-91" name="line-91"></a> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="n">PROP_CONTEXT</span><span class="p">,</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">PROP_WORD</span><span class="p">,</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">PROP_DATABASE</span><span class="p">,</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">PROP_STRATEGY</span><span class="p">,</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">PROP_COUNT</span> +<a id="line-97" name="line-97"></a><span class="p">};</span> +<a id="line-98" name="line-98"></a> +<a id="line-99" name="line-99"></a><span class="k">enum</span> +<a id="line-100" name="line-100"></a><span class="p">{</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">WORD_ACTIVATED</span><span class="p">,</span> +<a id="line-102" name="line-102"></a> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-104" name="line-104"></a><span class="p">};</span> +<a id="line-105" name="line-105"></a> +<a id="line-106" name="line-106"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">speller_signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-107" name="line-107"></a> +<a id="line-108" name="line-108"></a><span class="hll"><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_speller</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_BOX</span><span class="p">)</span><span class="error2"><--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</span> +</span><a id="line-109" name="line-109"></a> +<a id="line-110" name="line-110"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-111" name="line-111"></a><span class="n">set_gdict_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">,</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-113" name="line-113"></a><span class="p">{</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-115" name="line-115"></a> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">));</span> +<a id="line-117" name="line-117"></a> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="p">{</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="p">)</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="p">{</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">SPELLER</span><span class="p">,</span><span class="w"> </span><span class="s">"Removing old context handlers"</span><span class="p">);</span> +<a id="line-124" name="line-124"></a> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="p">);</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">match_id</span><span class="p">);</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">end_id</span><span class="p">);</span> +<a id="line-128" name="line-128"></a> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">end_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">match_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="p">}</span> +<a id="line-133" name="line-133"></a> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="p">)</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="p">{</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="p">);</span> +<a id="line-137" name="line-137"></a> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="p">}</span> +<a id="line-140" name="line-140"></a> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">SPELLER</span><span class="p">,</span><span class="w"> </span><span class="s">"Removing old context"</span><span class="p">);</span> +<a id="line-142" name="line-142"></a> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">));</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="p">}</span> +<a id="line-145" name="line-145"></a> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">context</span><span class="p">)</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-148" name="line-148"></a> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">GDICT_IS_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">))</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="p">{</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Object of type `%s' instead of a GdictContext</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">g_type_name</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">)));</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="p">}</span> +<a id="line-155" name="line-155"></a> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">SPELLER</span><span class="p">,</span><span class="w"> </span><span class="s">"Setting new context</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> +<a id="line-157" name="line-157"></a> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="p">;</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">));</span> +<a id="line-160" name="line-160"></a><span class="p">}</span> +<a id="line-161" name="line-161"></a> +<a id="line-162" name="line-162"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-163" name="line-163"></a><span class="n">gdict_speller_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">gobject</span><span class="p">)</span> +<a id="line-164" name="line-164"></a><span class="p">{</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-167" name="line-167"></a> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">set_gdict_context</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-170" name="line-170"></a> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">)</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">);</span> +<a id="line-173" name="line-173"></a> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-177" name="line-177"></a> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">)</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">);</span> +<a id="line-180" name="line-180"></a> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_speller_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-182" name="line-182"></a><span class="p">}</span> +<a id="line-183" name="line-183"></a> +<a id="line-184" name="line-184"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-185" name="line-185"></a><span class="n">gdict_speller_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">gobject</span><span class="p">,</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-189" name="line-189"></a><span class="p">{</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-192" name="line-192"></a> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="p">{</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_CONTEXT</span><span class="p">:</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="n">set_gdict_context</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DATABASE</span><span class="p">:</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_STRATEGY</span><span class="p">:</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="p">}</span> +<a id="line-210" name="line-210"></a><span class="p">}</span> +<a id="line-211" name="line-211"></a> +<a id="line-212" name="line-212"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-213" name="line-213"></a><span class="n">gdict_speller_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">gobject</span><span class="p">,</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-217" name="line-217"></a><span class="p">{</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-219" name="line-219"></a> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="p">{</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DATABASE</span><span class="p">:</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_STRATEGY</span><span class="p">:</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_CONTEXT</span><span class="p">:</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">g_value_set_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_COUNT</span><span class="p">:</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">g_value_set_int</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">results</span><span class="p">);</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="p">}</span> +<a id="line-237" name="line-237"></a><span class="p">}</span> +<a id="line-238" name="line-238"></a> +<a id="line-239" name="line-239"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-240" name="line-240"></a><span class="n">row_activated_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="n">treeview</span><span class="p">,</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">column</span><span class="p">,</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-244" name="line-244"></a><span class="p">{</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">db_name</span><span class="p">;</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">valid</span><span class="p">;</span> +<a id="line-250" name="line-250"></a> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">valid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">),</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">valid</span><span class="p">)</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="p">{</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Invalid iterator found"</span><span class="p">);</span> +<a id="line-257" name="line-257"></a> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="p">}</span> +<a id="line-260" name="line-260"></a> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">MATCH_COLUMN_WORD</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">word</span><span class="p">,</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">MATCH_COLUMN_DB_NAME</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">db_name</span><span class="p">,</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">)</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">,</span><span class="w"> </span><span class="n">speller_signals</span><span class="p">[</span><span class="n">WORD_ACTIVATED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="n">db_name</span><span class="p">);</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="k">else</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="p">{</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">row</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_path_to_string</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-271" name="line-271"></a> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Row %s activated, but no word attached"</span><span class="p">,</span><span class="w"> </span><span class="n">row</span><span class="p">);</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">row</span><span class="p">);</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="p">}</span> +<a id="line-275" name="line-275"></a> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">db_name</span><span class="p">);</span> +<a id="line-278" name="line-278"></a><span class="p">}</span> +<a id="line-279" name="line-279"></a> +<a id="line-280" name="line-280"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-281" name="line-281"></a><span class="n">clear_button_clicked_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-283" name="line-283"></a><span class="p">{</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-285" name="line-285"></a> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">gdict_speller_clear</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">);</span> +<a id="line-287" name="line-287"></a><span class="p">}</span> +<a id="line-288" name="line-288"></a> +<a id="line-289" name="line-289"></a><span class="k">static</span><span class="w"> </span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span> +<a id="line-290" name="line-290"></a><span class="n">gdict_speller_constructor</span><span class="w"> </span><span class="p">(</span><span class="n">GType</span><span class="w"> </span><span class="n">type</span><span class="p">,</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">n_params</span><span class="p">,</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">GObjectConstructParam</span><span class="w"> </span><span class="o">*</span><span class="n">params</span><span class="p">)</span> +<a id="line-293" name="line-293"></a><span class="p">{</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">;</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">;</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">sw</span><span class="p">;</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="n">renderer</span><span class="p">;</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">column</span><span class="p">;</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hbox</span><span class="p">;</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">object</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_speller_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">constructor</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="p">,</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">n_params</span><span class="p">,</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">params</span><span class="p">);</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-307" name="line-307"></a> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">sw</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_scrolled_window_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">gtk_widget_set_vexpand</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_policy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">),</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">,</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">GTK_POLICY_AUTOMATIC</span><span class="p">);</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">gtk_scrolled_window_set_shadow_type</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SCROLLED_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">),</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">GTK_SHADOW_IN</span><span class="p">);</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="n">sw</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">);</span> +<a id="line-317" name="line-317"></a> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new_with_attributes</span><span class="w"> </span><span class="p">(</span><span class="s">"matches"</span><span class="p">,</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">MATCH_COLUMN_WORD</span><span class="p">,</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-323" name="line-323"></a> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">gtk_tree_view_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">),</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">));</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">gtk_tree_view_set_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">),</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">,</span><span class="w"> </span><span class="s">"row-activated"</span><span class="p">,</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">row_activated_cb</span><span class="p">),</span><span class="w"> </span><span class="n">speller</span><span class="p">);</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">sw</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">);</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">);</span> +<a id="line-333" name="line-333"></a> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-335" name="line-335"></a> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">gtk_button_set_image</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="p">),</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"edit-clear"</span><span class="p">,</span> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">GTK_ICON_SIZE_SMALL_TOOLBAR</span><span class="p">));</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">clear_button_clicked_cb</span><span class="p">),</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">speller</span><span class="p">);</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="p">);</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">gtk_widget_set_tooltip_text</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">clear_button</span><span class="p">,</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Clear the list of similar words"</span><span class="p">));</span> +<a id="line-347" name="line-347"></a> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">);</span> +<a id="line-350" name="line-350"></a> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">object</span><span class="p">;</span> +<a id="line-352" name="line-352"></a><span class="p">}</span> +<a id="line-353" name="line-353"></a> +<a id="line-354" name="line-354"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-355" name="line-355"></a><span class="n">gdict_speller_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpellerClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-356" name="line-356"></a><span class="p">{</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">gobject_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-358" name="line-358"></a> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_speller_finalize</span><span class="p">;</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">set_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_speller_set_property</span><span class="p">;</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">get_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_speller_get_property</span><span class="p">;</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">constructor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_speller_constructor</span><span class="p">;</span> +<a id="line-363" name="line-363"></a> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">PROP_CONTEXT</span><span class="p">,</span> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="n">g_param_spec_object</span><span class="w"> </span><span class="p">(</span><span class="s">"context"</span><span class="p">,</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Context"</span><span class="p">),</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The GdictContext object used to get the word definition"</span><span class="p">),</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="n">GDICT_TYPE_CONTEXT</span><span class="p">,</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_CONSTRUCT</span><span class="p">)));</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="n">PROP_DATABASE</span><span class="p">,</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"database"</span><span class="p">,</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Database"</span><span class="p">),</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The database used to query the GdictContext"</span><span class="p">),</span> +<a id="line-376" name="line-376"></a><span class="w"> </span><span class="n">GDICT_DEFAULT_DATABASE</span><span class="p">,</span> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">PROP_DATABASE</span><span class="p">,</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"strategy"</span><span class="p">,</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Strategy"</span><span class="p">),</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The strategy used to query the GdictContext"</span><span class="p">),</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">GDICT_DEFAULT_STRATEGY</span><span class="p">,</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="p">)));</span> +<a id="line-385" name="line-385"></a> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">speller_signals</span><span class="p">[</span><span class="n">WORD_ACTIVATED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"word-activated"</span><span class="p">,</span> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpellerClass</span><span class="p">,</span><span class="w"> </span><span class="n">word_activated</span><span class="p">),</span> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">gdict_marshal_VOID__STRING_STRING</span><span class="p">,</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">);</span> +<a id="line-396" name="line-396"></a><span class="p">}</span> +<a id="line-397" name="line-397"></a> +<a id="line-398" name="line-398"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-399" name="line-399"></a><span class="n">gdict_speller_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">)</span> +<a id="line-400" name="line-400"></a><span class="p">{</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-402" name="line-402"></a> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_speller_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">);</span> +<a id="line-404" name="line-404"></a> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">gtk_orientable_set_orientation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTABLE</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">);</span> +<a id="line-406" name="line-406"></a> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-410" name="line-410"></a> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-413" name="line-413"></a> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_list_store_new</span><span class="w"> </span><span class="p">(</span><span class="n">MATCH_N_COLUMNS</span><span class="p">,</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="n">G_TYPE_INT</span><span class="p">,</span><span class="w"> </span><span class="cm">/* MatchType */</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span><span class="w"> </span><span class="cm">/* db_name */</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="w"> </span><span class="cm">/* word */</span><span class="p">);</span> +<a id="line-418" name="line-418"></a> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">end_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">match_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-423" name="line-423"></a><span class="p">}</span> +<a id="line-424" name="line-424"></a> +<a id="line-425" name="line-425"></a><span class="cm">/**</span> +<a id="line-426" name="line-426"></a><span class="cm"> * gdict_speller_new:</span> +<a id="line-427" name="line-427"></a><span class="cm"> *</span> +<a id="line-428" name="line-428"></a><span class="cm"> * FIXME</span> +<a id="line-429" name="line-429"></a><span class="cm"> *</span> +<a id="line-430" name="line-430"></a><span class="cm"> * Return value: FIXME</span> +<a id="line-431" name="line-431"></a><span class="cm"> *</span> +<a id="line-432" name="line-432"></a><span class="cm"> * Since:</span> +<a id="line-433" name="line-433"></a><span class="cm"> */</span> +<a id="line-434" name="line-434"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-435" name="line-435"></a><span class="n">gdict_speller_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-436" name="line-436"></a><span class="p">{</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_SPELLER</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-438" name="line-438"></a><span class="p">}</span> +<a id="line-439" name="line-439"></a> +<a id="line-440" name="line-440"></a><span class="cm">/**</span> +<a id="line-441" name="line-441"></a><span class="cm"> * gdict_speller_new_with_context:</span> +<a id="line-442" name="line-442"></a><span class="cm"> * @context: a #GdictContext</span> +<a id="line-443" name="line-443"></a><span class="cm"> *</span> +<a id="line-444" name="line-444"></a><span class="cm"> * FIXME</span> +<a id="line-445" name="line-445"></a><span class="cm"> *</span> +<a id="line-446" name="line-446"></a><span class="cm"> * Return value: FIXME</span> +<a id="line-447" name="line-447"></a><span class="cm"> *</span> +<a id="line-448" name="line-448"></a><span class="cm"> * Since:</span> +<a id="line-449" name="line-449"></a><span class="cm"> */</span> +<a id="line-450" name="line-450"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-451" name="line-451"></a><span class="n">gdict_speller_new_with_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-452" name="line-452"></a><span class="p">{</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-454" name="line-454"></a> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_SPELLER</span><span class="p">,</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="s">"context"</span><span class="p">,</span><span class="w"> </span><span class="n">context</span><span class="p">,</span> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-458" name="line-458"></a><span class="p">}</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="cm">/**</span> +<a id="line-461" name="line-461"></a><span class="cm"> * gdict_speller_set_context:</span> +<a id="line-462" name="line-462"></a><span class="cm"> * @speller: a #GdictSpeller</span> +<a id="line-463" name="line-463"></a><span class="cm"> * @context: a #GdictContext</span> +<a id="line-464" name="line-464"></a><span class="cm"> *</span> +<a id="line-465" name="line-465"></a><span class="cm"> * FIXME</span> +<a id="line-466" name="line-466"></a><span class="cm"> *</span> +<a id="line-467" name="line-467"></a><span class="cm"> * Since:</span> +<a id="line-468" name="line-468"></a><span class="cm"> */</span> +<a id="line-469" name="line-469"></a><span class="kt">void</span> +<a id="line-470" name="line-470"></a><span class="n">gdict_speller_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">,</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-472" name="line-472"></a><span class="p">{</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">));</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">GDICT_IS_CONTEXT</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">));</span> +<a id="line-475" name="line-475"></a> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="n">set_gdict_context</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">,</span><span class="w"> </span><span class="n">context</span><span class="p">);</span> +<a id="line-477" name="line-477"></a> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="s">"context"</span><span class="p">);</span> +<a id="line-479" name="line-479"></a><span class="p">}</span> +<a id="line-480" name="line-480"></a> +<a id="line-481" name="line-481"></a><span class="cm">/**</span> +<a id="line-482" name="line-482"></a><span class="cm"> * gdict_speller_get_context:</span> +<a id="line-483" name="line-483"></a><span class="cm"> * @speller: a #GdictSpeller</span> +<a id="line-484" name="line-484"></a><span class="cm"> *</span> +<a id="line-485" name="line-485"></a><span class="cm"> * FIXME</span> +<a id="line-486" name="line-486"></a><span class="cm"> *</span> +<a id="line-487" name="line-487"></a><span class="cm"> * Return value: a #GdictContext</span> +<a id="line-488" name="line-488"></a><span class="cm"> *</span> +<a id="line-489" name="line-489"></a><span class="cm"> * Since:</span> +<a id="line-490" name="line-490"></a><span class="cm"> */</span> +<a id="line-491" name="line-491"></a><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span> +<a id="line-492" name="line-492"></a><span class="n">gdict_speller_get_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">)</span> +<a id="line-493" name="line-493"></a><span class="p">{</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-495" name="line-495"></a> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">;</span> +<a id="line-497" name="line-497"></a><span class="p">}</span> +<a id="line-498" name="line-498"></a> +<a id="line-499" name="line-499"></a><span class="cm">/**</span> +<a id="line-500" name="line-500"></a><span class="cm"> * gdict_speller_set_database:</span> +<a id="line-501" name="line-501"></a><span class="cm"> * @speller: a #GdictSpeller</span> +<a id="line-502" name="line-502"></a><span class="cm"> * @database: FIXME</span> +<a id="line-503" name="line-503"></a><span class="cm"> *</span> +<a id="line-504" name="line-504"></a><span class="cm"> * FIXME</span> +<a id="line-505" name="line-505"></a><span class="cm"> *</span> +<a id="line-506" name="line-506"></a><span class="cm"> * Since:</span> +<a id="line-507" name="line-507"></a><span class="cm"> */</span> +<a id="line-508" name="line-508"></a><span class="kt">void</span> +<a id="line-509" name="line-509"></a><span class="n">gdict_speller_set_database</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">,</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">)</span> +<a id="line-511" name="line-511"></a><span class="p">{</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-513" name="line-513"></a> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">));</span> +<a id="line-515" name="line-515"></a> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-517" name="line-517"></a> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">database</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">database</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFAULT_DATABASE</span><span class="p">;</span> +<a id="line-520" name="line-520"></a> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">database</span><span class="p">);</span> +<a id="line-523" name="line-523"></a> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="s">"database"</span><span class="p">);</span> +<a id="line-525" name="line-525"></a><span class="p">}</span> +<a id="line-526" name="line-526"></a> +<a id="line-527" name="line-527"></a><span class="cm">/**</span> +<a id="line-528" name="line-528"></a><span class="cm"> * gdict_speller_get_database:</span> +<a id="line-529" name="line-529"></a><span class="cm"> * @speller: a #GdictSpeller</span> +<a id="line-530" name="line-530"></a><span class="cm"> *</span> +<a id="line-531" name="line-531"></a><span class="cm"> * FIXME</span> +<a id="line-532" name="line-532"></a><span class="cm"> *</span> +<a id="line-533" name="line-533"></a><span class="cm"> * Return value: FIXME</span> +<a id="line-534" name="line-534"></a><span class="cm"> *</span> +<a id="line-535" name="line-535"></a><span class="cm"> * Since: FIXME</span> +<a id="line-536" name="line-536"></a><span class="cm"> */</span> +<a id="line-537" name="line-537"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-538" name="line-538"></a><span class="n">gdict_speller_get_database</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">)</span> +<a id="line-539" name="line-539"></a><span class="p">{</span> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-541" name="line-541"></a> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">;</span> +<a id="line-543" name="line-543"></a><span class="p">}</span> +<a id="line-544" name="line-544"></a> +<a id="line-545" name="line-545"></a><span class="cm">/**</span> +<a id="line-546" name="line-546"></a><span class="cm"> * gdict_speller_set_strategy:</span> +<a id="line-547" name="line-547"></a><span class="cm"> * @speller: a #GdictSpeller</span> +<a id="line-548" name="line-548"></a><span class="cm"> * @strategy: FIXME</span> +<a id="line-549" name="line-549"></a><span class="cm"> *</span> +<a id="line-550" name="line-550"></a><span class="cm"> * FIXME</span> +<a id="line-551" name="line-551"></a><span class="cm"> *</span> +<a id="line-552" name="line-552"></a><span class="cm"> * Since: FIXME</span> +<a id="line-553" name="line-553"></a><span class="cm"> */</span> +<a id="line-554" name="line-554"></a><span class="kt">void</span> +<a id="line-555" name="line-555"></a><span class="n">gdict_speller_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">,</span> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">strategy</span><span class="p">)</span> +<a id="line-557" name="line-557"></a><span class="p">{</span> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-559" name="line-559"></a> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">));</span> +<a id="line-561" name="line-561"></a> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-563" name="line-563"></a> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">strategy</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">strategy</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_DEFAULT_STRATEGY</span><span class="p">;</span> +<a id="line-566" name="line-566"></a> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">strategy</span><span class="p">);</span> +<a id="line-569" name="line-569"></a> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">g_object_notify</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="s">"strategy"</span><span class="p">);</span> +<a id="line-571" name="line-571"></a><span class="p">}</span> +<a id="line-572" name="line-572"></a> +<a id="line-573" name="line-573"></a><span class="cm">/**</span> +<a id="line-574" name="line-574"></a><span class="cm"> * gdict_speller_get_strategy:</span> +<a id="line-575" name="line-575"></a><span class="cm"> * @speller: a #GdictSpeller</span> +<a id="line-576" name="line-576"></a><span class="cm"> *</span> +<a id="line-577" name="line-577"></a><span class="cm"> * FIXME</span> +<a id="line-578" name="line-578"></a><span class="cm"> *</span> +<a id="line-579" name="line-579"></a><span class="cm"> * Return value: FIXME</span> +<a id="line-580" name="line-580"></a><span class="cm"> *</span> +<a id="line-581" name="line-581"></a><span class="cm"> * Since: FIXME</span> +<a id="line-582" name="line-582"></a><span class="cm"> */</span> +<a id="line-583" name="line-583"></a><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-584" name="line-584"></a><span class="n">gdict_speller_get_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">)</span> +<a id="line-585" name="line-585"></a><span class="p">{</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-587" name="line-587"></a> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">;</span> +<a id="line-589" name="line-589"></a><span class="p">}</span> +<a id="line-590" name="line-590"></a> +<a id="line-591" name="line-591"></a><span class="cm">/**</span> +<a id="line-592" name="line-592"></a><span class="cm"> * gdict_speller_clear:</span> +<a id="line-593" name="line-593"></a><span class="cm"> * @speller: a #GdictSpeller</span> +<a id="line-594" name="line-594"></a><span class="cm"> *</span> +<a id="line-595" name="line-595"></a><span class="cm"> * FIXME</span> +<a id="line-596" name="line-596"></a><span class="cm"> *</span> +<a id="line-597" name="line-597"></a><span class="cm"> * Since: FIXME</span> +<a id="line-598" name="line-598"></a><span class="cm"> */</span> +<a id="line-599" name="line-599"></a><span class="kt">void</span> +<a id="line-600" name="line-600"></a><span class="n">gdict_speller_clear</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">)</span> +<a id="line-601" name="line-601"></a><span class="p">{</span> +<a id="line-602" name="line-602"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-603" name="line-603"></a> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">));</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-606" name="line-606"></a> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">gtk_tree_view_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-608" name="line-608"></a> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">gtk_list_store_clear</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">);</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-611" name="line-611"></a> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="n">gtk_tree_view_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">treeview</span><span class="p">),</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">));</span> +<a id="line-614" name="line-614"></a><span class="p">}</span> +<a id="line-615" name="line-615"></a> +<a id="line-616" name="line-616"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-617" name="line-617"></a><span class="n">lookup_start_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-619" name="line-619"></a><span class="p">{</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-622" name="line-622"></a> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">)</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="p">{</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">));</span> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_WATCH</span><span class="p">);</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="p">}</span> +<a id="line-628" name="line-628"></a> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">)))</span> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">)),</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">);</span> +<a id="line-631" name="line-631"></a> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_searching</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-633" name="line-633"></a><span class="p">}</span> +<a id="line-634" name="line-634"></a> +<a id="line-635" name="line-635"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-636" name="line-636"></a><span class="n">lookup_end_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-638" name="line-638"></a><span class="p">{</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-640" name="line-640"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-641" name="line-641"></a> +<a id="line-642" name="line-642"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">)))</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">)),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-644" name="line-644"></a> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-647" name="line-647"></a> +<a id="line-648" name="line-648"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_searching</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-649" name="line-649"></a><span class="p">}</span> +<a id="line-650" name="line-650"></a> +<a id="line-651" name="line-651"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-652" name="line-652"></a><span class="n">match_found_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="n">GdictMatch</span><span class="w"> </span><span class="o">*</span><span class="n">match</span><span class="p">,</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-655" name="line-655"></a><span class="p">{</span> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-659" name="line-659"></a> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="n">GDICT_NOTE</span><span class="w"> </span><span class="p">(</span><span class="n">SPELLER</span><span class="p">,</span><span class="w"> </span><span class="s">"MATCH: `%s' (from `%s')"</span><span class="p">,</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="n">gdict_match_get_word</span><span class="w"> </span><span class="p">(</span><span class="n">match</span><span class="p">),</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="n">gdict_match_get_database</span><span class="w"> </span><span class="p">(</span><span class="n">match</span><span class="p">));</span> +<a id="line-663" name="line-663"></a> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="n">MATCH_COLUMN_TYPE</span><span class="p">,</span><span class="w"> </span><span class="n">MATCH_WORD</span><span class="p">,</span> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="n">MATCH_COLUMN_DB_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_match_get_database</span><span class="w"> </span><span class="p">(</span><span class="n">match</span><span class="p">),</span> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="n">MATCH_COLUMN_WORD</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_match_get_word</span><span class="w"> </span><span class="p">(</span><span class="n">match</span><span class="p">),</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-670" name="line-670"></a> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">results</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">results</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="k">else</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">results</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-675" name="line-675"></a><span class="p">}</span> +<a id="line-676" name="line-676"></a> +<a id="line-677" name="line-677"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-678" name="line-678"></a><span class="n">error_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">,</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-681" name="line-681"></a><span class="p">{</span> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-684" name="line-684"></a> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="n">gdict_speller_clear</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">);</span> +<a id="line-686" name="line-686"></a> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">)))</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">)),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-689" name="line-689"></a> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-692" name="line-692"></a> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">is_searching</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-694" name="line-694"></a><span class="p">}</span> +<a id="line-695" name="line-695"></a> +<a id="line-696" name="line-696"></a><span class="cm">/**</span> +<a id="line-697" name="line-697"></a><span class="cm"> * gdict_speller_match:</span> +<a id="line-698" name="line-698"></a><span class="cm"> * @speller: a #GdictSpeller</span> +<a id="line-699" name="line-699"></a><span class="cm"> * @word: FIXME</span> +<a id="line-700" name="line-700"></a><span class="cm"> *</span> +<a id="line-701" name="line-701"></a><span class="cm"> * FIXME</span> +<a id="line-702" name="line-702"></a><span class="cm"> *</span> +<a id="line-703" name="line-703"></a><span class="cm"> * Since: FIXME</span> +<a id="line-704" name="line-704"></a><span class="cm"> */</span> +<a id="line-705" name="line-705"></a><span class="kt">void</span> +<a id="line-706" name="line-706"></a><span class="n">gdict_speller_match</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">,</span> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">)</span> +<a id="line-708" name="line-708"></a><span class="p">{</span> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="n">GdictSpellerPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">match_error</span><span class="p">;</span> +<a id="line-711" name="line-711"></a> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">));</span> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-714" name="line-714"></a> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-716" name="line-716"></a> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="p">{</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Attempting to match `%s', but no GdictContext "</span> +<a id="line-720" name="line-720"></a><span class="w"> </span><span class="s">"has been set. Use gdict_speller_set_context() "</span> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="s">"before invoking gdict_speller_match()."</span><span class="p">,</span> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="n">word</span><span class="p">);</span> +<a id="line-723" name="line-723"></a> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-725" name="line-725"></a><span class="w"> </span><span class="p">}</span> +<a id="line-726" name="line-726"></a> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">is_searching</span><span class="p">)</span> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="p">{</span> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="n">_gdict_show_error_dialog</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Another search is in progress"</span><span class="p">),</span> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Please wait until the current search ends."</span><span class="p">));</span> +<a id="line-732" name="line-732"></a> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="p">}</span> +<a id="line-735" name="line-735"></a> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="n">gdict_speller_clear</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">);</span> +<a id="line-737" name="line-737"></a> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="p">)</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="p">{</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">start_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-start"</span><span class="p">,</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">lookup_start_cb</span><span class="p">),</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="n">speller</span><span class="p">);</span> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">match_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"match-found"</span><span class="p">,</span> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">match_found_cb</span><span class="p">),</span> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="n">speller</span><span class="p">);</span> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">end_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-end"</span><span class="p">,</span> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">lookup_end_cb</span><span class="p">),</span> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="n">speller</span><span class="p">);</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="p">}</span> +<a id="line-750" name="line-750"></a> +<a id="line-751" name="line-751"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="p">)</span> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">error_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">error_cb</span><span class="p">),</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="n">speller</span><span class="p">);</span> +<a id="line-755" name="line-755"></a> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-758" name="line-758"></a> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="n">match_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="n">gdict_context_match_word</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">context</span><span class="p">,</span> +<a id="line-761" name="line-761"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">database</span><span class="p">,</span> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">strategy</span><span class="p">,</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">,</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="o">&</span><span class="n">match_error</span><span class="p">);</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">match_error</span><span class="p">)</span> +<a id="line-766" name="line-766"></a><span class="w"> </span><span class="p">{</span> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-768" name="line-768"></a> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-770" name="line-770"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="n">MATCH_COLUMN_TYPE</span><span class="p">,</span><span class="w"> </span><span class="n">MATCH_ERROR</span><span class="p">,</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="n">MATCH_COLUMN_DB_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Error while matching"</span><span class="p">),</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="n">MATCH_COLUMN_WORD</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-775" name="line-775"></a> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Error while matching `%s': %s"</span><span class="p">,</span> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">word</span><span class="p">,</span> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="n">match_error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-779" name="line-779"></a> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">match_error</span><span class="p">);</span> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="p">}</span> +<a id="line-782" name="line-782"></a><span class="p">}</span> +<a id="line-783" name="line-783"></a> +<a id="line-784" name="line-784"></a><span class="cm">/**</span> +<a id="line-785" name="line-785"></a><span class="cm"> * gdict_speller_count_match:</span> +<a id="line-786" name="line-786"></a><span class="cm"> * @speller: a #GdictSpeller</span> +<a id="line-787" name="line-787"></a><span class="cm"> *</span> +<a id="line-788" name="line-788"></a><span class="cm"> * FIXME</span> +<a id="line-789" name="line-789"></a><span class="cm"> *</span> +<a id="line-790" name="line-790"></a><span class="cm"> * Return value: FIXME</span> +<a id="line-791" name="line-791"></a><span class="cm"> *</span> +<a id="line-792" name="line-792"></a><span class="cm"> * Since: FIXME</span> +<a id="line-793" name="line-793"></a><span class="cm"> */</span> +<a id="line-794" name="line-794"></a><span class="n">gint</span> +<a id="line-795" name="line-795"></a><span class="n">gdict_speller_count_matches</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">)</span> +<a id="line-796" name="line-796"></a><span class="p">{</span> +<a id="line-797" name="line-797"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-798" name="line-798"></a> +<a id="line-799" name="line-799"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">speller</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">results</span><span class="p">;</span> +<a id="line-800" name="line-800"></a><span class="p">}</span> +<a id="line-801" name="line-801"></a> +<a id="line-802" name="line-802"></a><span class="cm">/**</span> +<a id="line-803" name="line-803"></a><span class="cm"> * gdict_speller_get_matches:</span> +<a id="line-804" name="line-804"></a><span class="cm"> * @speller: a #GdictSpeller</span> +<a id="line-805" name="line-805"></a><span class="cm"> * @length: FIXME</span> +<a id="line-806" name="line-806"></a><span class="cm"> *</span> +<a id="line-807" name="line-807"></a><span class="cm"> * FIXME</span> +<a id="line-808" name="line-808"></a><span class="cm"> *</span> +<a id="line-809" name="line-809"></a><span class="cm"> * Return value: FIXME</span> +<a id="line-810" name="line-810"></a><span class="cm"> *</span> +<a id="line-811" name="line-811"></a><span class="cm"> * Since: FIXME</span> +<a id="line-812" name="line-812"></a><span class="cm"> */</span> +<a id="line-813" name="line-813"></a><span class="n">gchar</span><span class="w"> </span><span class="o">**</span> +<a id="line-814" name="line-814"></a><span class="n">gdict_speller_get_matches</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">,</span> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">length</span><span class="p">)</span> +<a id="line-816" name="line-816"></a><span class="p">{</span> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-818" name="line-818"></a> +<a id="line-819" name="line-819"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-820" name="line-820"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/32.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/32.html new file mode 100644 index 00000000..9beb54ac --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/32.html @@ -0,0 +1,609 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-dictionary/src/gdict-common.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gdict-common.c</p> +<a href="32.html#line-185"> uselessAssignmentPtrArg 185</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2005 Emmanuele Bassi</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-22" name="line-22"></a><span class="cp">#endif</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-27" name="line-27"></a> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><sys/types.h></span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><errno.h></span> +<a id="line-30" name="line-30"></a> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gstdio.h></span> +<a id="line-34" name="line-34"></a> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-common.h"</span> +<a id="line-38" name="line-38"></a> +<a id="line-39" name="line-39"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-40" name="line-40"></a><span class="nf">gdict_get_data_dir</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-41" name="line-41"></a><span class="p">{</span> +<a id="line-42" name="line-42"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_build_filename</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_user_config_dir</span><span class="w"> </span><span class="p">(),</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="s">"mate"</span><span class="p">,</span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="s">"mate-dictionary"</span><span class="p">,</span> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-48" name="line-48"></a> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-50" name="line-50"></a><span class="p">}</span> +<a id="line-51" name="line-51"></a> +<a id="line-52" name="line-52"></a><span class="cm">/* create the data directory inside $HOME, if it doesn't exist yet */</span> +<a id="line-53" name="line-53"></a><span class="n">gboolean</span> +<a id="line-54" name="line-54"></a><span class="nf">gdict_create_data_dir</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-55" name="line-55"></a><span class="p">{</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">data_dir_name</span><span class="p">;</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">data_dir_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_get_data_dir</span><span class="w"> </span><span class="p">();</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_mkdir_with_parents</span><span class="w"> </span><span class="p">(</span><span class="n">data_dir_name</span><span class="p">,</span><span class="w"> </span><span class="mo">0700</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="p">{</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="cm">/* this is weird, but sometimes there's a "mate-dictionary" file</span> +<a id="line-62" name="line-62"></a><span class="cm"> * inside $HOME/.mate2; see bug #329126.</span> +<a id="line-63" name="line-63"></a><span class="cm"> */</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">errno</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">EEXIST</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">data_dir_name</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_IS_REGULAR</span><span class="p">)))</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="p">{</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">backup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"%s.pre-2-14"</span><span class="p">,</span><span class="w"> </span><span class="n">data_dir_name</span><span class="p">);</span> +<a id="line-68" name="line-68"></a> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_rename</span><span class="w"> </span><span class="p">(</span><span class="n">data_dir_name</span><span class="p">,</span><span class="w"> </span><span class="n">backup</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="p">{</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">error_dialog</span><span class="p">;</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">error_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">GTK_DIALOG_MODAL</span><span class="p">,</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to rename file '%s' to '%s': %s"</span><span class="p">),</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="n">data_dir_name</span><span class="p">,</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="n">backup</span><span class="p">,</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">g_strerror</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="p">));</span> +<a id="line-81" name="line-81"></a> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">));</span> +<a id="line-83" name="line-83"></a> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">);</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">backup</span><span class="p">);</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">data_dir_name</span><span class="p">);</span> +<a id="line-87" name="line-87"></a> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="p">}</span> +<a id="line-90" name="line-90"></a> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">backup</span><span class="p">);</span> +<a id="line-92" name="line-92"></a> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_mkdir_with_parents</span><span class="w"> </span><span class="p">(</span><span class="n">data_dir_name</span><span class="p">,</span><span class="w"> </span><span class="mo">0700</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="p">{</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">error_dialog</span><span class="p">;</span> +<a id="line-96" name="line-96"></a> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">error_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">GTK_DIALOG_MODAL</span><span class="p">,</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to create the data directory '%s': %s"</span><span class="p">),</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">data_dir_name</span><span class="p">,</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">g_strerror</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="p">));</span> +<a id="line-104" name="line-104"></a> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">));</span> +<a id="line-106" name="line-106"></a> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">);</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">data_dir_name</span><span class="p">);</span> +<a id="line-109" name="line-109"></a> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="p">}</span> +<a id="line-112" name="line-112"></a> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">success</span><span class="p">;</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="p">}</span> +<a id="line-115" name="line-115"></a> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">EEXIST</span><span class="p">)</span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="p">{</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">error_dialog</span><span class="p">;</span> +<a id="line-119" name="line-119"></a> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">error_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">GTK_DIALOG_MODAL</span><span class="p">,</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to create the data directory '%s': %s"</span><span class="p">),</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">data_dir_name</span><span class="p">,</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">g_strerror</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="p">));</span> +<a id="line-127" name="line-127"></a> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">));</span> +<a id="line-129" name="line-129"></a> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">);</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">data_dir_name</span><span class="p">);</span> +<a id="line-132" name="line-132"></a> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="p">}</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="p">}</span> +<a id="line-136" name="line-136"></a> +<a id="line-137" name="line-137"></a><span class="nl">success</span><span class="p">:</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">data_dir_name</span><span class="p">);</span> +<a id="line-139" name="line-139"></a> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-141" name="line-141"></a><span class="p">}</span> +<a id="line-142" name="line-142"></a> +<a id="line-143" name="line-143"></a><span class="cm">/* shows an error dialog making it transient for @parent */</span> +<a id="line-144" name="line-144"></a><span class="kt">void</span> +<a id="line-145" name="line-145"></a><span class="nf">gdict_show_error_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">,</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">,</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">detail</span><span class="p">)</span> +<a id="line-148" name="line-148"></a><span class="p">{</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-150" name="line-150"></a> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">((</span><span class="n">parent</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">)));</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-153" name="line-153"></a> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-160" name="line-160"></a> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">detail</span><span class="p">)</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">detail</span><span class="p">);</span> +<a id="line-164" name="line-164"></a> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_window_get_group</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">))</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">gtk_window_group_add_window</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_window_get_group</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-167" name="line-167"></a> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-169" name="line-169"></a> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-171" name="line-171"></a><span class="p">}</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="kt">void</span> +<a id="line-174" name="line-174"></a><span class="nf">gdict_show_gerror_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">,</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">,</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">)</span> +<a id="line-177" name="line-177"></a><span class="p">{</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">((</span><span class="n">parent</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">)));</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">gdict_show_error_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-183" name="line-183"></a> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-185" name="line-185"></a><span class="hll"><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="error2"><--- Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?</span> +</span><a id="line-186" name="line-186"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/33.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/33.html new file mode 100644 index 00000000..984f7aeb --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/33.html @@ -0,0 +1,1815 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-dictionary/src/gdict-pref-dialog.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gdict-pref-dialog.c</p> +<a href="33.html#line-84"> unusedStructMember 84</a><a href="33.html#line-85"> unusedStructMember 85</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span> +<span class="normal">533</span> +<span class="normal">534</span> +<span class="normal">535</span> +<span class="normal">536</span> +<span class="normal">537</span> +<span class="normal">538</span> +<span class="normal">539</span> +<span class="normal">540</span> +<span class="normal">541</span> +<span class="normal">542</span> +<span class="normal">543</span> +<span class="normal">544</span> +<span class="normal">545</span> +<span class="normal">546</span> +<span class="normal">547</span> +<span class="normal">548</span> +<span class="normal">549</span> +<span class="normal">550</span> +<span class="normal">551</span> +<span class="normal">552</span> +<span class="normal">553</span> +<span class="normal">554</span> +<span class="normal">555</span> +<span class="normal">556</span> +<span class="normal">557</span> +<span class="normal">558</span> +<span class="normal">559</span> +<span class="normal">560</span> +<span class="normal">561</span> +<span class="normal">562</span> +<span class="normal">563</span> +<span class="normal">564</span> +<span class="normal">565</span> +<span class="normal">566</span> +<span class="normal">567</span> +<span class="normal">568</span> +<span class="normal">569</span> +<span class="normal">570</span> +<span class="normal">571</span> +<span class="normal">572</span> +<span class="normal">573</span> +<span class="normal">574</span> +<span class="normal">575</span> +<span class="normal">576</span> +<span class="normal">577</span> +<span class="normal">578</span> +<span class="normal">579</span> +<span class="normal">580</span> +<span class="normal">581</span> +<span class="normal">582</span> +<span class="normal">583</span> +<span class="normal">584</span> +<span class="normal">585</span> +<span class="normal">586</span> +<span class="normal">587</span> +<span class="normal">588</span> +<span class="normal">589</span> +<span class="normal">590</span> +<span class="normal">591</span> +<span class="normal">592</span> +<span class="normal">593</span> +<span class="normal">594</span> +<span class="normal">595</span> +<span class="normal">596</span> +<span class="normal">597</span> +<span class="normal">598</span> +<span class="normal">599</span> +<span class="normal">600</span> +<span class="normal">601</span> +<span class="normal">602</span> +<span class="normal">603</span> +<span class="normal">604</span> +<span class="normal">605</span> +<span class="normal">606</span> +<span class="normal">607</span> +<span class="normal">608</span> +<span class="normal">609</span> +<span class="normal">610</span> +<span class="normal">611</span> +<span class="normal">612</span> +<span class="normal">613</span> +<span class="normal">614</span> +<span class="normal">615</span> +<span class="normal">616</span> +<span class="normal">617</span> +<span class="normal">618</span> +<span class="normal">619</span> +<span class="normal">620</span> +<span class="normal">621</span> +<span class="normal">622</span> +<span class="normal">623</span> +<span class="normal">624</span> +<span class="normal">625</span> +<span class="normal">626</span> +<span class="normal">627</span> +<span class="normal">628</span> +<span class="normal">629</span> +<span class="normal">630</span> +<span class="normal">631</span> +<span class="normal">632</span> +<span class="normal">633</span> +<span class="normal">634</span> +<span class="normal">635</span> +<span class="normal">636</span> +<span class="normal">637</span> +<span class="normal">638</span> +<span class="normal">639</span> +<span class="normal">640</span> +<span class="normal">641</span> +<span class="normal">642</span> +<span class="normal">643</span> +<span class="normal">644</span> +<span class="normal">645</span> +<span class="normal">646</span> +<span class="normal">647</span> +<span class="normal">648</span> +<span class="normal">649</span> +<span class="normal">650</span> +<span class="normal">651</span> +<span class="normal">652</span> +<span class="normal">653</span> +<span class="normal">654</span> +<span class="normal">655</span> +<span class="normal">656</span> +<span class="normal">657</span> +<span class="normal">658</span> +<span class="normal">659</span> +<span class="normal">660</span> +<span class="normal">661</span> +<span class="normal">662</span> +<span class="normal">663</span> +<span class="normal">664</span> +<span class="normal">665</span> +<span class="normal">666</span> +<span class="normal">667</span> +<span class="normal">668</span> +<span class="normal">669</span> +<span class="normal">670</span> +<span class="normal">671</span> +<span class="normal">672</span> +<span class="normal">673</span> +<span class="normal">674</span> +<span class="normal">675</span> +<span class="normal">676</span> +<span class="normal">677</span> +<span class="normal">678</span> +<span class="normal">679</span> +<span class="normal">680</span> +<span class="normal">681</span> +<span class="normal">682</span> +<span class="normal">683</span> +<span class="normal">684</span> +<span class="normal">685</span> +<span class="normal">686</span> +<span class="normal">687</span> +<span class="normal">688</span> +<span class="normal">689</span> +<span class="normal">690</span> +<span class="normal">691</span> +<span class="normal">692</span> +<span class="normal">693</span> +<span class="normal">694</span> +<span class="normal">695</span> +<span class="normal">696</span> +<span class="normal">697</span> +<span class="normal">698</span> +<span class="normal">699</span> +<span class="normal">700</span> +<span class="normal">701</span> +<span class="normal">702</span> +<span class="normal">703</span> +<span class="normal">704</span> +<span class="normal">705</span> +<span class="normal">706</span> +<span class="normal">707</span> +<span class="normal">708</span> +<span class="normal">709</span> +<span class="normal">710</span> +<span class="normal">711</span> +<span class="normal">712</span> +<span class="normal">713</span> +<span class="normal">714</span> +<span class="normal">715</span> +<span class="normal">716</span> +<span class="normal">717</span> +<span class="normal">718</span> +<span class="normal">719</span> +<span class="normal">720</span> +<span class="normal">721</span> +<span class="normal">722</span> +<span class="normal">723</span> +<span class="normal">724</span> +<span class="normal">725</span> +<span class="normal">726</span> +<span class="normal">727</span> +<span class="normal">728</span> +<span class="normal">729</span> +<span class="normal">730</span> +<span class="normal">731</span> +<span class="normal">732</span> +<span class="normal">733</span> +<span class="normal">734</span> +<span class="normal">735</span> +<span class="normal">736</span> +<span class="normal">737</span> +<span class="normal">738</span> +<span class="normal">739</span> +<span class="normal">740</span> +<span class="normal">741</span> +<span class="normal">742</span> +<span class="normal">743</span> +<span class="normal">744</span> +<span class="normal">745</span> +<span class="normal">746</span> +<span class="normal">747</span> +<span class="normal">748</span> +<span class="normal">749</span> +<span class="normal">750</span> +<span class="normal">751</span> +<span class="normal">752</span> +<span class="normal">753</span> +<span class="normal">754</span> +<span class="normal">755</span> +<span class="normal">756</span> +<span class="normal">757</span> +<span class="normal">758</span> +<span class="normal">759</span> +<span class="normal">760</span> +<span class="normal">761</span> +<span class="normal">762</span> +<span class="normal">763</span> +<span class="normal">764</span> +<span class="normal">765</span> +<span class="normal">766</span> +<span class="normal">767</span> +<span class="normal">768</span> +<span class="normal">769</span> +<span class="normal">770</span> +<span class="normal">771</span> +<span class="normal">772</span> +<span class="normal">773</span> +<span class="normal">774</span> +<span class="normal">775</span> +<span class="normal">776</span> +<span class="normal">777</span> +<span class="normal">778</span> +<span class="normal">779</span> +<span class="normal">780</span> +<span class="normal">781</span> +<span class="normal">782</span> +<span class="normal">783</span> +<span class="normal">784</span> +<span class="normal">785</span> +<span class="normal">786</span> +<span class="normal">787</span> +<span class="normal">788</span> +<span class="normal">789</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2005 Emmanuele Bassi</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-22" name="line-22"></a><span class="cp">#endif</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><time.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><sys/types.h></span> +<a id="line-29" name="line-29"></a><span class="cp">#ifdef HAVE_UNISTD_H</span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><unistd.h></span> +<a id="line-31" name="line-31"></a><span class="cp">#endif</span> +<a id="line-32" name="line-32"></a> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-35" name="line-35"></a> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-source-dialog.h"</span> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-pref-dialog.h"</span> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-common.h"</span> +<a id="line-39" name="line-39"></a> +<a id="line-40" name="line-40"></a><span class="cp">#define GDICT_PREFERENCES_UI PKGDATADIR "/mate-dictionary-preferences.ui"</span> +<a id="line-41" name="line-41"></a><span class="cp">#define GET_WIDGET(x) (GTK_WIDGET (gtk_builder_get_object (dialog->builder, (x))))</span> +<a id="line-42" name="line-42"></a> +<a id="line-43" name="line-43"></a><span class="cp">#define DEFAULT_MIN_WIDTH 220</span> +<a id="line-44" name="line-44"></a><span class="cp">#define DEFAULT_MIN_HEIGHT 330</span> +<a id="line-45" name="line-45"></a> +<a id="line-46" name="line-46"></a><span class="cm">/*******************</span> +<a id="line-47" name="line-47"></a><span class="cm"> * GdictPrefDialog *</span> +<a id="line-48" name="line-48"></a><span class="cm"> *******************/</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">global_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-51" name="line-51"></a> +<a id="line-52" name="line-52"></a><span class="k">enum</span> +<a id="line-53" name="line-53"></a><span class="p">{</span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">SOURCES_ACTIVE_COLUMN</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">SOURCES_NAME_COLUMN</span><span class="p">,</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">SOURCES_DESCRIPTION_COLUMN</span><span class="p">,</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">SOURCES_N_COLUMNS</span> +<a id="line-59" name="line-59"></a><span class="p">};</span> +<a id="line-60" name="line-60"></a> +<a id="line-61" name="line-61"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_GdictPrefDialog</span> +<a id="line-62" name="line-62"></a><span class="p">{</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">GtkDialog</span><span class="w"> </span><span class="n">parent_instance</span><span class="p">;</span> +<a id="line-64" name="line-64"></a> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">GtkBuilder</span><span class="w"> </span><span class="o">*</span><span class="n">builder</span><span class="p">;</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="n">settings</span><span class="p">;</span> +<a id="line-68" name="line-68"></a> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">active_source</span><span class="p">;</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">GdictSourceLoader</span><span class="w"> </span><span class="o">*</span><span class="n">loader</span><span class="p">;</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">sources_list</span><span class="p">;</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="cm">/* direct pointers to widgets */</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">notebook</span><span class="p">;</span> +<a id="line-75" name="line-75"></a> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">sources_view</span><span class="p">;</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">sources_add</span><span class="p">;</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">sources_remove</span><span class="p">;</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">sources_edit</span><span class="p">;</span> +<a id="line-80" name="line-80"></a> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">print_font</span><span class="p">;</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">font_button</span><span class="p">;</span> +<a id="line-83" name="line-83"></a> +<a id="line-84" name="line-84"></a><span class="hll"><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">help_button</span><span class="p">;</span><span class="error2"><--- struct member '_GdictPrefDialog::help_button' is never used.</span> +</span><a id="line-85" name="line-85"></a><span class="hll"><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">close_button</span><span class="p">;</span><span class="error2"><--- struct member '_GdictPrefDialog::close_button' is never used.</span> +</span><a id="line-86" name="line-86"></a><span class="p">};</span> +<a id="line-87" name="line-87"></a> +<a id="line-88" name="line-88"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_GdictPrefDialogClass</span> +<a id="line-89" name="line-89"></a><span class="p">{</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">GtkDialogClass</span><span class="w"> </span><span class="n">parent_class</span><span class="p">;</span> +<a id="line-91" name="line-91"></a><span class="p">};</span> +<a id="line-92" name="line-92"></a> +<a id="line-93" name="line-93"></a><span class="k">enum</span> +<a id="line-94" name="line-94"></a><span class="p">{</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">PROP_0</span><span class="p">,</span> +<a id="line-96" name="line-96"></a> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">PROP_SOURCE_LOADER</span> +<a id="line-98" name="line-98"></a><span class="p">};</span> +<a id="line-99" name="line-99"></a> +<a id="line-100" name="line-100"></a><span class="n">G_DEFINE_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">GdictPrefDialog</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_pref_dialog</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_DIALOG</span><span class="p">);</span> +<a id="line-101" name="line-101"></a> +<a id="line-102" name="line-102"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-103" name="line-103"></a><span class="nf">select_active_source_name</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-107" name="line-107"></a><span class="p">{</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_PREF_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">);</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_active</span><span class="p">;</span> +<a id="line-110" name="line-110"></a> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">SOURCES_ACTIVE_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">is_active</span><span class="p">,</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">is_active</span><span class="p">)</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="p">{</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-117" name="line-117"></a> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="p">));</span> +<a id="line-119" name="line-119"></a> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">gtk_tree_selection_select_iter</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-121" name="line-121"></a> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="p">}</span> +<a id="line-124" name="line-124"></a> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-126" name="line-126"></a><span class="p">}</span> +<a id="line-127" name="line-127"></a> +<a id="line-128" name="line-128"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-129" name="line-129"></a><span class="nf">update_sources_view</span><span class="w"> </span><span class="p">(</span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-130" name="line-130"></a><span class="p">{</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">sources</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-132" name="line-132"></a> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">gtk_tree_view_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-134" name="line-134"></a> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">gtk_list_store_clear</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">);</span> +<a id="line-136" name="line-136"></a> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="cm">/* force update of the sources list */</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">gdict_source_loader_update</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-139" name="line-139"></a> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">sources</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_loader_get_sources</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sources</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="p">{</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SOURCE</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">description</span><span class="p">;</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_active</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-147" name="line-147"></a> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_description</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">description</span><span class="p">)</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">name</span><span class="p">;</span> +<a id="line-152" name="line-152"></a> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">active_source</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">is_active</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-155" name="line-155"></a> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">SOURCES_ACTIVE_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="n">is_active</span><span class="p">,</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">SOURCES_NAME_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">,</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">SOURCES_DESCRIPTION_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="n">description</span><span class="p">,</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="p">}</span> +<a id="line-163" name="line-163"></a> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">gtk_tree_view_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="p">),</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">));</span> +<a id="line-166" name="line-166"></a> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="cm">/* select the currently active source name */</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">gtk_tree_model_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">),</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">select_active_source_name</span><span class="p">,</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-171" name="line-171"></a><span class="p">}</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-174" name="line-174"></a><span class="nf">source_renderer_toggled_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkCellRendererToggle</span><span class="w"> </span><span class="o">*</span><span class="n">renderer</span><span class="p">,</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-177" name="line-177"></a><span class="p">{</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">treepath</span><span class="p">;</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_active</span><span class="p">;</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-183" name="line-183"></a> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">treepath</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_path_new_from_string</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">),</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">treepath</span><span class="p">);</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">res</span><span class="p">)</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="p">{</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">treepath</span><span class="p">);</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="p">}</span> +<a id="line-194" name="line-194"></a> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="n">SOURCES_NAME_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">SOURCES_ACTIVE_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">is_active</span><span class="p">,</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">is_active</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="p">{</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">active_source</span><span class="p">);</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">active_source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">g_settings_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_SOURCE_KEY</span><span class="p">,</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">active_source</span><span class="p">);</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">update_sources_view</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-206" name="line-206"></a> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="p">}</span> +<a id="line-209" name="line-209"></a> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">treepath</span><span class="p">);</span> +<a id="line-211" name="line-211"></a><span class="p">}</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-214" name="line-214"></a><span class="nf">sources_view_row_activated_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeView</span><span class="w"> </span><span class="o">*</span><span class="n">tree_view</span><span class="p">,</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">tree_path</span><span class="p">,</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">tree_iter</span><span class="p">,</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-218" name="line-218"></a><span class="p">{</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">edit_dialog</span><span class="p">;</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="p">;</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-223" name="line-223"></a> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_model</span><span class="w"> </span><span class="p">(</span><span class="n">tree_view</span><span class="p">);</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">model</span><span class="p">)</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-227" name="line-227"></a> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">tree_path</span><span class="p">))</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-230" name="line-230"></a> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCES_NAME_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">source_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">source_name</span><span class="p">)</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-234" name="line-234"></a> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">edit_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Edit Dictionary Source"</span><span class="p">),</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">GDICT_SOURCE_DIALOG_EDIT</span><span class="p">,</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">source_name</span><span class="p">);</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">edit_dialog</span><span class="p">));</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">edit_dialog</span><span class="p">);</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="p">);</span> +<a id="line-244" name="line-244"></a> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">update_sources_view</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-246" name="line-246"></a><span class="p">}</span> +<a id="line-247" name="line-247"></a> +<a id="line-248" name="line-248"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-249" name="line-249"></a><span class="nf">build_sources_view</span><span class="w"> </span><span class="p">(</span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-250" name="line-250"></a><span class="p">{</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">column</span><span class="p">;</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="n">renderer</span><span class="p">;</span> +<a id="line-253" name="line-253"></a> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">)</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_list_store_new</span><span class="w"> </span><span class="p">(</span><span class="n">SOURCES_N_COLUMNS</span><span class="p">,</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">G_TYPE_BOOLEAN</span><span class="p">,</span><span class="w"> </span><span class="cm">/* active */</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">,</span><span class="w"> </span><span class="cm">/* name */</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="w"> </span><span class="cm">/* description */</span><span class="p">);</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">gtk_tree_sortable_set_sort_column_id</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_SORTABLE</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">),</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">SOURCES_DESCRIPTION_COLUMN</span><span class="p">,</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">GTK_SORT_ASCENDING</span><span class="p">);</span> +<a id="line-264" name="line-264"></a> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_toggle_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">gtk_cell_renderer_toggle_set_radio</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CELL_RENDERER_TOGGLE</span><span class="w"> </span><span class="p">(</span><span class="n">renderer</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">renderer</span><span class="p">,</span><span class="w"> </span><span class="s">"toggled"</span><span class="p">,</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">source_renderer_toggled_cb</span><span class="p">),</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-270" name="line-270"></a> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new_with_attributes</span><span class="w"> </span><span class="p">(</span><span class="s">"active"</span><span class="p">,</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="s">"active"</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCES_ACTIVE_COLUMN</span><span class="p">,</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="p">),</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-276" name="line-276"></a> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">renderer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_renderer_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">column</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_column_new_with_attributes</span><span class="w"> </span><span class="p">(</span><span class="s">"description"</span><span class="p">,</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">renderer</span><span class="p">,</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCES_DESCRIPTION_COLUMN</span><span class="p">,</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">gtk_tree_view_append_column</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="p">),</span><span class="w"> </span><span class="n">column</span><span class="p">);</span> +<a id="line-283" name="line-283"></a> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">gtk_tree_view_set_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">gtk_tree_view_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="p">),</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">));</span> +<a id="line-287" name="line-287"></a> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="p">,</span><span class="w"> </span><span class="s">"row-activated"</span><span class="p">,</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">sources_view_row_activated_cb</span><span class="p">),</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-291" name="line-291"></a><span class="p">}</span> +<a id="line-292" name="line-292"></a> +<a id="line-293" name="line-293"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-294" name="line-294"></a><span class="nf">source_add_clicked_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-296" name="line-296"></a><span class="p">{</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">add_dialog</span><span class="p">;</span> +<a id="line-298" name="line-298"></a> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="n">add_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Add Dictionary Source"</span><span class="p">),</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">GDICT_SOURCE_DIALOG_CREATE</span><span class="p">,</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">add_dialog</span><span class="p">));</span> +<a id="line-306" name="line-306"></a> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">add_dialog</span><span class="p">);</span> +<a id="line-308" name="line-308"></a> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">update_sources_view</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-310" name="line-310"></a><span class="p">}</span> +<a id="line-311" name="line-311"></a> +<a id="line-312" name="line-312"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-313" name="line-313"></a><span class="nf">source_remove_clicked_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-315" name="line-315"></a><span class="p">{</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_selected</span><span class="p">;</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">description</span><span class="p">;</span> +<a id="line-321" name="line-321"></a> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="p">));</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">selection</span><span class="p">)</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-325" name="line-325"></a> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">is_selected</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">is_selected</span><span class="p">)</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-329" name="line-329"></a> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">SOURCES_NAME_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">SOURCES_DESCRIPTION_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">description</span><span class="p">,</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">name</span><span class="p">)</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="k">else</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="p">{</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">confirm_dialog</span><span class="p">;</span> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-340" name="line-340"></a> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">confirm_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">GTK_MESSAGE_WARNING</span><span class="p">,</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">GTK_BUTTONS_NONE</span><span class="p">,</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Remove </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">?"</span><span class="p">),</span><span class="w"> </span><span class="n">description</span><span class="p">);</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">confirm_dialog</span><span class="p">),</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"This will permanently remove the "</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="s">"dictionary source from the list."</span><span class="p">));</span> +<a id="line-349" name="line-349"></a> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">gtk_dialog_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">confirm_dialog</span><span class="p">),</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="s">"gtk-cancel"</span><span class="p">,</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">);</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="n">gtk_dialog_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">confirm_dialog</span><span class="p">),</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="s">"gtk-remove"</span><span class="p">,</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-356" name="line-356"></a> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">confirm_dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-358" name="line-358"></a> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">confirm_dialog</span><span class="p">));</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">)</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="p">{</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">confirm_dialog</span><span class="p">);</span> +<a id="line-363" name="line-363"></a> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="p">}</span> +<a id="line-366" name="line-366"></a> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">confirm_dialog</span><span class="p">);</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="p">}</span> +<a id="line-369" name="line-369"></a> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_source_loader_remove_source</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">))</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">gtk_list_store_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="k">else</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="p">{</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">error_dialog</span><span class="p">;</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to remove source '%s'"</span><span class="p">),</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">description</span><span class="p">);</span> +<a id="line-379" name="line-379"></a> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="n">error_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-386" name="line-386"></a> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">));</span> +<a id="line-388" name="line-388"></a> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">);</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="p">}</span> +<a id="line-391" name="line-391"></a> +<a id="line-392" name="line-392"></a><span class="nl">out</span><span class="p">:</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">description</span><span class="p">);</span> +<a id="line-395" name="line-395"></a> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">update_sources_view</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-397" name="line-397"></a><span class="p">}</span> +<a id="line-398" name="line-398"></a> +<a id="line-399" name="line-399"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-400" name="line-400"></a><span class="nf">source_edit_clicked_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkButton</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">,</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-402" name="line-402"></a><span class="p">{</span> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">GtkTreeSelection</span><span class="w"> </span><span class="o">*</span><span class="n">selection</span><span class="p">;</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">;</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_selected</span><span class="p">;</span> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-408" name="line-408"></a> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">selection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_view_get_selection</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="p">));</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">selection</span><span class="p">)</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-412" name="line-412"></a> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">is_selected</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_selection_get_selected</span><span class="w"> </span><span class="p">(</span><span class="n">selection</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">is_selected</span><span class="p">)</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-416" name="line-416"></a> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">SOURCES_NAME_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">name</span><span class="p">)</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="k">else</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="p">{</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">edit_dialog</span><span class="p">;</span> +<a id="line-423" name="line-423"></a> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">edit_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Edit Dictionary Source"</span><span class="p">),</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">GDICT_SOURCE_DIALOG_EDIT</span><span class="p">,</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">edit_dialog</span><span class="p">));</span> +<a id="line-430" name="line-430"></a> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">edit_dialog</span><span class="p">);</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="p">}</span> +<a id="line-433" name="line-433"></a> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-435" name="line-435"></a> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">update_sources_view</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-437" name="line-437"></a><span class="p">}</span> +<a id="line-438" name="line-438"></a> +<a id="line-439" name="line-439"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-440" name="line-440"></a><span class="nf">set_source_loader</span><span class="w"> </span><span class="p">(</span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">,</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">GdictSourceLoader</span><span class="w"> </span><span class="o">*</span><span class="n">loader</span><span class="p">)</span> +<a id="line-442" name="line-442"></a><span class="p">{</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_list</span><span class="p">)</span> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-445" name="line-445"></a> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">)</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-448" name="line-448"></a> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">loader</span><span class="p">);</span> +<a id="line-450" name="line-450"></a> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="n">update_sources_view</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-452" name="line-452"></a><span class="p">}</span> +<a id="line-453" name="line-453"></a> +<a id="line-454" name="line-454"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-455" name="line-455"></a><span class="nf">font_button_font_set_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">font_button</span><span class="p">,</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-457" name="line-457"></a><span class="p">{</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">font</span><span class="p">;</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">font</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_font_chooser_get_font</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FONT_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">font_button</span><span class="p">));</span> +<a id="line-461" name="line-461"></a> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">font</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">font</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">print_font</span><span class="p">,</span><span class="w"> </span><span class="n">font</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="p">{</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">font</span><span class="p">);</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-466" name="line-466"></a><span class="w"> </span><span class="p">}</span> +<a id="line-467" name="line-467"></a> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">print_font</span><span class="p">);</span> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">print_font</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">font</span><span class="p">);</span> +<a id="line-470" name="line-470"></a> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="n">g_settings_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_PRINT_FONT_KEY</span><span class="p">,</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">print_font</span><span class="p">);</span> +<a id="line-472" name="line-472"></a> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">font</span><span class="p">);</span> +<a id="line-474" name="line-474"></a><span class="p">}</span> +<a id="line-475" name="line-475"></a> +<a id="line-476" name="line-476"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-477" name="line-477"></a><span class="nf">response_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">,</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response_id</span><span class="p">,</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-480" name="line-480"></a><span class="p">{</span> +<a id="line-481" name="line-481"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-482" name="line-482"></a> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">response_id</span><span class="p">)</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="p">{</span> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GTK_RESPONSE_HELP</span><span class="p">:</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="n">gtk_show_uri_on_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="s">"help:mate-dictionary/mate-dictionary-preferences"</span><span class="p">,</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">gtk_get_current_event_time</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">)</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="p">{</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">error_dialog</span><span class="p">;</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-493" name="line-493"></a> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"There was an error while displaying help"</span><span class="p">));</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">error_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">),</span> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-503" name="line-503"></a> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">));</span> +<a id="line-505" name="line-505"></a> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">error_dialog</span><span class="p">);</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">);</span> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="p">}</span> +<a id="line-509" name="line-509"></a> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="cm">/* we don't want the dialog to close itself */</span> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="n">g_signal_stop_emission_by_name</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">);</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GTK_RESPONSE_ACCEPT</span><span class="p">:</span> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="p">}</span> +<a id="line-518" name="line-518"></a><span class="p">}</span> +<a id="line-519" name="line-519"></a> +<a id="line-520" name="line-520"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-521" name="line-521"></a><span class="nf">gdict_pref_dialog_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-522" name="line-522"></a><span class="p">{</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_PREF_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-524" name="line-524"></a> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">settings</span><span class="p">)</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">settings</span><span class="p">);</span> +<a id="line-527" name="line-527"></a> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">builder</span><span class="p">)</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">builder</span><span class="p">);</span> +<a id="line-530" name="line-530"></a> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">active_source</span><span class="p">)</span> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">active_source</span><span class="p">);</span> +<a id="line-533" name="line-533"></a> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">)</span> +<a id="line-535" name="line-535"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-536" name="line-536"></a> +<a id="line-537" name="line-537"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_pref_dialog_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-538" name="line-538"></a><span class="p">}</span> +<a id="line-539" name="line-539"></a> +<a id="line-540" name="line-540"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-541" name="line-541"></a><span class="nf">gdict_pref_dialog_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-544" name="line-544"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-545" name="line-545"></a><span class="p">{</span> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_PREF_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-547" name="line-547"></a> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="p">{</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_SOURCE_LOADER</span><span class="p">:</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="n">set_source_loader</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="p">}</span> +<a id="line-557" name="line-557"></a><span class="p">}</span> +<a id="line-558" name="line-558"></a> +<a id="line-559" name="line-559"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-560" name="line-560"></a><span class="nf">gdict_pref_dialog_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-561" name="line-561"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-563" name="line-563"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-564" name="line-564"></a><span class="p">{</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_PREF_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-566" name="line-566"></a> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="p">{</span> +<a id="line-569" name="line-569"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_SOURCE_LOADER</span><span class="p">:</span> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="n">g_value_set_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-571" name="line-571"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="p">}</span> +<a id="line-576" name="line-576"></a><span class="p">}</span> +<a id="line-577" name="line-577"></a> +<a id="line-578" name="line-578"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-579" name="line-579"></a><span class="nf">on_preferences_notebook_scroll_event</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-580" name="line-580"></a><span class="w"> </span><span class="n">GdkEventScroll</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">)</span> +<a id="line-581" name="line-581"></a><span class="p">{</span> +<a id="line-582" name="line-582"></a><span class="w"> </span><span class="n">GtkNotebook</span><span class="w"> </span><span class="o">*</span><span class="n">notebook</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_NOTEBOOK</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">child</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">event_widget</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">action_widget</span><span class="p">;</span> +<a id="line-584" name="line-584"></a> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="n">child</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_notebook_get_nth_page</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_notebook_get_current_page</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">));</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">child</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-587" name="line-587"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-588" name="line-588"></a> +<a id="line-589" name="line-589"></a><span class="w"> </span><span class="n">event_widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_get_event_widget</span><span class="w"> </span><span class="p">((</span><span class="n">GdkEvent</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">event</span><span class="p">);</span> +<a id="line-590" name="line-590"></a> +<a id="line-591" name="line-591"></a><span class="w"> </span><span class="cm">/* Ignore scroll events from the content of the page */</span> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event_widget</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span> +<a id="line-593" name="line-593"></a><span class="w"> </span><span class="n">event_widget</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">child</span><span class="w"> </span><span class="o">||</span> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="n">gtk_widget_is_ancestor</span><span class="w"> </span><span class="p">(</span><span class="n">event_widget</span><span class="p">,</span><span class="w"> </span><span class="n">child</span><span class="p">))</span> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-596" name="line-596"></a> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="cm">/* And also from the action widgets */</span> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="n">action_widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_notebook_get_action_widget</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_PACK_START</span><span class="p">);</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event_widget</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">action_widget</span><span class="w"> </span><span class="o">||</span> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="p">(</span><span class="n">action_widget</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_widget_is_ancestor</span><span class="w"> </span><span class="p">(</span><span class="n">event_widget</span><span class="p">,</span><span class="w"> </span><span class="n">action_widget</span><span class="p">)))</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-602" name="line-602"></a> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="n">action_widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_notebook_get_action_widget</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_PACK_END</span><span class="p">);</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event_widget</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">action_widget</span><span class="w"> </span><span class="o">||</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="p">(</span><span class="n">action_widget</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_widget_is_ancestor</span><span class="w"> </span><span class="p">(</span><span class="n">event_widget</span><span class="p">,</span><span class="w"> </span><span class="n">action_widget</span><span class="p">)))</span> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-607" name="line-607"></a> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">direction</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDK_SCROLL_RIGHT</span><span class="p">:</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDK_SCROLL_DOWN</span><span class="p">:</span> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="n">gtk_notebook_next_page</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">);</span> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDK_SCROLL_LEFT</span><span class="p">:</span> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDK_SCROLL_UP</span><span class="p">:</span> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="n">gtk_notebook_prev_page</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">);</span> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDK_SCROLL_SMOOTH</span><span class="p">:</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_notebook_get_tab_pos</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GTK_POS_LEFT</span><span class="p">:</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GTK_POS_RIGHT</span><span class="p">:</span> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">delta_y</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="n">gtk_notebook_next_page</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">);</span> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">delta_y</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="n">gtk_notebook_prev_page</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">);</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GTK_POS_TOP</span><span class="p">:</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GTK_POS_BOTTOM</span><span class="p">:</span> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">delta_x</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="n">gtk_notebook_next_page</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">);</span> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">delta_x</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="n">gtk_notebook_prev_page</span><span class="w"> </span><span class="p">(</span><span class="n">notebook</span><span class="p">);</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="p">}</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="p">}</span> +<a id="line-636" name="line-636"></a> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-638" name="line-638"></a><span class="p">}</span> +<a id="line-639" name="line-639"></a> +<a id="line-640" name="line-640"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-641" name="line-641"></a><span class="nf">gdict_pref_dialog_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictPrefDialogClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-642" name="line-642"></a><span class="p">{</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">gobject_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-644" name="line-644"></a> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">set_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_pref_dialog_set_property</span><span class="p">;</span> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">get_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_pref_dialog_get_property</span><span class="p">;</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_pref_dialog_finalize</span><span class="p">;</span> +<a id="line-648" name="line-648"></a> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="n">PROP_SOURCE_LOADER</span><span class="p">,</span> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="n">g_param_spec_object</span><span class="w"> </span><span class="p">(</span><span class="s">"source-loader"</span><span class="p">,</span> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="s">"Source Loader"</span><span class="p">,</span> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="s">"The GdictSourceLoader used by the application"</span><span class="p">,</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="n">GDICT_TYPE_SOURCE_LOADER</span><span class="p">,</span> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="p">(</span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_WRITABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_CONSTRUCT_ONLY</span><span class="p">)));</span> +<a id="line-656" name="line-656"></a><span class="p">}</span> +<a id="line-657" name="line-657"></a> +<a id="line-658" name="line-658"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-659" name="line-659"></a><span class="nf">gdict_pref_dialog_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictPrefDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-660" name="line-660"></a><span class="p">{</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">font</span><span class="p">;</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-663" name="line-663"></a> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="n">gtk_window_set_default_size</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="n">DEFAULT_MIN_WIDTH</span><span class="p">,</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="n">DEFAULT_MIN_HEIGHT</span><span class="p">);</span> +<a id="line-667" name="line-667"></a> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-670" name="line-670"></a> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="cm">/* add buttons */</span> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="n">gtk_dialog_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="s">"gtk-help"</span><span class="p">,</span> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="n">GTK_RESPONSE_HELP</span><span class="p">);</span> +<a id="line-675" name="line-675"></a><span class="w"> </span><span class="n">gtk_dialog_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="s">"gtk-close"</span><span class="p">,</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="n">GTK_RESPONSE_ACCEPT</span><span class="p">);</span> +<a id="line-678" name="line-678"></a> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SETTINGS_SCHEMA</span><span class="p">);</span> +<a id="line-680" name="line-680"></a> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="cm">/* get the UI from the GtkBuilder file */</span> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_builder_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">gtk_builder_add_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">builder</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_PREFERENCES_UI</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-684" name="line-684"></a> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="n">g_critical</span><span class="w"> </span><span class="p">(</span><span class="s">"Unable to load the preferences user interface: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="p">}</span> +<a id="line-690" name="line-690"></a> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="cm">/* the main widget */</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))),</span> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"preferences_root"</span><span class="p">));</span> +<a id="line-694" name="line-694"></a> +<a id="line-695" name="line-695"></a><span class="w"> </span><span class="cm">/* keep all the interesting widgets around */</span> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">notebook</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"preferences_notebook"</span><span class="p">);</span> +<a id="line-697" name="line-697"></a> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="n">gtk_widget_add_events</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">notebook</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_SCROLL_MASK</span><span class="p">);</span> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">notebook</span><span class="p">,</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="s">"scroll-event"</span><span class="p">,</span> +<a id="line-701" name="line-701"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_preferences_notebook_scroll_event</span><span class="p">),</span> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-703" name="line-703"></a> +<a id="line-704" name="line-704"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_view</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"sources_treeview"</span><span class="p">);</span> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="n">build_sources_view</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-706" name="line-706"></a> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">active_source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_SOURCE_KEY</span><span class="p">);</span> +<a id="line-708" name="line-708"></a> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_add</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"add_button"</span><span class="p">);</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="n">gtk_widget_set_tooltip_text</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_add</span><span class="p">,</span> +<a id="line-711" name="line-711"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Add a new dictionary source"</span><span class="p">));</span> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_add</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">source_add_clicked_cb</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-714" name="line-714"></a> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_remove</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"remove_button"</span><span class="p">);</span> +<a id="line-716" name="line-716"></a><span class="w"> </span><span class="n">gtk_widget_set_tooltip_text</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_remove</span><span class="p">,</span> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Remove the currently selected dictionary source"</span><span class="p">));</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_remove</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">source_remove_clicked_cb</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-720" name="line-720"></a> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_edit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"edit_button"</span><span class="p">);</span> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="n">gtk_widget_set_tooltip_text</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_edit</span><span class="p">,</span> +<a id="line-723" name="line-723"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Edit the currently selected dictionary source"</span><span class="p">));</span> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">sources_edit</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-725" name="line-725"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">source_edit_clicked_cb</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-726" name="line-726"></a> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="n">font</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_PRINT_FONT_KEY</span><span class="p">);</span> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">font_button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"print_font_button"</span><span class="p">);</span> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="n">gtk_font_chooser_set_font</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FONT_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">font_button</span><span class="p">),</span><span class="w"> </span><span class="n">font</span><span class="p">);</span> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="n">gtk_widget_set_tooltip_text</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">font_button</span><span class="p">,</span> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Set the font used for printing the definitions"</span><span class="p">));</span> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">font_button</span><span class="p">,</span><span class="w"> </span><span class="s">"font-set"</span><span class="p">,</span> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">font_button_font_set_cb</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">font</span><span class="p">);</span> +<a id="line-735" name="line-735"></a> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">notebook</span><span class="p">);</span> +<a id="line-737" name="line-737"></a> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="cm">/* we want to intercept the response signal before any other</span> +<a id="line-739" name="line-739"></a><span class="cm"> * callbacks might be attached by the users of the</span> +<a id="line-740" name="line-740"></a><span class="cm"> * GdictPrefDialog widget.</span> +<a id="line-741" name="line-741"></a><span class="cm"> */</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">response_cb</span><span class="p">),</span> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-745" name="line-745"></a><span class="p">}</span> +<a id="line-746" name="line-746"></a> +<a id="line-747" name="line-747"></a><span class="kt">void</span> +<a id="line-748" name="line-748"></a><span class="nf">gdict_show_pref_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">,</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">title</span><span class="p">,</span> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="n">GdictSourceLoader</span><span class="w"> </span><span class="o">*</span><span class="n">loader</span><span class="p">)</span> +<a id="line-751" name="line-751"></a><span class="p">{</span> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-753" name="line-753"></a> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">));</span> +<a id="line-755" name="line-755"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_LOADER</span><span class="w"> </span><span class="p">(</span><span class="n">loader</span><span class="p">));</span> +<a id="line-756" name="line-756"></a> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-758" name="line-758"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_get_data</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">),</span><span class="w"> </span><span class="s">"gdict-pref-dialog"</span><span class="p">);</span> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="k">else</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">global_dialog</span><span class="p">;</span> +<a id="line-761" name="line-761"></a> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="p">{</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_PREF_DIALOG</span><span class="p">,</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="s">"source-loader"</span><span class="p">,</span><span class="w"> </span><span class="n">loader</span><span class="p">,</span> +<a id="line-766" name="line-766"></a><span class="w"> </span><span class="s">"title"</span><span class="p">,</span><span class="w"> </span><span class="n">title</span><span class="p">,</span> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-768" name="line-768"></a> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="n">g_object_ref_sink</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-770" name="line-770"></a> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"delete-event"</span><span class="p">,</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_hide_on_delete</span><span class="p">),</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-774" name="line-774"></a> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">GTK_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">))</span> +<a id="line-776" name="line-776"></a><span class="w"> </span><span class="p">{</span> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="n">gtk_window_set_transient_for</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">));</span> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="n">gtk_window_set_destroy_with_parent</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="n">g_object_set_data_full</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">),</span><span class="w"> </span><span class="s">"gdict-pref-dialog"</span><span class="p">,</span> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="n">dialog</span><span class="p">,</span> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="p">);</span> +<a id="line-782" name="line-782"></a><span class="w"> </span><span class="p">}</span> +<a id="line-783" name="line-783"></a><span class="w"> </span><span class="k">else</span> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="n">global_dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="p">}</span> +<a id="line-786" name="line-786"></a> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="n">gtk_window_set_screen</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">gtk_widget_get_screen</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">));</span> +<a id="line-788" name="line-788"></a><span class="w"> </span><span class="n">gtk_window_present</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-789" name="line-789"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/34.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/34.html new file mode 100644 index 00000000..778ab01e --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/34.html @@ -0,0 +1,4663 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-dictionary/src/gdict-window.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gdict-window.c</p> +<a href="34.html#line-369"> shadowArgument 369</a><a href="34.html#line-385"> shadowArgument 385</a><a href="34.html#line-1009"> constParameter 1009</a><a href="34.html#line-1681"> variableScope 1681</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span> +<span class="normal">1328</span> +<span class="normal">1329</span> +<span class="normal">1330</span> +<span class="normal">1331</span> +<span class="normal">1332</span> +<span class="normal">1333</span> +<span class="normal">1334</span> +<span class="normal">1335</span> +<span class="normal">1336</span> +<span class="normal">1337</span> +<span class="normal">1338</span> +<span class="normal">1339</span> +<span class="normal">1340</span> +<span class="normal">1341</span> +<span class="normal">1342</span> +<span class="normal">1343</span> +<span class="normal">1344</span> +<span class="normal">1345</span> +<span class="normal">1346</span> +<span class="normal">1347</span> +<span class="normal">1348</span> +<span class="normal">1349</span> +<span class="normal">1350</span> +<span class="normal">1351</span> +<span class="normal">1352</span> +<span class="normal">1353</span> +<span class="normal">1354</span> +<span class="normal">1355</span> +<span class="normal">1356</span> +<span class="normal">1357</span> +<span class="normal">1358</span> +<span class="normal">1359</span> +<span class="normal">1360</span> +<span class="normal">1361</span> +<span class="normal">1362</span> +<span class="normal">1363</span> +<span class="normal">1364</span> +<span class="normal">1365</span> +<span class="normal">1366</span> +<span class="normal">1367</span> +<span class="normal">1368</span> +<span class="normal">1369</span> +<span class="normal">1370</span> +<span class="normal">1371</span> +<span class="normal">1372</span> +<span class="normal">1373</span> +<span class="normal">1374</span> +<span class="normal">1375</span> +<span class="normal">1376</span> +<span class="normal">1377</span> +<span class="normal">1378</span> +<span class="normal">1379</span> +<span class="normal">1380</span> +<span class="normal">1381</span> +<span class="normal">1382</span> +<span class="normal">1383</span> +<span class="normal">1384</span> +<span class="normal">1385</span> +<span class="normal">1386</span> +<span class="normal">1387</span> +<span class="normal">1388</span> +<span class="normal">1389</span> +<span class="normal">1390</span> +<span class="normal">1391</span> +<span class="normal">1392</span> +<span class="normal">1393</span> +<span class="normal">1394</span> +<span class="normal">1395</span> +<span class="normal">1396</span> +<span class="normal">1397</span> +<span class="normal">1398</span> +<span class="normal">1399</span> +<span class="normal">1400</span> +<span class="normal">1401</span> +<span class="normal">1402</span> +<span class="normal">1403</span> +<span class="normal">1404</span> +<span class="normal">1405</span> +<span class="normal">1406</span> +<span class="normal">1407</span> +<span class="normal">1408</span> +<span class="normal">1409</span> +<span class="normal">1410</span> +<span class="normal">1411</span> +<span class="normal">1412</span> +<span class="normal">1413</span> +<span class="normal">1414</span> +<span class="normal">1415</span> +<span class="normal">1416</span> +<span class="normal">1417</span> +<span class="normal">1418</span> +<span class="normal">1419</span> +<span class="normal">1420</span> +<span class="normal">1421</span> +<span class="normal">1422</span> +<span class="normal">1423</span> +<span class="normal">1424</span> +<span class="normal">1425</span> +<span class="normal">1426</span> +<span class="normal">1427</span> +<span class="normal">1428</span> +<span class="normal">1429</span> +<span class="normal">1430</span> +<span class="normal">1431</span> +<span class="normal">1432</span> +<span class="normal">1433</span> +<span class="normal">1434</span> +<span class="normal">1435</span> +<span class="normal">1436</span> +<span class="normal">1437</span> +<span class="normal">1438</span> +<span class="normal">1439</span> +<span class="normal">1440</span> +<span class="normal">1441</span> +<span class="normal">1442</span> +<span class="normal">1443</span> +<span class="normal">1444</span> +<span class="normal">1445</span> +<span class="normal">1446</span> +<span class="normal">1447</span> +<span class="normal">1448</span> +<span class="normal">1449</span> +<span class="normal">1450</span> +<span class="normal">1451</span> +<span class="normal">1452</span> +<span class="normal">1453</span> +<span class="normal">1454</span> +<span class="normal">1455</span> +<span class="normal">1456</span> +<span class="normal">1457</span> +<span class="normal">1458</span> +<span class="normal">1459</span> +<span class="normal">1460</span> +<span class="normal">1461</span> +<span class="normal">1462</span> +<span class="normal">1463</span> +<span class="normal">1464</span> +<span class="normal">1465</span> +<span class="normal">1466</span> +<span class="normal">1467</span> +<span class="normal">1468</span> +<span class="normal">1469</span> +<span class="normal">1470</span> +<span class="normal">1471</span> +<span class="normal">1472</span> +<span class="normal">1473</span> +<span class="normal">1474</span> +<span class="normal">1475</span> +<span class="normal">1476</span> +<span class="normal">1477</span> +<span class="normal">1478</span> +<span class="normal">1479</span> +<span class="normal">1480</span> +<span class="normal">1481</span> +<span class="normal">1482</span> +<span class="normal">1483</span> +<span class="normal">1484</span> +<span class="normal">1485</span> +<span class="normal">1486</span> +<span class="normal">1487</span> +<span class="normal">1488</span> +<span class="normal">1489</span> +<span class="normal">1490</span> +<span class="normal">1491</span> +<span class="normal">1492</span> +<span class="normal">1493</span> +<span class="normal">1494</span> +<span class="normal">1495</span> +<span class="normal">1496</span> +<span class="normal">1497</span> +<span class="normal">1498</span> +<span class="normal">1499</span> +<span class="normal">1500</span> +<span class="normal">1501</span> +<span class="normal">1502</span> +<span class="normal">1503</span> +<span class="normal">1504</span> +<span class="normal">1505</span> +<span class="normal">1506</span> +<span class="normal">1507</span> +<span class="normal">1508</span> +<span class="normal">1509</span> +<span class="normal">1510</span> +<span class="normal">1511</span> +<span class="normal">1512</span> +<span class="normal">1513</span> +<span class="normal">1514</span> +<span class="normal">1515</span> +<span class="normal">1516</span> +<span class="normal">1517</span> +<span class="normal">1518</span> +<span class="normal">1519</span> +<span class="normal">1520</span> +<span class="normal">1521</span> +<span class="normal">1522</span> +<span class="normal">1523</span> +<span class="normal">1524</span> +<span class="normal">1525</span> +<span class="normal">1526</span> +<span class="normal">1527</span> +<span class="normal">1528</span> +<span class="normal">1529</span> +<span class="normal">1530</span> +<span class="normal">1531</span> +<span class="normal">1532</span> +<span class="normal">1533</span> +<span class="normal">1534</span> +<span class="normal">1535</span> +<span class="normal">1536</span> +<span class="normal">1537</span> +<span class="normal">1538</span> +<span class="normal">1539</span> +<span class="normal">1540</span> +<span class="normal">1541</span> +<span class="normal">1542</span> +<span class="normal">1543</span> +<span class="normal">1544</span> +<span class="normal">1545</span> +<span class="normal">1546</span> +<span class="normal">1547</span> +<span class="normal">1548</span> +<span class="normal">1549</span> +<span class="normal">1550</span> +<span class="normal">1551</span> +<span class="normal">1552</span> +<span class="normal">1553</span> +<span class="normal">1554</span> +<span class="normal">1555</span> +<span class="normal">1556</span> +<span class="normal">1557</span> +<span class="normal">1558</span> +<span class="normal">1559</span> +<span class="normal">1560</span> +<span class="normal">1561</span> +<span class="normal">1562</span> +<span class="normal">1563</span> +<span class="normal">1564</span> +<span class="normal">1565</span> +<span class="normal">1566</span> +<span class="normal">1567</span> +<span class="normal">1568</span> +<span class="normal">1569</span> +<span class="normal">1570</span> +<span class="normal">1571</span> +<span class="normal">1572</span> +<span class="normal">1573</span> +<span class="normal">1574</span> +<span class="normal">1575</span> +<span class="normal">1576</span> +<span class="normal">1577</span> +<span class="normal">1578</span> +<span class="normal">1579</span> +<span class="normal">1580</span> +<span class="normal">1581</span> +<span class="normal">1582</span> +<span class="normal">1583</span> +<span class="normal">1584</span> +<span class="normal">1585</span> +<span class="normal">1586</span> +<span class="normal">1587</span> +<span class="normal">1588</span> +<span class="normal">1589</span> +<span class="normal">1590</span> +<span class="normal">1591</span> +<span class="normal">1592</span> +<span class="normal">1593</span> +<span class="normal">1594</span> +<span class="normal">1595</span> +<span class="normal">1596</span> +<span class="normal">1597</span> +<span class="normal">1598</span> +<span class="normal">1599</span> +<span class="normal">1600</span> +<span class="normal">1601</span> +<span class="normal">1602</span> +<span class="normal">1603</span> +<span class="normal">1604</span> +<span class="normal">1605</span> +<span class="normal">1606</span> +<span class="normal">1607</span> +<span class="normal">1608</span> +<span class="normal">1609</span> +<span class="normal">1610</span> +<span class="normal">1611</span> +<span class="normal">1612</span> +<span class="normal">1613</span> +<span class="normal">1614</span> +<span class="normal">1615</span> +<span class="normal">1616</span> +<span class="normal">1617</span> +<span class="normal">1618</span> +<span class="normal">1619</span> +<span class="normal">1620</span> +<span class="normal">1621</span> +<span class="normal">1622</span> +<span class="normal">1623</span> +<span class="normal">1624</span> +<span class="normal">1625</span> +<span class="normal">1626</span> +<span class="normal">1627</span> +<span class="normal">1628</span> +<span class="normal">1629</span> +<span class="normal">1630</span> +<span class="normal">1631</span> +<span class="normal">1632</span> +<span class="normal">1633</span> +<span class="normal">1634</span> +<span class="normal">1635</span> +<span class="normal">1636</span> +<span class="normal">1637</span> +<span class="normal">1638</span> +<span class="normal">1639</span> +<span class="normal">1640</span> +<span class="normal">1641</span> +<span class="normal">1642</span> +<span class="normal">1643</span> +<span class="normal">1644</span> +<span class="normal">1645</span> +<span class="normal">1646</span> +<span class="normal">1647</span> +<span class="normal">1648</span> +<span class="normal">1649</span> +<span class="normal">1650</span> +<span class="normal">1651</span> +<span class="normal">1652</span> +<span class="normal">1653</span> +<span class="normal">1654</span> +<span class="normal">1655</span> +<span class="normal">1656</span> +<span class="normal">1657</span> +<span class="normal">1658</span> +<span class="normal">1659</span> +<span class="normal">1660</span> +<span class="normal">1661</span> +<span class="normal">1662</span> +<span class="normal">1663</span> +<span class="normal">1664</span> +<span class="normal">1665</span> +<span class="normal">1666</span> +<span class="normal">1667</span> +<span class="normal">1668</span> +<span class="normal">1669</span> +<span class="normal">1670</span> +<span class="normal">1671</span> +<span class="normal">1672</span> +<span class="normal">1673</span> +<span class="normal">1674</span> +<span class="normal">1675</span> +<span class="normal">1676</span> +<span class="normal">1677</span> +<span class="normal">1678</span> +<span class="normal">1679</span> +<span class="normal">1680</span> +<span class="normal">1681</span> +<span class="normal">1682</span> +<span class="normal">1683</span> +<span class="normal">1684</span> +<span class="normal">1685</span> +<span class="normal">1686</span> +<span class="normal">1687</span> +<span class="normal">1688</span> +<span class="normal">1689</span> +<span class="normal">1690</span> +<span class="normal">1691</span> +<span class="normal">1692</span> +<span class="normal">1693</span> +<span class="normal">1694</span> +<span class="normal">1695</span> +<span class="normal">1696</span> +<span class="normal">1697</span> +<span class="normal">1698</span> +<span class="normal">1699</span> +<span class="normal">1700</span> +<span class="normal">1701</span> +<span class="normal">1702</span> +<span class="normal">1703</span> +<span class="normal">1704</span> +<span class="normal">1705</span> +<span class="normal">1706</span> +<span class="normal">1707</span> +<span class="normal">1708</span> +<span class="normal">1709</span> +<span class="normal">1710</span> +<span class="normal">1711</span> +<span class="normal">1712</span> +<span class="normal">1713</span> +<span class="normal">1714</span> +<span class="normal">1715</span> +<span class="normal">1716</span> +<span class="normal">1717</span> +<span class="normal">1718</span> +<span class="normal">1719</span> +<span class="normal">1720</span> +<span class="normal">1721</span> +<span class="normal">1722</span> +<span class="normal">1723</span> +<span class="normal">1724</span> +<span class="normal">1725</span> +<span class="normal">1726</span> +<span class="normal">1727</span> +<span class="normal">1728</span> +<span class="normal">1729</span> +<span class="normal">1730</span> +<span class="normal">1731</span> +<span class="normal">1732</span> +<span class="normal">1733</span> +<span class="normal">1734</span> +<span class="normal">1735</span> +<span class="normal">1736</span> +<span class="normal">1737</span> +<span class="normal">1738</span> +<span class="normal">1739</span> +<span class="normal">1740</span> +<span class="normal">1741</span> +<span class="normal">1742</span> +<span class="normal">1743</span> +<span class="normal">1744</span> +<span class="normal">1745</span> +<span class="normal">1746</span> +<span class="normal">1747</span> +<span class="normal">1748</span> +<span class="normal">1749</span> +<span class="normal">1750</span> +<span class="normal">1751</span> +<span class="normal">1752</span> +<span class="normal">1753</span> +<span class="normal">1754</span> +<span class="normal">1755</span> +<span class="normal">1756</span> +<span class="normal">1757</span> +<span class="normal">1758</span> +<span class="normal">1759</span> +<span class="normal">1760</span> +<span class="normal">1761</span> +<span class="normal">1762</span> +<span class="normal">1763</span> +<span class="normal">1764</span> +<span class="normal">1765</span> +<span class="normal">1766</span> +<span class="normal">1767</span> +<span class="normal">1768</span> +<span class="normal">1769</span> +<span class="normal">1770</span> +<span class="normal">1771</span> +<span class="normal">1772</span> +<span class="normal">1773</span> +<span class="normal">1774</span> +<span class="normal">1775</span> +<span class="normal">1776</span> +<span class="normal">1777</span> +<span class="normal">1778</span> +<span class="normal">1779</span> +<span class="normal">1780</span> +<span class="normal">1781</span> +<span class="normal">1782</span> +<span class="normal">1783</span> +<span class="normal">1784</span> +<span class="normal">1785</span> +<span class="normal">1786</span> +<span class="normal">1787</span> +<span class="normal">1788</span> +<span class="normal">1789</span> +<span class="normal">1790</span> +<span class="normal">1791</span> +<span class="normal">1792</span> +<span class="normal">1793</span> +<span class="normal">1794</span> +<span class="normal">1795</span> +<span class="normal">1796</span> +<span class="normal">1797</span> +<span class="normal">1798</span> +<span class="normal">1799</span> +<span class="normal">1800</span> +<span class="normal">1801</span> +<span class="normal">1802</span> +<span class="normal">1803</span> +<span class="normal">1804</span> +<span class="normal">1805</span> +<span class="normal">1806</span> +<span class="normal">1807</span> +<span class="normal">1808</span> +<span class="normal">1809</span> +<span class="normal">1810</span> +<span class="normal">1811</span> +<span class="normal">1812</span> +<span class="normal">1813</span> +<span class="normal">1814</span> +<span class="normal">1815</span> +<span class="normal">1816</span> +<span class="normal">1817</span> +<span class="normal">1818</span> +<span class="normal">1819</span> +<span class="normal">1820</span> +<span class="normal">1821</span> +<span class="normal">1822</span> +<span class="normal">1823</span> +<span class="normal">1824</span> +<span class="normal">1825</span> +<span class="normal">1826</span> +<span class="normal">1827</span> +<span class="normal">1828</span> +<span class="normal">1829</span> +<span class="normal">1830</span> +<span class="normal">1831</span> +<span class="normal">1832</span> +<span class="normal">1833</span> +<span class="normal">1834</span> +<span class="normal">1835</span> +<span class="normal">1836</span> +<span class="normal">1837</span> +<span class="normal">1838</span> +<span class="normal">1839</span> +<span class="normal">1840</span> +<span class="normal">1841</span> +<span class="normal">1842</span> +<span class="normal">1843</span> +<span class="normal">1844</span> +<span class="normal">1845</span> +<span class="normal">1846</span> +<span class="normal">1847</span> +<span class="normal">1848</span> +<span class="normal">1849</span> +<span class="normal">1850</span> +<span class="normal">1851</span> +<span class="normal">1852</span> +<span class="normal">1853</span> +<span class="normal">1854</span> +<span class="normal">1855</span> +<span class="normal">1856</span> +<span class="normal">1857</span> +<span class="normal">1858</span> +<span class="normal">1859</span> +<span class="normal">1860</span> +<span class="normal">1861</span> +<span class="normal">1862</span> +<span class="normal">1863</span> +<span class="normal">1864</span> +<span class="normal">1865</span> +<span class="normal">1866</span> +<span class="normal">1867</span> +<span class="normal">1868</span> +<span class="normal">1869</span> +<span class="normal">1870</span> +<span class="normal">1871</span> +<span class="normal">1872</span> +<span class="normal">1873</span> +<span class="normal">1874</span> +<span class="normal">1875</span> +<span class="normal">1876</span> +<span class="normal">1877</span> +<span class="normal">1878</span> +<span class="normal">1879</span> +<span class="normal">1880</span> +<span class="normal">1881</span> +<span class="normal">1882</span> +<span class="normal">1883</span> +<span class="normal">1884</span> +<span class="normal">1885</span> +<span class="normal">1886</span> +<span class="normal">1887</span> +<span class="normal">1888</span> +<span class="normal">1889</span> +<span class="normal">1890</span> +<span class="normal">1891</span> +<span class="normal">1892</span> +<span class="normal">1893</span> +<span class="normal">1894</span> +<span class="normal">1895</span> +<span class="normal">1896</span> +<span class="normal">1897</span> +<span class="normal">1898</span> +<span class="normal">1899</span> +<span class="normal">1900</span> +<span class="normal">1901</span> +<span class="normal">1902</span> +<span class="normal">1903</span> +<span class="normal">1904</span> +<span class="normal">1905</span> +<span class="normal">1906</span> +<span class="normal">1907</span> +<span class="normal">1908</span> +<span class="normal">1909</span> +<span class="normal">1910</span> +<span class="normal">1911</span> +<span class="normal">1912</span> +<span class="normal">1913</span> +<span class="normal">1914</span> +<span class="normal">1915</span> +<span class="normal">1916</span> +<span class="normal">1917</span> +<span class="normal">1918</span> +<span class="normal">1919</span> +<span class="normal">1920</span> +<span class="normal">1921</span> +<span class="normal">1922</span> +<span class="normal">1923</span> +<span class="normal">1924</span> +<span class="normal">1925</span> +<span class="normal">1926</span> +<span class="normal">1927</span> +<span class="normal">1928</span> +<span class="normal">1929</span> +<span class="normal">1930</span> +<span class="normal">1931</span> +<span class="normal">1932</span> +<span class="normal">1933</span> +<span class="normal">1934</span> +<span class="normal">1935</span> +<span class="normal">1936</span> +<span class="normal">1937</span> +<span class="normal">1938</span> +<span class="normal">1939</span> +<span class="normal">1940</span> +<span class="normal">1941</span> +<span class="normal">1942</span> +<span class="normal">1943</span> +<span class="normal">1944</span> +<span class="normal">1945</span> +<span class="normal">1946</span> +<span class="normal">1947</span> +<span class="normal">1948</span> +<span class="normal">1949</span> +<span class="normal">1950</span> +<span class="normal">1951</span> +<span class="normal">1952</span> +<span class="normal">1953</span> +<span class="normal">1954</span> +<span class="normal">1955</span> +<span class="normal">1956</span> +<span class="normal">1957</span> +<span class="normal">1958</span> +<span class="normal">1959</span> +<span class="normal">1960</span> +<span class="normal">1961</span> +<span class="normal">1962</span> +<span class="normal">1963</span> +<span class="normal">1964</span> +<span class="normal">1965</span> +<span class="normal">1966</span> +<span class="normal">1967</span> +<span class="normal">1968</span> +<span class="normal">1969</span> +<span class="normal">1970</span> +<span class="normal">1971</span> +<span class="normal">1972</span> +<span class="normal">1973</span> +<span class="normal">1974</span> +<span class="normal">1975</span> +<span class="normal">1976</span> +<span class="normal">1977</span> +<span class="normal">1978</span> +<span class="normal">1979</span> +<span class="normal">1980</span> +<span class="normal">1981</span> +<span class="normal">1982</span> +<span class="normal">1983</span> +<span class="normal">1984</span> +<span class="normal">1985</span> +<span class="normal">1986</span> +<span class="normal">1987</span> +<span class="normal">1988</span> +<span class="normal">1989</span> +<span class="normal">1990</span> +<span class="normal">1991</span> +<span class="normal">1992</span> +<span class="normal">1993</span> +<span class="normal">1994</span> +<span class="normal">1995</span> +<span class="normal">1996</span> +<span class="normal">1997</span> +<span class="normal">1998</span> +<span class="normal">1999</span> +<span class="normal">2000</span> +<span class="normal">2001</span> +<span class="normal">2002</span> +<span class="normal">2003</span> +<span class="normal">2004</span> +<span class="normal">2005</span> +<span class="normal">2006</span> +<span class="normal">2007</span> +<span class="normal">2008</span> +<span class="normal">2009</span> +<span class="normal">2010</span> +<span class="normal">2011</span> +<span class="normal">2012</span> +<span class="normal">2013</span> +<span class="normal">2014</span> +<span class="normal">2015</span> +<span class="normal">2016</span> +<span class="normal">2017</span> +<span class="normal">2018</span> +<span class="normal">2019</span> +<span class="normal">2020</span> +<span class="normal">2021</span> +<span class="normal">2022</span> +<span class="normal">2023</span> +<span class="normal">2024</span> +<span class="normal">2025</span> +<span class="normal">2026</span> +<span class="normal">2027</span> +<span class="normal">2028</span> +<span class="normal">2029</span> +<span class="normal">2030</span> +<span class="normal">2031</span> +<span class="normal">2032</span> +<span class="normal">2033</span> +<span class="normal">2034</span> +<span class="normal">2035</span> +<span class="normal">2036</span> +<span class="normal">2037</span> +<span class="normal">2038</span> +<span class="normal">2039</span> +<span class="normal">2040</span> +<span class="normal">2041</span> +<span class="normal">2042</span> +<span class="normal">2043</span> +<span class="normal">2044</span> +<span class="normal">2045</span> +<span class="normal">2046</span> +<span class="normal">2047</span> +<span class="normal">2048</span> +<span class="normal">2049</span> +<span class="normal">2050</span> +<span class="normal">2051</span> +<span class="normal">2052</span> +<span class="normal">2053</span> +<span class="normal">2054</span> +<span class="normal">2055</span> +<span class="normal">2056</span> +<span class="normal">2057</span> +<span class="normal">2058</span> +<span class="normal">2059</span> +<span class="normal">2060</span> +<span class="normal">2061</span> +<span class="normal">2062</span> +<span class="normal">2063</span> +<span class="normal">2064</span> +<span class="normal">2065</span> +<span class="normal">2066</span> +<span class="normal">2067</span> +<span class="normal">2068</span> +<span class="normal">2069</span> +<span class="normal">2070</span> +<span class="normal">2071</span> +<span class="normal">2072</span> +<span class="normal">2073</span> +<span class="normal">2074</span> +<span class="normal">2075</span> +<span class="normal">2076</span> +<span class="normal">2077</span> +<span class="normal">2078</span> +<span class="normal">2079</span> +<span class="normal">2080</span> +<span class="normal">2081</span> +<span class="normal">2082</span> +<span class="normal">2083</span> +<span class="normal">2084</span> +<span class="normal">2085</span> +<span class="normal">2086</span> +<span class="normal">2087</span> +<span class="normal">2088</span> +<span class="normal">2089</span> +<span class="normal">2090</span> +<span class="normal">2091</span> +<span class="normal">2092</span> +<span class="normal">2093</span> +<span class="normal">2094</span> +<span class="normal">2095</span> +<span class="normal">2096</span> +<span class="normal">2097</span> +<span class="normal">2098</span> +<span class="normal">2099</span> +<span class="normal">2100</span> +<span class="normal">2101</span> +<span class="normal">2102</span> +<span class="normal">2103</span> +<span class="normal">2104</span> +<span class="normal">2105</span> +<span class="normal">2106</span> +<span class="normal">2107</span> +<span class="normal">2108</span> +<span class="normal">2109</span> +<span class="normal">2110</span> +<span class="normal">2111</span> +<span class="normal">2112</span> +<span class="normal">2113</span> +<span class="normal">2114</span> +<span class="normal">2115</span> +<span class="normal">2116</span> +<span class="normal">2117</span> +<span class="normal">2118</span> +<span class="normal">2119</span> +<span class="normal">2120</span> +<span class="normal">2121</span> +<span class="normal">2122</span> +<span class="normal">2123</span> +<span class="normal">2124</span> +<span class="normal">2125</span> +<span class="normal">2126</span> +<span class="normal">2127</span> +<span class="normal">2128</span> +<span class="normal">2129</span> +<span class="normal">2130</span> +<span class="normal">2131</span> +<span class="normal">2132</span> +<span class="normal">2133</span> +<span class="normal">2134</span> +<span class="normal">2135</span> +<span class="normal">2136</span> +<span class="normal">2137</span> +<span class="normal">2138</span> +<span class="normal">2139</span> +<span class="normal">2140</span> +<span class="normal">2141</span> +<span class="normal">2142</span> +<span class="normal">2143</span> +<span class="normal">2144</span> +<span class="normal">2145</span> +<span class="normal">2146</span> +<span class="normal">2147</span> +<span class="normal">2148</span> +<span class="normal">2149</span> +<span class="normal">2150</span> +<span class="normal">2151</span> +<span class="normal">2152</span> +<span class="normal">2153</span> +<span class="normal">2154</span> +<span class="normal">2155</span> +<span class="normal">2156</span> +<span class="normal">2157</span> +<span class="normal">2158</span> +<span class="normal">2159</span> +<span class="normal">2160</span> +<span class="normal">2161</span> +<span class="normal">2162</span> +<span class="normal">2163</span> +<span class="normal">2164</span> +<span class="normal">2165</span> +<span class="normal">2166</span> +<span class="normal">2167</span> +<span class="normal">2168</span> +<span class="normal">2169</span> +<span class="normal">2170</span> +<span class="normal">2171</span> +<span class="normal">2172</span> +<span class="normal">2173</span> +<span class="normal">2174</span> +<span class="normal">2175</span> +<span class="normal">2176</span> +<span class="normal">2177</span> +<span class="normal">2178</span> +<span class="normal">2179</span> +<span class="normal">2180</span> +<span class="normal">2181</span> +<span class="normal">2182</span> +<span class="normal">2183</span> +<span class="normal">2184</span> +<span class="normal">2185</span> +<span class="normal">2186</span> +<span class="normal">2187</span> +<span class="normal">2188</span> +<span class="normal">2189</span> +<span class="normal">2190</span> +<span class="normal">2191</span> +<span class="normal">2192</span> +<span class="normal">2193</span> +<span class="normal">2194</span> +<span class="normal">2195</span> +<span class="normal">2196</span> +<span class="normal">2197</span> +<span class="normal">2198</span> +<span class="normal">2199</span> +<span class="normal">2200</span> +<span class="normal">2201</span> +<span class="normal">2202</span> +<span class="normal">2203</span> +<span class="normal">2204</span> +<span class="normal">2205</span> +<span class="normal">2206</span> +<span class="normal">2207</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2005 Emmanuele Bassi</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-22" name="line-22"></a><span class="cp">#endif</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><math.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><errno.h></span> +<a id="line-29" name="line-29"></a> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gstdio.h></span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-34" name="line-34"></a> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><libgdict/gdict.h></span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-sidebar.h"</span> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-print.h"</span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-pref-dialog.h"</span> +<a id="line-40" name="line-40"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-about.h"</span> +<a id="line-41" name="line-41"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-window.h"</span> +<a id="line-42" name="line-42"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gdict-common.h"</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="cp">#define GDICT_WINDOW_COLUMNS 56</span> +<a id="line-45" name="line-45"></a><span class="cp">#define GDICT_WINDOW_ROWS 33</span> +<a id="line-46" name="line-46"></a> +<a id="line-47" name="line-47"></a><span class="cp">#define GDICT_WINDOW_MIN_WIDTH 400</span> +<a id="line-48" name="line-48"></a><span class="cp">#define GDICT_WINDOW_MIN_HEIGHT 330</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="cm">/* sidebar pages logical ids */</span> +<a id="line-51" name="line-51"></a><span class="cp">#define GDICT_SIDEBAR_SPELLER_PAGE "speller"</span> +<a id="line-52" name="line-52"></a><span class="cp">#define GDICT_SIDEBAR_DATABASES_PAGE "db-chooser"</span> +<a id="line-53" name="line-53"></a><span class="cp">#define GDICT_SIDEBAR_STRATEGIES_PAGE "strat-chooser"</span> +<a id="line-54" name="line-54"></a><span class="cp">#define GDICT_SIDEBAR_SOURCES_PAGE "source-chooser"</span> +<a id="line-55" name="line-55"></a> +<a id="line-56" name="line-56"></a><span class="k">enum</span> +<a id="line-57" name="line-57"></a><span class="p">{</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">COMPLETION_TEXT_COLUMN</span><span class="p">,</span> +<a id="line-59" name="line-59"></a> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">COMPLETION_N_COLUMNS</span> +<a id="line-61" name="line-61"></a><span class="p">};</span> +<a id="line-62" name="line-62"></a> +<a id="line-63" name="line-63"></a><span class="k">enum</span> +<a id="line-64" name="line-64"></a><span class="p">{</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">PROP_0</span><span class="p">,</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">PROP_ACTION</span><span class="p">,</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">PROP_SOURCE_LOADER</span><span class="p">,</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">PROP_SOURCE_NAME</span><span class="p">,</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">PROP_DATABASE</span><span class="p">,</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">PROP_STRATEGY</span><span class="p">,</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">PROP_PRINT_FONT</span><span class="p">,</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">PROP_DEFBOX_FONT</span><span class="p">,</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">PROP_WORD</span><span class="p">,</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">PROP_WINDOW_ID</span><span class="p">,</span> +<a id="line-76" name="line-76"></a> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">LAST_PROP</span> +<a id="line-78" name="line-78"></a><span class="p">};</span> +<a id="line-79" name="line-79"></a> +<a id="line-80" name="line-80"></a><span class="k">enum</span> +<a id="line-81" name="line-81"></a><span class="p">{</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">CREATED</span><span class="p">,</span> +<a id="line-83" name="line-83"></a> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">LAST_SIGNAL</span> +<a id="line-85" name="line-85"></a><span class="p">};</span> +<a id="line-86" name="line-86"></a> +<a id="line-87" name="line-87"></a><span class="k">static</span><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">LAST_PROP</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="p">};</span> +<a id="line-88" name="line-88"></a><span class="k">static</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">gdict_window_signals</span><span class="p">[</span><span class="n">LAST_SIGNAL</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">};</span> +<a id="line-89" name="line-89"></a> +<a id="line-90" name="line-90"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GtkTargetEntry</span><span class="w"> </span><span class="n">drop_types</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span> +<a id="line-91" name="line-91"></a><span class="p">{</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"text/plain"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">},</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"TEXT"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">},</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"STRING"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">},</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"UTF8_STRING"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">},</span> +<a id="line-96" name="line-96"></a><span class="p">};</span> +<a id="line-97" name="line-97"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">n_drop_types</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">drop_types</span><span class="p">);</span> +<a id="line-98" name="line-98"></a> +<a id="line-99" name="line-99"></a><span class="n">G_DEFINE_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_WINDOW</span><span class="p">);</span> +<a id="line-100" name="line-100"></a> +<a id="line-101" name="line-101"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-102" name="line-102"></a><span class="nf">gdict_window_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">gobject</span><span class="p">)</span> +<a id="line-103" name="line-103"></a><span class="p">{</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-105" name="line-105"></a> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">print_font</span><span class="p">);</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox_font</span><span class="p">);</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-112" name="line-112"></a> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-114" name="line-114"></a><span class="p">}</span> +<a id="line-115" name="line-115"></a> +<a id="line-116" name="line-116"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-117" name="line-117"></a><span class="nf">gdict_window_dispose</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">gobject</span><span class="p">)</span> +<a id="line-118" name="line-118"></a><span class="p">{</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-120" name="line-120"></a> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">desktop_settings</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="p">{</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">desktop_settings</span><span class="p">);</span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">desktop_settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="p">}</span> +<a id="line-126" name="line-126"></a> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="p">{</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="p">);</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="p">}</span> +<a id="line-132" name="line-132"></a> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="p">{</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">lookup_start_id</span><span class="p">)</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="p">{</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">lookup_start_id</span><span class="p">);</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">definition_id</span><span class="p">);</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">lookup_end_id</span><span class="p">);</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">error_id</span><span class="p">);</span> +<a id="line-141" name="line-141"></a> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">lookup_start_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">definition_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">lookup_end_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">error_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="p">}</span> +<a id="line-147" name="line-147"></a> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="p">}</span> +<a id="line-151" name="line-151"></a> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">)</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="p">{</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="p">}</span> +<a id="line-157" name="line-157"></a> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">)</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="p">{</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">);</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">ui_manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="p">}</span> +<a id="line-163" name="line-163"></a> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">action_group</span><span class="p">)</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="p">{</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">action_group</span><span class="p">);</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">action_group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="p">}</span> +<a id="line-169" name="line-169"></a> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">completion</span><span class="p">)</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="p">{</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">completion</span><span class="p">);</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">completion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="p">}</span> +<a id="line-175" name="line-175"></a> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">completion_model</span><span class="p">)</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="p">{</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">completion_model</span><span class="p">);</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">completion_model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="p">}</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">)</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="p">{</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">);</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">busy_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="p">}</span> +<a id="line-187" name="line-187"></a> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">g_clear_pointer</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_page</span><span class="p">,</span><span class="w"> </span><span class="n">g_free</span><span class="p">);</span> +<a id="line-189" name="line-189"></a> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">dispose</span><span class="w"> </span><span class="p">(</span><span class="n">gobject</span><span class="p">);</span> +<a id="line-191" name="line-191"></a><span class="p">}</span> +<a id="line-192" name="line-192"></a> +<a id="line-193" name="line-193"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">toggle_state</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="s">"save_as_item"</span><span class="p">,</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="s">"preview_item"</span><span class="p">,</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="s">"print_item"</span><span class="p">,</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="s">"go_menu"</span><span class="p">,</span> +<a id="line-198" name="line-198"></a><span class="p">};</span> +<a id="line-199" name="line-199"></a> +<a id="line-200" name="line-200"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">n_toggle_state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">toggle_state</span><span class="p">);</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-203" name="line-203"></a><span class="nf">gdict_window_ensure_menu_state</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-204" name="line-204"></a><span class="p">{</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_sensitive</span><span class="p">;</span> +<a id="line-207" name="line-207"></a> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-209" name="line-209"></a> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">window</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">)</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">is_sensitive</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">!!</span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">n_toggle_state</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="p">{</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-217" name="line-217"></a> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">gtk_builder_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">,</span><span class="w"> </span><span class="n">toggle_state</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">item</span><span class="p">)</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-221" name="line-221"></a> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="n">is_sensitive</span><span class="p">);</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="p">}</span> +<a id="line-224" name="line-224"></a><span class="p">}</span> +<a id="line-225" name="line-225"></a> +<a id="line-226" name="line-226"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-227" name="line-227"></a><span class="nf">gdict_window_set_sidebar_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">is_visible</span><span class="p">)</span> +<a id="line-229" name="line-229"></a><span class="p">{</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-231" name="line-231"></a> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">is_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">!!</span><span class="n">is_visible</span><span class="p">;</span> +<a id="line-233" name="line-233"></a> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">is_visible</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="p">)</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="p">{</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">GAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">;</span> +<a id="line-237" name="line-237"></a> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">is_visible</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-239" name="line-239"></a> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="p">)</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_frame</span><span class="p">);</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="k">else</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_frame</span><span class="p">);</span> +<a id="line-244" name="line-244"></a> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">action</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_action_map_lookup_action</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION_MAP</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">action_group</span><span class="p">),</span><span class="w"> </span><span class="s">"ViewSidebar"</span><span class="p">);</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">g_simple_action_set_state</span><span class="w"> </span><span class="p">(</span><span class="n">G_SIMPLE_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">),</span><span class="w"> </span><span class="n">g_variant_new_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="p">));</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="p">}</span> +<a id="line-248" name="line-248"></a><span class="p">}</span> +<a id="line-249" name="line-249"></a> +<a id="line-250" name="line-250"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-251" name="line-251"></a><span class="nf">gdict_window_definition_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">GdictDefinition</span><span class="w"> </span><span class="o">*</span><span class="n">definition</span><span class="p">,</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-254" name="line-254"></a><span class="p">{</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">total</span><span class="p">,</span><span class="w"> </span><span class="n">n</span><span class="p">;</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">fraction</span><span class="p">;</span> +<a id="line-257" name="line-257"></a> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-259" name="line-259"></a> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">total</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_definition_get_total</span><span class="w"> </span><span class="p">(</span><span class="n">definition</span><span class="p">);</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">current_definition</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-262" name="line-262"></a> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">fraction</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">CLAMP</span><span class="w"> </span><span class="p">(((</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="n">total</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mf">1.0</span><span class="p">);</span> +<a id="line-264" name="line-264"></a> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">gtk_progress_bar_set_fraction</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_PROGRESS_BAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">progress</span><span class="p">),</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">fraction</span><span class="p">);</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-269" name="line-269"></a> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">current_definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n</span><span class="p">;</span> +<a id="line-271" name="line-271"></a><span class="p">}</span> +<a id="line-272" name="line-272"></a> +<a id="line-273" name="line-273"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-274" name="line-274"></a><span class="nf">gdict_window_lookup_start_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-276" name="line-276"></a><span class="p">{</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-279" name="line-279"></a> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-281" name="line-281"></a> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">)</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-284" name="line-284"></a> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">window</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">)</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">busy_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_WATCH</span><span class="p">);</span> +<a id="line-287" name="line-287"></a> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Searching for '%s'..."</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-289" name="line-289"></a> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">)</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">gtk_statusbar_push</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-292" name="line-292"></a> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">progress</span><span class="p">)</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">progress</span><span class="p">);</span> +<a id="line-295" name="line-295"></a> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">max_definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">current_definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">)),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">busy_cursor</span><span class="p">);</span> +<a id="line-301" name="line-301"></a> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">);</span> +<a id="line-303" name="line-303"></a><span class="p">}</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-306" name="line-306"></a><span class="nf">gdict_window_lookup_end_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-308" name="line-308"></a><span class="p">{</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">count</span><span class="p">;</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">;</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">speller_context</span><span class="p">;</span> +<a id="line-314" name="line-314"></a> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">current_definition</span><span class="p">;</span> +<a id="line-316" name="line-316"></a> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">max_definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-318" name="line-318"></a> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"No definitions found"</span><span class="p">));</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="k">else</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">ngettext</span><span class="p">(</span><span class="s">"A definition found"</span><span class="p">,</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="s">"%d definitions found"</span><span class="p">,</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">count</span><span class="p">),</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">count</span><span class="p">);</span> +<a id="line-326" name="line-326"></a> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">)</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">gtk_statusbar_push</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-329" name="line-329"></a> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">progress</span><span class="p">)</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">progress</span><span class="p">);</span> +<a id="line-332" name="line-332"></a> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="cm">/* we clone the context, so that the signals that it</span> +<a id="line-334" name="line-334"></a><span class="cm"> * fires do not get caught by the signal handlers we</span> +<a id="line-335" name="line-335"></a><span class="cm"> * use for getting the definitions.</span> +<a id="line-336" name="line-336"></a><span class="cm"> */</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_loader_get_source</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="n">speller_context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_context</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">gdict_speller_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="n">speller_context</span><span class="p">);</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">speller_context</span><span class="p">);</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-342" name="line-342"></a> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="cm">/* search for similar words; if we have a no-match we already started</span> +<a id="line-344" name="line-344"></a><span class="cm"> * looking in the error signal handler</span> +<a id="line-345" name="line-345"></a><span class="cm"> */</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">)</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="p">{</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="n">gdict_speller_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">gdict_speller_match</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">completion_model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">completion_model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">COMPLETION_TEXT_COLUMN</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">,</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="p">}</span> +<a id="line-355" name="line-355"></a> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">)),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">);</span> +<a id="line-358" name="line-358"></a> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">count</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="p">{</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="p">}</span> +<a id="line-364" name="line-364"></a> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">gdict_window_ensure_menu_state</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-366" name="line-366"></a><span class="p">}</span> +<a id="line-367" name="line-367"></a> +<a id="line-368" name="line-368"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-369" name="line-369"></a><span class="hll"><span class="nf">gdict_window_error_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span><span class="error2"><--- Shadowed declaration</span> +</span><a id="line-370" name="line-370"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">,</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-372" name="line-372"></a><span class="p">{</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">)),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-374" name="line-374"></a> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">)</span> +<a id="line-376" name="line-376"></a><span class="w"> </span><span class="n">gtk_statusbar_push</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"No definitions found"</span><span class="p">));</span> +<a id="line-378" name="line-378"></a> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">progress</span><span class="p">);</span> +<a id="line-380" name="line-380"></a> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="cm">/* launch the speller only on NO_MATCH */</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="o">-></span><span class="n">code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDICT_CONTEXT_ERROR_NO_MATCH</span><span class="p">)</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="p">{</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">;</span> +<a id="line-385" name="line-385"></a><span class="hll"><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span><span class="error2"><--- Shadow variable</span> +</span><a id="line-386" name="line-386"></a> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="n">gdict_window_set_sidebar_visible</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="n">gdict_sidebar_view_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">GDICT_SIDEBAR_SPELLER_PAGE</span><span class="p">);</span> +<a id="line-390" name="line-390"></a> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="cm">/* we clone the context, so that the signals that it</span> +<a id="line-392" name="line-392"></a><span class="cm"> * fires do not get caught by the signal handlers we</span> +<a id="line-393" name="line-393"></a><span class="cm"> * use for getting the definitions.</span> +<a id="line-394" name="line-394"></a><span class="cm"> */</span> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_loader_get_source</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_context</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-398" name="line-398"></a> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">gdict_speller_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">context</span><span class="p">);</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-403" name="line-403"></a> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">gdict_speller_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-406" name="line-406"></a> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">gdict_speller_match</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="p">}</span> +<a id="line-410" name="line-410"></a> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="cm">/* unset the word and update the UI */</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-414" name="line-414"></a> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="n">gdict_window_ensure_menu_state</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-416" name="line-416"></a><span class="p">}</span> +<a id="line-417" name="line-417"></a> +<a id="line-418" name="line-418"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-419" name="line-419"></a><span class="nf">gdict_window_set_database</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">)</span> +<a id="line-421" name="line-421"></a><span class="p">{</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">database</span><span class="p">,</span><span class="w"> </span><span class="n">database</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-424" name="line-424"></a> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-426" name="line-426"></a> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">database</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">database</span><span class="p">);</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="k">else</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_DATABASE_KEY</span><span class="p">);</span> +<a id="line-431" name="line-431"></a> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">)</span> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="n">gdict_defbox_set_database</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-435" name="line-435"></a> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">db_chooser</span><span class="p">)</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">gdict_database_chooser_set_current_database</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DATABASE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">db_chooser</span><span class="p">),</span> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-439" name="line-439"></a> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">g_object_notify_by_pspec</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_DATABASE</span><span class="p">]);</span> +<a id="line-441" name="line-441"></a><span class="p">}</span> +<a id="line-442" name="line-442"></a> +<a id="line-443" name="line-443"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-444" name="line-444"></a><span class="nf">gdict_window_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">strategy</span><span class="p">)</span> +<a id="line-446" name="line-446"></a><span class="p">{</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="p">,</span><span class="w"> </span><span class="n">strategy</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-449" name="line-449"></a> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-451" name="line-451"></a> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strategy</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">*</span><span class="n">strategy</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">strategy</span><span class="p">);</span> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="k">else</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_STRATEGY_KEY</span><span class="p">);</span> +<a id="line-456" name="line-456"></a> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">)</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">gdict_speller_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-460" name="line-460"></a> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strat_chooser</span><span class="p">)</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="n">gdict_strategy_chooser_set_current_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_STRATEGY_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strat_chooser</span><span class="p">),</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-464" name="line-464"></a> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="n">g_object_notify_by_pspec</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_STRATEGY</span><span class="p">]);</span> +<a id="line-466" name="line-466"></a><span class="p">}</span> +<a id="line-467" name="line-467"></a> +<a id="line-468" name="line-468"></a><span class="k">static</span><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span> +<a id="line-469" name="line-469"></a><span class="nf">get_context_from_loader</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-470" name="line-470"></a><span class="p">{</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">;</span> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-473" name="line-473"></a> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">)</span> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFAULT_SOURCE_NAME</span><span class="p">);</span> +<a id="line-476" name="line-476"></a> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_loader_get_source</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">source</span><span class="w"> </span><span class="o">&&</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_DEFAULT_SOURCE_NAME</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-481" name="line-481"></a><span class="w"> </span><span class="p">{</span> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFAULT_SOURCE_NAME</span><span class="p">);</span> +<a id="line-484" name="line-484"></a> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_loader_get_source</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="p">}</span> +<a id="line-488" name="line-488"></a> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">source</span><span class="p">)</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="p">{</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">detail</span><span class="p">;</span> +<a id="line-492" name="line-492"></a> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="n">detail</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"No dictionary source available with name '%s'"</span><span class="p">),</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-495" name="line-495"></a> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="n">gdict_show_error_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to find dictionary source"</span><span class="p">),</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="n">detail</span><span class="p">);</span> +<a id="line-499" name="line-499"></a> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">detail</span><span class="p">);</span> +<a id="line-501" name="line-501"></a> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="p">}</span> +<a id="line-504" name="line-504"></a> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="n">gdict_window_set_database</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_source_get_database</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="n">gdict_window_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_source_get_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-507" name="line-507"></a> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_context</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">retval</span><span class="p">)</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="p">{</span> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">detail</span><span class="p">;</span> +<a id="line-512" name="line-512"></a> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="n">detail</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"No context available for source '%s'"</span><span class="p">),</span> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">gdict_source_get_description</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-515" name="line-515"></a> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="n">gdict_show_error_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to create a context"</span><span class="p">),</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="n">detail</span><span class="p">);</span> +<a id="line-519" name="line-519"></a> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">detail</span><span class="p">);</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-522" name="line-522"></a> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="p">}</span> +<a id="line-525" name="line-525"></a> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-527" name="line-527"></a> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-529" name="line-529"></a><span class="p">}</span> +<a id="line-530" name="line-530"></a> +<a id="line-531" name="line-531"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-532" name="line-532"></a><span class="nf">gdict_window_set_defbox_font</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">defbox_font</span><span class="p">)</span> +<a id="line-534" name="line-534"></a><span class="p">{</span> +<a id="line-535" name="line-535"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox_font</span><span class="p">);</span> +<a id="line-536" name="line-536"></a> +<a id="line-537" name="line-537"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">defbox_font</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">*</span><span class="n">defbox_font</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">defbox_font</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">defbox_font</span><span class="p">);</span> +<a id="line-539" name="line-539"></a><span class="w"> </span><span class="k">else</span> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">defbox_font</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">desktop_settings</span><span class="p">,</span><span class="w"> </span><span class="n">DOCUMENT_FONT_KEY</span><span class="p">);</span> +<a id="line-541" name="line-541"></a> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="n">gdict_defbox_set_font_name</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">defbox_font</span><span class="p">);</span> +<a id="line-543" name="line-543"></a><span class="p">}</span> +<a id="line-544" name="line-544"></a> +<a id="line-545" name="line-545"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-546" name="line-546"></a><span class="nf">gdict_window_set_print_font</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-547" name="line-547"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">print_font</span><span class="p">)</span> +<a id="line-548" name="line-548"></a><span class="p">{</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">print_font</span><span class="p">);</span> +<a id="line-550" name="line-550"></a> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">print_font</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">*</span><span class="n">print_font</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">print_font</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">print_font</span><span class="p">);</span> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="k">else</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">print_font</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_PRINT_FONT_KEY</span><span class="p">);</span> +<a id="line-555" name="line-555"></a><span class="p">}</span> +<a id="line-556" name="line-556"></a> +<a id="line-557" name="line-557"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-558" name="line-558"></a><span class="nf">gdict_window_set_word</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">,</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">database</span><span class="p">)</span> +<a id="line-561" name="line-561"></a><span class="p">{</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">title</span><span class="p">;</span> +<a id="line-563" name="line-563"></a> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-566" name="line-566"></a> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-569" name="line-569"></a><span class="w"> </span><span class="k">else</span> +<a id="line-570" name="line-570"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-571" name="line-571"></a> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">database</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">database</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-573" name="line-573"></a><span class="w"> </span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">database</span><span class="p">;</span> +<a id="line-574" name="line-574"></a> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">)</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"%s - Dictionary"</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="k">else</span> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="n">title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Dictionary"</span><span class="p">));</span> +<a id="line-579" name="line-579"></a> +<a id="line-580" name="line-580"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">title</span><span class="p">);</span> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">title</span><span class="p">);</span> +<a id="line-582" name="line-582"></a> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">)</span> +<a id="line-584" name="line-584"></a><span class="w"> </span><span class="p">{</span> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="n">gdict_defbox_set_database</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">database</span><span class="p">);</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="n">gdict_defbox_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">word</span><span class="p">);</span> +<a id="line-587" name="line-587"></a><span class="w"> </span><span class="p">}</span> +<a id="line-588" name="line-588"></a><span class="p">}</span> +<a id="line-589" name="line-589"></a> +<a id="line-590" name="line-590"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-591" name="line-591"></a><span class="nf">gdict_window_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">)</span> +<a id="line-593" name="line-593"></a><span class="p">{</span> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="p">{</span> +<a id="line-596" name="line-596"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">definition_id</span><span class="p">);</span> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">lookup_start_id</span><span class="p">);</span> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">lookup_end_id</span><span class="p">);</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="n">g_signal_handler_disconnect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">error_id</span><span class="p">);</span> +<a id="line-600" name="line-600"></a> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">definition_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-602" name="line-602"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">lookup_start_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">lookup_end_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">error_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-605" name="line-605"></a> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="p">}</span> +<a id="line-609" name="line-609"></a> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">)</span> +<a id="line-611" name="line-611"></a><span class="w"> </span><span class="n">gdict_defbox_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">context</span><span class="p">);</span> +<a id="line-612" name="line-612"></a> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">db_chooser</span><span class="p">)</span> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="n">gdict_database_chooser_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DATABASE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">db_chooser</span><span class="p">),</span><span class="w"> </span><span class="n">context</span><span class="p">);</span> +<a id="line-615" name="line-615"></a> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strat_chooser</span><span class="p">)</span> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="n">gdict_strategy_chooser_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_STRATEGY_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strat_chooser</span><span class="p">),</span><span class="w"> </span><span class="n">context</span><span class="p">);</span> +<a id="line-618" name="line-618"></a> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">context</span><span class="p">)</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-621" name="line-621"></a> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="cm">/* attach our callbacks */</span> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">definition_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"definition-found"</span><span class="p">,</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_definition_cb</span><span class="p">),</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">lookup_start_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-start"</span><span class="p">,</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_lookup_start_cb</span><span class="p">),</span> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-629" name="line-629"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">lookup_end_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup-end"</span><span class="p">,</span> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_lookup_end_cb</span><span class="p">),</span> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">error_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="s">"error"</span><span class="p">,</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_error_cb</span><span class="p">),</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-635" name="line-635"></a> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="p">;</span> +<a id="line-637" name="line-637"></a><span class="p">}</span> +<a id="line-638" name="line-638"></a> +<a id="line-639" name="line-639"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-640" name="line-640"></a><span class="nf">gdict_window_set_source_name</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="p">)</span> +<a id="line-642" name="line-642"></a><span class="p">{</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-644" name="line-644"></a> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">source_name</span><span class="w"> </span><span class="o">&&</span> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">,</span><span class="w"> </span><span class="n">source_name</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-648" name="line-648"></a> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-650" name="line-650"></a> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">source_name</span><span class="p">);</span> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="k">else</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_SOURCE_KEY</span><span class="p">);</span> +<a id="line-655" name="line-655"></a> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_context_from_loader</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="n">gdict_window_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">context</span><span class="p">);</span> +<a id="line-658" name="line-658"></a> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_chooser</span><span class="p">)</span> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="n">gdict_source_chooser_set_current_source</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_chooser</span><span class="p">),</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-662" name="line-662"></a> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="n">g_object_notify_by_pspec</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_SOURCE_NAME</span><span class="p">]);</span> +<a id="line-664" name="line-664"></a><span class="p">}</span> +<a id="line-665" name="line-665"></a> +<a id="line-666" name="line-666"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-667" name="line-667"></a><span class="nf">gdict_window_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-670" name="line-670"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-671" name="line-671"></a><span class="p">{</span> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-673" name="line-673"></a> +<a id="line-674" name="line-674"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-675" name="line-675"></a><span class="w"> </span><span class="p">{</span> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_ACTION</span><span class="p">:</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">action</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_value_get_enum</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_SOURCE_LOADER</span><span class="p">:</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">)</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_value_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-684" name="line-684"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-685" name="line-685"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_SOURCE_NAME</span><span class="p">:</span> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="n">gdict_window_set_source_name</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-687" name="line-687"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-688" name="line-688"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DATABASE</span><span class="p">:</span> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="n">gdict_window_set_database</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_STRATEGY</span><span class="p">:</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="n">gdict_window_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-694" name="line-694"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_WORD</span><span class="p">:</span> +<a id="line-695" name="line-695"></a><span class="w"> </span><span class="n">gdict_window_set_word</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-697" name="line-697"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_PRINT_FONT</span><span class="p">:</span> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="n">gdict_window_set_print_font</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DEFBOX_FONT</span><span class="p">:</span> +<a id="line-701" name="line-701"></a><span class="w"> </span><span class="n">gdict_window_set_defbox_font</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">g_value_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-703" name="line-703"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-704" name="line-704"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="p">}</span> +<a id="line-707" name="line-707"></a><span class="p">}</span> +<a id="line-708" name="line-708"></a> +<a id="line-709" name="line-709"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-710" name="line-710"></a><span class="nf">gdict_window_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-711" name="line-711"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">)</span> +<a id="line-714" name="line-714"></a><span class="p">{</span> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-716" name="line-716"></a> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span> +<a id="line-718" name="line-718"></a><span class="w"> </span><span class="p">{</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_ACTION</span><span class="p">:</span> +<a id="line-720" name="line-720"></a><span class="w"> </span><span class="n">g_value_set_enum</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">action</span><span class="p">);</span> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_SOURCE_LOADER</span><span class="p">:</span> +<a id="line-723" name="line-723"></a><span class="w"> </span><span class="n">g_value_set_object</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-725" name="line-725"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_SOURCE_NAME</span><span class="p">:</span> +<a id="line-726" name="line-726"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DATABASE</span><span class="p">:</span> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">database</span><span class="p">);</span> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_STRATEGY</span><span class="p">:</span> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_WORD</span><span class="p">:</span> +<a id="line-735" name="line-735"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_PRINT_FONT</span><span class="p">:</span> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">print_font</span><span class="p">);</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_DEFBOX_FONT</span><span class="p">:</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">defbox_font</span><span class="p">);</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_WINDOW_ID</span><span class="p">:</span> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="n">g_value_set_uint</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">window_id</span><span class="p">);</span> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">pspec</span><span class="p">);</span> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-749" name="line-749"></a><span class="w"> </span><span class="p">}</span> +<a id="line-750" name="line-750"></a><span class="p">}</span> +<a id="line-751" name="line-751"></a> +<a id="line-752" name="line-752"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-753" name="line-753"></a><span class="nf">gdict_window_store_state</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-754" name="line-754"></a><span class="p">{</span> +<a id="line-755" name="line-755"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">state_dir</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">state_file</span><span class="p">;</span> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">state_key</span><span class="p">;</span> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">;</span> +<a id="line-758" name="line-758"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">data_len</span><span class="p">;</span> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">;</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">page_id</span><span class="p">;</span> +<a id="line-761" name="line-761"></a> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="n">state_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_build_filename</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_user_config_dir</span><span class="w"> </span><span class="p">(),</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="s">"mate"</span><span class="p">,</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="s">"mate-dictionary"</span><span class="p">,</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-766" name="line-766"></a> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_mkdir</span><span class="w"> </span><span class="p">(</span><span class="n">state_dir</span><span class="p">,</span><span class="w"> </span><span class="mo">0700</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-768" name="line-768"></a><span class="w"> </span><span class="p">{</span> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">EEXIST</span><span class="p">)</span> +<a id="line-770" name="line-770"></a><span class="w"> </span><span class="p">{</span> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Unable to create a cache directory: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">g_strerror</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="p">));</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_dir</span><span class="p">);</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="p">}</span> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="p">}</span> +<a id="line-776" name="line-776"></a> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="n">state_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_build_filename</span><span class="w"> </span><span class="p">(</span><span class="n">state_dir</span><span class="p">,</span><span class="w"> </span><span class="s">"window.ini"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="n">state_key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-779" name="line-779"></a> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="cm">/* store the default size of the window and its state, so that</span> +<a id="line-781" name="line-781"></a><span class="cm"> * it's picked up by newly created windows</span> +<a id="line-782" name="line-782"></a><span class="cm"> */</span> +<a id="line-783" name="line-783"></a><span class="w"> </span><span class="n">g_key_file_set_integer</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"Width"</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">current_width</span><span class="p">);</span> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="n">g_key_file_set_integer</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"Height"</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">current_height</span><span class="p">);</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="n">g_key_file_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"IsMaximized"</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">is_maximized</span><span class="p">);</span> +<a id="line-786" name="line-786"></a><span class="w"> </span><span class="n">g_key_file_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"SidebarVisible"</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="p">);</span> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="n">g_key_file_set_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"StatusbarVisible"</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">);</span> +<a id="line-788" name="line-788"></a><span class="w"> </span><span class="n">g_key_file_set_integer</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"SidebarWidth"</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_width</span><span class="p">);</span> +<a id="line-789" name="line-789"></a> +<a id="line-790" name="line-790"></a><span class="w"> </span><span class="n">page_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_sidebar_current_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">));</span> +<a id="line-791" name="line-791"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">page_id</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-792" name="line-792"></a><span class="w"> </span><span class="n">page_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_SIDEBAR_SPELLER_PAGE</span><span class="p">;</span> +<a id="line-793" name="line-793"></a> +<a id="line-794" name="line-794"></a><span class="w"> </span><span class="n">g_key_file_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"SidebarPage"</span><span class="p">,</span><span class="w"> </span><span class="n">page_id</span><span class="p">);</span> +<a id="line-795" name="line-795"></a> +<a id="line-796" name="line-796"></a><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-797" name="line-797"></a><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_to_data</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">data_len</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-798" name="line-798"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-799" name="line-799"></a><span class="w"> </span><span class="p">{</span> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Unable to create the window state file: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-802" name="line-802"></a><span class="w"> </span><span class="p">}</span> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="k">else</span> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="p">{</span> +<a id="line-805" name="line-805"></a><span class="w"> </span><span class="n">g_file_set_contents</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="n">data_len</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="p">{</span> +<a id="line-808" name="line-808"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Unable to write the window state file: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-809" name="line-809"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="p">}</span> +<a id="line-811" name="line-811"></a> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">);</span> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="p">}</span> +<a id="line-814" name="line-814"></a> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">);</span> +<a id="line-816" name="line-816"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">);</span> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_dir</span><span class="p">);</span> +<a id="line-818" name="line-818"></a><span class="p">}</span> +<a id="line-819" name="line-819"></a> +<a id="line-820" name="line-820"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-821" name="line-821"></a><span class="nf">gdict_window_load_state</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-822" name="line-822"></a><span class="p">{</span> +<a id="line-823" name="line-823"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">state_file</span><span class="p">;</span> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="n">GKeyFile</span><span class="w"> </span><span class="o">*</span><span class="n">state_key</span><span class="p">;</span> +<a id="line-825" name="line-825"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">;</span> +<a id="line-826" name="line-826"></a> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="n">state_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_build_filename</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_user_config_dir</span><span class="w"> </span><span class="p">(),</span> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="s">"mate"</span><span class="p">,</span> +<a id="line-829" name="line-829"></a><span class="w"> </span><span class="s">"mate-dictionary"</span><span class="p">,</span> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="s">"window.ini"</span><span class="p">,</span> +<a id="line-831" name="line-831"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="n">state_key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-833" name="line-833"></a> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="n">g_key_file_load_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="n">state_file</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-837" name="line-837"></a><span class="w"> </span><span class="p">{</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Unable to load the window state file: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-839" name="line-839"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">);</span> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">);</span> +<a id="line-842" name="line-842"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="p">}</span> +<a id="line-844" name="line-844"></a> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_integer</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"Width"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="p">{</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-850" name="line-850"></a><span class="w"> </span><span class="p">}</span> +<a id="line-851" name="line-851"></a> +<a id="line-852" name="line-852"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_integer</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"Height"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-853" name="line-853"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-854" name="line-854"></a><span class="w"> </span><span class="p">{</span> +<a id="line-855" name="line-855"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-856" name="line-856"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-857" name="line-857"></a><span class="w"> </span><span class="p">}</span> +<a id="line-858" name="line-858"></a> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">is_maximized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"IsMaximized"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-860" name="line-860"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-861" name="line-861"></a><span class="w"> </span><span class="p">{</span> +<a id="line-862" name="line-862"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-863" name="line-863"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">is_maximized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-864" name="line-864"></a><span class="w"> </span><span class="p">}</span> +<a id="line-865" name="line-865"></a> +<a id="line-866" name="line-866"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"SidebarVisible"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-867" name="line-867"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-868" name="line-868"></a><span class="w"> </span><span class="p">{</span> +<a id="line-869" name="line-869"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-870" name="line-870"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-871" name="line-871"></a><span class="w"> </span><span class="p">}</span> +<a id="line-872" name="line-872"></a> +<a id="line-873" name="line-873"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">g_key_file_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"StatusbarVisible"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-874" name="line-874"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-875" name="line-875"></a><span class="w"> </span><span class="p">{</span> +<a id="line-876" name="line-876"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-878" name="line-878"></a><span class="w"> </span><span class="p">}</span> +<a id="line-879" name="line-879"></a> +<a id="line-880" name="line-880"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_integer</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"SidebarWidth"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-881" name="line-881"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="p">{</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-884" name="line-884"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="p">}</span> +<a id="line-886" name="line-886"></a> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_page</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_key_file_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">,</span><span class="w"> </span><span class="s">"WindowState"</span><span class="p">,</span><span class="w"> </span><span class="s">"SidebarPage"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-889" name="line-889"></a><span class="w"> </span><span class="p">{</span> +<a id="line-890" name="line-890"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-891" name="line-891"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_page</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-892" name="line-892"></a><span class="w"> </span><span class="p">}</span> +<a id="line-893" name="line-893"></a> +<a id="line-894" name="line-894"></a><span class="w"> </span><span class="n">g_key_file_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_key</span><span class="p">);</span> +<a id="line-895" name="line-895"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">state_file</span><span class="p">);</span> +<a id="line-896" name="line-896"></a><span class="p">}</span> +<a id="line-897" name="line-897"></a> +<a id="line-898" name="line-898"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-899" name="line-899"></a><span class="nf">gdict_window_cmd_file_new</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-900" name="line-900"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-901" name="line-901"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-902" name="line-902"></a><span class="p">{</span> +<a id="line-903" name="line-903"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-904" name="line-904"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">new_window</span><span class="p">;</span> +<a id="line-905" name="line-905"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-906" name="line-906"></a> +<a id="line-907" name="line-907"></a><span class="w"> </span><span class="n">gdict_window_store_state</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-908" name="line-908"></a> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_get_selected_word</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">));</span> +<a id="line-910" name="line-910"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">)</span> +<a id="line-911" name="line-911"></a><span class="w"> </span><span class="p">{</span> +<a id="line-912" name="line-912"></a><span class="w"> </span><span class="n">new_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_window_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_WINDOW_ACTION_LOOKUP</span><span class="p">,</span> +<a id="line-913" name="line-913"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span> +<a id="line-914" name="line-914"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">word</span><span class="p">);</span> +<a id="line-915" name="line-915"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-916" name="line-916"></a><span class="w"> </span><span class="p">}</span> +<a id="line-917" name="line-917"></a><span class="w"> </span><span class="k">else</span> +<a id="line-918" name="line-918"></a><span class="w"> </span><span class="n">new_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_window_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_WINDOW_ACTION_CLEAR</span><span class="p">,</span> +<a id="line-919" name="line-919"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span> +<a id="line-920" name="line-920"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-921" name="line-921"></a> +<a id="line-922" name="line-922"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">new_window</span><span class="p">);</span> +<a id="line-923" name="line-923"></a> +<a id="line-924" name="line-924"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_signals</span><span class="p">[</span><span class="n">CREATED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">new_window</span><span class="p">);</span> +<a id="line-925" name="line-925"></a><span class="p">}</span> +<a id="line-926" name="line-926"></a> +<a id="line-927" name="line-927"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-928" name="line-928"></a><span class="nf">gdict_window_cmd_save_as</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-929" name="line-929"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-931" name="line-931"></a><span class="p">{</span> +<a id="line-932" name="line-932"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-933" name="line-933"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-934" name="line-934"></a> +<a id="line-935" name="line-935"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-936" name="line-936"></a> +<a id="line-937" name="line-937"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Save a Copy"</span><span class="p">),</span> +<a id="line-938" name="line-938"></a><span class="w"> </span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-939" name="line-939"></a><span class="w"> </span><span class="n">GTK_FILE_CHOOSER_ACTION_SAVE</span><span class="p">,</span> +<a id="line-940" name="line-940"></a><span class="w"> </span><span class="s">"gtk-cancel"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">,</span> +<a id="line-941" name="line-941"></a><span class="w"> </span><span class="s">"gtk-save"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_ACCEPT</span><span class="p">,</span> +<a id="line-942" name="line-942"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-943" name="line-943"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_do_overwrite_confirmation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-944" name="line-944"></a> +<a id="line-945" name="line-945"></a><span class="w"> </span><span class="cm">/* default to user's home */</span> +<a id="line-946" name="line-946"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_current_folder</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">g_get_home_dir</span><span class="w"> </span><span class="p">());</span> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_current_name</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Untitled document"</span><span class="p">));</span> +<a id="line-948" name="line-948"></a> +<a id="line-949" name="line-949"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_ACCEPT</span><span class="p">)</span> +<a id="line-950" name="line-950"></a><span class="w"> </span><span class="p">{</span> +<a id="line-951" name="line-951"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">filename</span><span class="p">;</span> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">;</span> +<a id="line-953" name="line-953"></a><span class="w"> </span><span class="n">gsize</span><span class="w"> </span><span class="n">len</span><span class="p">;</span> +<a id="line-954" name="line-954"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">write_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-955" name="line-955"></a> +<a id="line-956" name="line-956"></a><span class="w"> </span><span class="n">filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_get_filename</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-957" name="line-957"></a> +<a id="line-958" name="line-958"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">len</span><span class="p">);</span> +<a id="line-959" name="line-959"></a> +<a id="line-960" name="line-960"></a><span class="w"> </span><span class="n">g_file_set_contents</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> +<a id="line-961" name="line-961"></a><span class="w"> </span><span class="n">text</span><span class="p">,</span> +<a id="line-962" name="line-962"></a><span class="w"> </span><span class="n">len</span><span class="p">,</span> +<a id="line-963" name="line-963"></a><span class="w"> </span><span class="o">&</span><span class="n">write_error</span><span class="p">);</span> +<a id="line-964" name="line-964"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">write_error</span><span class="p">)</span> +<a id="line-965" name="line-965"></a><span class="w"> </span><span class="p">{</span> +<a id="line-966" name="line-966"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-967" name="line-967"></a> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Error while writing to '%s'"</span><span class="p">),</span><span class="w"> </span><span class="n">filename</span><span class="p">);</span> +<a id="line-969" name="line-969"></a> +<a id="line-970" name="line-970"></a><span class="w"> </span><span class="n">gdict_show_gerror_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-971" name="line-971"></a><span class="w"> </span><span class="n">message</span><span class="p">,</span> +<a id="line-972" name="line-972"></a><span class="w"> </span><span class="n">write_error</span><span class="p">);</span> +<a id="line-973" name="line-973"></a> +<a id="line-974" name="line-974"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">);</span> +<a id="line-975" name="line-975"></a><span class="w"> </span><span class="p">}</span> +<a id="line-976" name="line-976"></a> +<a id="line-977" name="line-977"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-978" name="line-978"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">);</span> +<a id="line-979" name="line-979"></a><span class="w"> </span><span class="p">}</span> +<a id="line-980" name="line-980"></a> +<a id="line-981" name="line-981"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-982" name="line-982"></a><span class="p">}</span> +<a id="line-983" name="line-983"></a> +<a id="line-984" name="line-984"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-985" name="line-985"></a><span class="nf">gdict_window_cmd_file_preview</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-986" name="line-986"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-987" name="line-987"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-988" name="line-988"></a><span class="p">{</span> +<a id="line-989" name="line-989"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-990" name="line-990"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-991" name="line-991"></a> +<a id="line-992" name="line-992"></a><span class="w"> </span><span class="n">gdict_show_print_preview</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">));</span> +<a id="line-994" name="line-994"></a><span class="p">}</span> +<a id="line-995" name="line-995"></a> +<a id="line-996" name="line-996"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-997" name="line-997"></a><span class="nf">gdict_window_cmd_file_print</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-998" name="line-998"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-999" name="line-999"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1000" name="line-1000"></a><span class="p">{</span> +<a id="line-1001" name="line-1001"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1002" name="line-1002"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1003" name="line-1003"></a> +<a id="line-1004" name="line-1004"></a><span class="w"> </span><span class="n">gdict_show_print_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-1005" name="line-1005"></a><span class="w"> </span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">));</span> +<a id="line-1006" name="line-1006"></a><span class="p">}</span> +<a id="line-1007" name="line-1007"></a> +<a id="line-1008" name="line-1008"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1009" name="line-1009"></a><span class="hll"><span class="nf">gdict_window_cmd_file_close_window</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span><span class="error2"><--- Parameter 'action' can be declared as pointer to const</span> +</span><a id="line-1010" name="line-1010"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1011" name="line-1011"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1012" name="line-1012"></a><span class="p">{</span> +<a id="line-1013" name="line-1013"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1014" name="line-1014"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1015" name="line-1015"></a> +<a id="line-1016" name="line-1016"></a><span class="w"> </span><span class="n">gdict_window_store_state</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-1017" name="line-1017"></a> +<a id="line-1018" name="line-1018"></a><span class="w"> </span><span class="cm">/* if this was called from the uimanager, destroy the widget;</span> +<a id="line-1019" name="line-1019"></a><span class="cm"> * otherwise, if it was called from the delete_event, the widget</span> +<a id="line-1020" name="line-1020"></a><span class="cm"> * will destroy itself.</span> +<a id="line-1021" name="line-1021"></a><span class="cm"> */</span> +<a id="line-1022" name="line-1022"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">)</span> +<a id="line-1023" name="line-1023"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1024" name="line-1024"></a><span class="p">}</span> +<a id="line-1025" name="line-1025"></a> +<a id="line-1026" name="line-1026"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1027" name="line-1027"></a><span class="nf">gdict_window_cmd_edit_copy</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1028" name="line-1028"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1029" name="line-1029"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1030" name="line-1030"></a><span class="p">{</span> +<a id="line-1031" name="line-1031"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1032" name="line-1032"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1033" name="line-1033"></a> +<a id="line-1034" name="line-1034"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_has_focus</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">))</span> +<a id="line-1035" name="line-1035"></a><span class="w"> </span><span class="n">gtk_editable_copy_clipboard</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">));</span> +<a id="line-1036" name="line-1036"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1037" name="line-1037"></a><span class="w"> </span><span class="n">gdict_defbox_copy_to_clipboard</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span> +<a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="n">gtk_clipboard_get</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_SELECTION_CLIPBOARD</span><span class="p">));</span> +<a id="line-1039" name="line-1039"></a><span class="p">}</span> +<a id="line-1040" name="line-1040"></a> +<a id="line-1041" name="line-1041"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1042" name="line-1042"></a><span class="nf">gdict_window_cmd_edit_select_all</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1043" name="line-1043"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1044" name="line-1044"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1045" name="line-1045"></a><span class="p">{</span> +<a id="line-1046" name="line-1046"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1047" name="line-1047"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1048" name="line-1048"></a> +<a id="line-1049" name="line-1049"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_has_focus</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">))</span> +<a id="line-1050" name="line-1050"></a><span class="w"> </span><span class="n">gtk_editable_select_region</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1052" name="line-1052"></a><span class="w"> </span><span class="n">gdict_defbox_select_all</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">));</span> +<a id="line-1053" name="line-1053"></a><span class="p">}</span> +<a id="line-1054" name="line-1054"></a> +<a id="line-1055" name="line-1055"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1056" name="line-1056"></a><span class="nf">gdict_window_cmd_edit_find</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1057" name="line-1057"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1058" name="line-1058"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1059" name="line-1059"></a><span class="p">{</span> +<a id="line-1060" name="line-1060"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1061" name="line-1061"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1062" name="line-1062"></a><span class="w"> </span><span class="n">gdict_defbox_set_show_find</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1063" name="line-1063"></a><span class="p">}</span> +<a id="line-1064" name="line-1064"></a> +<a id="line-1065" name="line-1065"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1066" name="line-1066"></a><span class="nf">gdict_window_cmd_edit_find_next</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1067" name="line-1067"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1068" name="line-1068"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1069" name="line-1069"></a><span class="p">{</span> +<a id="line-1070" name="line-1070"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1071" name="line-1071"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1072" name="line-1072"></a> +<a id="line-1073" name="line-1073"></a><span class="w"> </span><span class="n">gdict_defbox_find_next</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">));</span> +<a id="line-1074" name="line-1074"></a><span class="p">}</span> +<a id="line-1075" name="line-1075"></a> +<a id="line-1076" name="line-1076"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1077" name="line-1077"></a><span class="nf">gdict_window_cmd_edit_find_previous</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1078" name="line-1078"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1079" name="line-1079"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1080" name="line-1080"></a><span class="p">{</span> +<a id="line-1081" name="line-1081"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1082" name="line-1082"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1083" name="line-1083"></a> +<a id="line-1084" name="line-1084"></a><span class="w"> </span><span class="n">gdict_defbox_find_previous</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">));</span> +<a id="line-1085" name="line-1085"></a><span class="p">}</span> +<a id="line-1086" name="line-1086"></a> +<a id="line-1087" name="line-1087"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1088" name="line-1088"></a><span class="nf">gdict_window_cmd_edit_preferences</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1089" name="line-1089"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1090" name="line-1090"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1091" name="line-1091"></a><span class="p">{</span> +<a id="line-1092" name="line-1092"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1093" name="line-1093"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1094" name="line-1094"></a> +<a id="line-1095" name="line-1095"></a><span class="w"> </span><span class="n">gdict_show_pref_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-1096" name="line-1096"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Dictionary Preferences"</span><span class="p">),</span> +<a id="line-1097" name="line-1097"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-1098" name="line-1098"></a><span class="p">}</span> +<a id="line-1099" name="line-1099"></a> +<a id="line-1100" name="line-1100"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1101" name="line-1101"></a><span class="nf">sidebar_activate_toggle</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1102" name="line-1102"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1103" name="line-1103"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1104" name="line-1104"></a><span class="p">{</span> +<a id="line-1105" name="line-1105"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">state</span><span class="p">;</span> +<a id="line-1106" name="line-1106"></a> +<a id="line-1107" name="line-1107"></a><span class="w"> </span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_action_get_state</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">));</span> +<a id="line-1108" name="line-1108"></a><span class="w"> </span><span class="n">g_action_change_state</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">),</span><span class="w"> </span><span class="n">g_variant_new_boolean</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_variant_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state</span><span class="p">)));</span> +<a id="line-1109" name="line-1109"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">state</span><span class="p">);</span> +<a id="line-1110" name="line-1110"></a><span class="p">}</span> +<a id="line-1111" name="line-1111"></a> +<a id="line-1112" name="line-1112"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1113" name="line-1113"></a><span class="nf">statusbar_activate_toggle</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1114" name="line-1114"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1115" name="line-1115"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1116" name="line-1116"></a><span class="p">{</span> +<a id="line-1117" name="line-1117"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">state</span><span class="p">;</span> +<a id="line-1118" name="line-1118"></a> +<a id="line-1119" name="line-1119"></a><span class="w"> </span><span class="n">state</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_action_get_state</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">));</span> +<a id="line-1120" name="line-1120"></a><span class="w"> </span><span class="n">g_action_change_state</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">),</span><span class="w"> </span><span class="n">g_variant_new_boolean</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_variant_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state</span><span class="p">)));</span> +<a id="line-1121" name="line-1121"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">state</span><span class="p">);</span> +<a id="line-1122" name="line-1122"></a><span class="p">}</span> +<a id="line-1123" name="line-1123"></a> +<a id="line-1124" name="line-1124"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1125" name="line-1125"></a><span class="nf">gdict_window_cmd_view_sidebar</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1126" name="line-1126"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">state</span><span class="p">,</span> +<a id="line-1127" name="line-1127"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1128" name="line-1128"></a><span class="p">{</span> +<a id="line-1129" name="line-1129"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1130" name="line-1130"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1131" name="line-1131"></a> +<a id="line-1132" name="line-1132"></a><span class="w"> </span><span class="n">g_variant_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state</span><span class="p">);</span> +<a id="line-1133" name="line-1133"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">g_variant_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1134" name="line-1134"></a><span class="w"> </span><span class="n">g_simple_action_set_state</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">,</span><span class="w"> </span><span class="n">state</span><span class="p">);</span> +<a id="line-1135" name="line-1135"></a> +<a id="line-1136" name="line-1136"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="p">)</span> +<a id="line-1137" name="line-1137"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_frame</span><span class="p">);</span> +<a id="line-1138" name="line-1138"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1139" name="line-1139"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_frame</span><span class="p">);</span> +<a id="line-1140" name="line-1140"></a><span class="p">}</span> +<a id="line-1141" name="line-1141"></a> +<a id="line-1142" name="line-1142"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1143" name="line-1143"></a><span class="nf">gdict_window_cmd_view_statusbar</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1144" name="line-1144"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">state</span><span class="p">,</span> +<a id="line-1145" name="line-1145"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1146" name="line-1146"></a><span class="p">{</span> +<a id="line-1147" name="line-1147"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1148" name="line-1148"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1149" name="line-1149"></a> +<a id="line-1150" name="line-1150"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">g_variant_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">state</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1151" name="line-1151"></a><span class="w"> </span><span class="n">g_simple_action_set_state</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">,</span><span class="w"> </span><span class="n">state</span><span class="p">);</span> +<a id="line-1152" name="line-1152"></a> +<a id="line-1153" name="line-1153"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">)</span> +<a id="line-1154" name="line-1154"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">);</span> +<a id="line-1155" name="line-1155"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1156" name="line-1156"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">);</span> +<a id="line-1157" name="line-1157"></a> +<a id="line-1158" name="line-1158"></a><span class="p">}</span> +<a id="line-1159" name="line-1159"></a> +<a id="line-1160" name="line-1160"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1161" name="line-1161"></a><span class="nf">gdict_window_cmd_view_speller</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1162" name="line-1162"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1163" name="line-1163"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1164" name="line-1164"></a> +<a id="line-1165" name="line-1165"></a><span class="p">{</span> +<a id="line-1166" name="line-1166"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1167" name="line-1167"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1168" name="line-1168"></a> +<a id="line-1169" name="line-1169"></a><span class="w"> </span><span class="n">gdict_sidebar_view_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span> +<a id="line-1170" name="line-1170"></a><span class="w"> </span><span class="n">GDICT_SIDEBAR_SPELLER_PAGE</span><span class="p">);</span> +<a id="line-1171" name="line-1171"></a><span class="w"> </span><span class="n">gdict_window_set_sidebar_visible</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1172" name="line-1172"></a><span class="p">}</span> +<a id="line-1173" name="line-1173"></a> +<a id="line-1174" name="line-1174"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1175" name="line-1175"></a><span class="nf">gdict_window_cmd_view_databases</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1176" name="line-1176"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1177" name="line-1177"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1178" name="line-1178"></a> +<a id="line-1179" name="line-1179"></a><span class="p">{</span> +<a id="line-1180" name="line-1180"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1182" name="line-1182"></a> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="n">gdict_sidebar_view_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span> +<a id="line-1184" name="line-1184"></a><span class="w"> </span><span class="n">GDICT_SIDEBAR_DATABASES_PAGE</span><span class="p">);</span> +<a id="line-1185" name="line-1185"></a><span class="w"> </span><span class="n">gdict_window_set_sidebar_visible</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1186" name="line-1186"></a><span class="p">}</span> +<a id="line-1187" name="line-1187"></a> +<a id="line-1188" name="line-1188"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1189" name="line-1189"></a><span class="nf">gdict_window_cmd_view_strategies</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1190" name="line-1190"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1191" name="line-1191"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1192" name="line-1192"></a> +<a id="line-1193" name="line-1193"></a><span class="p">{</span> +<a id="line-1194" name="line-1194"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1195" name="line-1195"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1196" name="line-1196"></a> +<a id="line-1197" name="line-1197"></a><span class="w"> </span><span class="n">gdict_sidebar_view_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span> +<a id="line-1198" name="line-1198"></a><span class="w"> </span><span class="n">GDICT_SIDEBAR_STRATEGIES_PAGE</span><span class="p">);</span> +<a id="line-1199" name="line-1199"></a><span class="w"> </span><span class="n">gdict_window_set_sidebar_visible</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1200" name="line-1200"></a><span class="p">}</span> +<a id="line-1201" name="line-1201"></a> +<a id="line-1202" name="line-1202"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1203" name="line-1203"></a><span class="nf">gdict_window_cmd_view_sources</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1204" name="line-1204"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1205" name="line-1205"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1206" name="line-1206"></a> +<a id="line-1207" name="line-1207"></a><span class="p">{</span> +<a id="line-1208" name="line-1208"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1209" name="line-1209"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1210" name="line-1210"></a> +<a id="line-1211" name="line-1211"></a><span class="w"> </span><span class="n">gdict_sidebar_view_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span> +<a id="line-1212" name="line-1212"></a><span class="w"> </span><span class="n">GDICT_SIDEBAR_SOURCES_PAGE</span><span class="p">);</span> +<a id="line-1213" name="line-1213"></a><span class="w"> </span><span class="n">gdict_window_set_sidebar_visible</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1214" name="line-1214"></a><span class="p">}</span> +<a id="line-1215" name="line-1215"></a> +<a id="line-1216" name="line-1216"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1217" name="line-1217"></a><span class="nf">gdict_window_cmd_go_first_def</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1218" name="line-1218"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1219" name="line-1219"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1220" name="line-1220"></a><span class="p">{</span> +<a id="line-1221" name="line-1221"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1222" name="line-1222"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1223" name="line-1223"></a> +<a id="line-1224" name="line-1224"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1225" name="line-1225"></a><span class="w"> </span><span class="n">gdict_defbox_jump_to_definition</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span> +<a id="line-1226" name="line-1226"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="p">);</span> +<a id="line-1227" name="line-1227"></a><span class="p">}</span> +<a id="line-1228" name="line-1228"></a> +<a id="line-1229" name="line-1229"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1230" name="line-1230"></a><span class="nf">gdict_window_cmd_go_previous_def</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1231" name="line-1231"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1232" name="line-1232"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1233" name="line-1233"></a><span class="p">{</span> +<a id="line-1234" name="line-1234"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1235" name="line-1235"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1236" name="line-1236"></a> +<a id="line-1237" name="line-1237"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-1238" name="line-1238"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1239" name="line-1239"></a> +<a id="line-1240" name="line-1240"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1241" name="line-1241"></a><span class="w"> </span><span class="n">gdict_defbox_jump_to_definition</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span> +<a id="line-1242" name="line-1242"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="p">);</span> +<a id="line-1243" name="line-1243"></a><span class="p">}</span> +<a id="line-1244" name="line-1244"></a> +<a id="line-1245" name="line-1245"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1246" name="line-1246"></a><span class="nf">gdict_window_cmd_go_next_def</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1247" name="line-1247"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1248" name="line-1248"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1249" name="line-1249"></a><span class="p">{</span> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1251" name="line-1251"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1252" name="line-1252"></a> +<a id="line-1253" name="line-1253"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">max_definition</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-1254" name="line-1254"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">max_definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_count_definitions</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">))</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1255" name="line-1255"></a> +<a id="line-1256" name="line-1256"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">max_definition</span><span class="p">)</span> +<a id="line-1257" name="line-1257"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1258" name="line-1258"></a> +<a id="line-1259" name="line-1259"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1260" name="line-1260"></a><span class="w"> </span><span class="n">gdict_defbox_jump_to_definition</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span> +<a id="line-1261" name="line-1261"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="p">);</span> +<a id="line-1262" name="line-1262"></a><span class="p">}</span> +<a id="line-1263" name="line-1263"></a> +<a id="line-1264" name="line-1264"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1265" name="line-1265"></a><span class="nf">gdict_window_cmd_go_last_def</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1266" name="line-1266"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1267" name="line-1267"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1268" name="line-1268"></a><span class="p">{</span> +<a id="line-1269" name="line-1269"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1270" name="line-1270"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1271" name="line-1271"></a> +<a id="line-1272" name="line-1272"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">max_definition</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-1273" name="line-1273"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_count_definitions</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">))</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-1274" name="line-1274"></a> +<a id="line-1275" name="line-1275"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">max_definition</span><span class="p">;</span> +<a id="line-1276" name="line-1276"></a><span class="w"> </span><span class="n">gdict_defbox_jump_to_definition</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span> +<a id="line-1277" name="line-1277"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">last_definition</span><span class="p">);</span> +<a id="line-1278" name="line-1278"></a><span class="p">}</span> +<a id="line-1279" name="line-1279"></a> +<a id="line-1280" name="line-1280"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1281" name="line-1281"></a><span class="nf">gdict_window_cmd_help_contents</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1282" name="line-1282"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1283" name="line-1283"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1284" name="line-1284"></a> +<a id="line-1285" name="line-1285"></a><span class="p">{</span> +<a id="line-1286" name="line-1286"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1287" name="line-1287"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1288" name="line-1288"></a> +<a id="line-1289" name="line-1289"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1290" name="line-1290"></a> +<a id="line-1291" name="line-1291"></a><span class="w"> </span><span class="n">gtk_show_uri_on_window</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-1292" name="line-1292"></a><span class="w"> </span><span class="s">"help:mate-dictionary"</span><span class="p">,</span> +<a id="line-1293" name="line-1293"></a><span class="w"> </span><span class="n">gtk_get_current_event_time</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-1294" name="line-1294"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">)</span> +<a id="line-1295" name="line-1295"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1296" name="line-1296"></a><span class="w"> </span><span class="n">gdict_show_gerror_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-1297" name="line-1297"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"There was an error while displaying help"</span><span class="p">),</span> +<a id="line-1298" name="line-1298"></a><span class="w"> </span><span class="n">err</span><span class="p">);</span> +<a id="line-1299" name="line-1299"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1300" name="line-1300"></a><span class="p">}</span> +<a id="line-1301" name="line-1301"></a> +<a id="line-1302" name="line-1302"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1303" name="line-1303"></a><span class="nf">gdict_window_cmd_help_about</span><span class="w"> </span><span class="p">(</span><span class="n">GSimpleAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">,</span> +<a id="line-1304" name="line-1304"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">parameter</span><span class="p">,</span> +<a id="line-1305" name="line-1305"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1306" name="line-1306"></a> +<a id="line-1307" name="line-1307"></a><span class="p">{</span> +<a id="line-1308" name="line-1308"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1309" name="line-1309"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1310" name="line-1310"></a> +<a id="line-1311" name="line-1311"></a><span class="w"> </span><span class="n">gdict_show_about_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1312" name="line-1312"></a><span class="p">}</span> +<a id="line-1313" name="line-1313"></a> +<a id="line-1314" name="line-1314"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1315" name="line-1315"></a><span class="nf">gdict_window_cmd_lookup</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1316" name="line-1316"></a> +<a id="line-1317" name="line-1317"></a><span class="p">{</span> +<a id="line-1318" name="line-1318"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1319" name="line-1319"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1320" name="line-1320"></a> +<a id="line-1321" name="line-1321"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">);</span> +<a id="line-1322" name="line-1322"></a><span class="p">}</span> +<a id="line-1323" name="line-1323"></a> +<a id="line-1324" name="line-1324"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1325" name="line-1325"></a><span class="nf">gdict_window_cmd_escape</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1326" name="line-1326"></a> +<a id="line-1327" name="line-1327"></a><span class="p">{</span> +<a id="line-1328" name="line-1328"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1329" name="line-1329"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1330" name="line-1330"></a> +<a id="line-1331" name="line-1331"></a><span class="w"> </span><span class="n">gdict_defbox_set_show_find</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1332" name="line-1332"></a><span class="p">}</span> +<a id="line-1333" name="line-1333"></a> +<a id="line-1334" name="line-1334"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1335" name="line-1335"></a><span class="nf">gdict_window_cmd_slash</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1336" name="line-1336"></a><span class="p">{</span> +<a id="line-1337" name="line-1337"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-1338" name="line-1338"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1339" name="line-1339"></a> +<a id="line-1340" name="line-1340"></a><span class="w"> </span><span class="n">gdict_defbox_set_show_find</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1341" name="line-1341"></a><span class="p">}</span> +<a id="line-1342" name="line-1342"></a> +<a id="line-1343" name="line-1343"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GActionEntry</span><span class="w"> </span><span class="n">entries</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span> +<a id="line-1344" name="line-1344"></a><span class="p">{</span> +<a id="line-1345" name="line-1345"></a><span class="w"> </span><span class="cm">/* File menu */</span> +<a id="line-1346" name="line-1346"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"FileNew"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_file_new</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1347" name="line-1347"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"FileSaveAs"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_save_as</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1348" name="line-1348"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"FilePreview"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_file_preview</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1349" name="line-1349"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"FilePrint"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_file_print</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1350" name="line-1350"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"FileCloseWindow"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_file_close_window</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1351" name="line-1351"></a> +<a id="line-1352" name="line-1352"></a><span class="w"> </span><span class="cm">/* Edit menu */</span> +<a id="line-1353" name="line-1353"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"EditCopy"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_edit_copy</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1354" name="line-1354"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"EditSelectAll"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_edit_select_all</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1355" name="line-1355"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"EditFind"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_edit_find</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1356" name="line-1356"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"EditFindNext"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_edit_find_next</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1357" name="line-1357"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"EditFindPrevious"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_edit_find_previous</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1358" name="line-1358"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"EditPreferences"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_edit_preferences</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1359" name="line-1359"></a> +<a id="line-1360" name="line-1360"></a><span class="w"> </span><span class="cm">/* Go menu */</span> +<a id="line-1361" name="line-1361"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"GoPreviousDef"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_go_previous_def</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1362" name="line-1362"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"GoNextDef"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_go_next_def</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1363" name="line-1363"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"GoFirstDef"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_go_first_def</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1364" name="line-1364"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"GoLastDef"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_go_last_def</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1365" name="line-1365"></a> +<a id="line-1366" name="line-1366"></a><span class="w"> </span><span class="cm">/* View menu */</span> +<a id="line-1367" name="line-1367"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ViewSidebar"</span><span class="p">,</span><span class="w"> </span><span class="n">sidebar_activate_toggle</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="s">"false"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_view_sidebar</span><span class="w"> </span><span class="p">},</span> +<a id="line-1368" name="line-1368"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ViewStatusbar"</span><span class="p">,</span><span class="w"> </span><span class="n">statusbar_activate_toggle</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="s">"false"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_view_statusbar</span><span class="w"> </span><span class="p">},</span> +<a id="line-1369" name="line-1369"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ViewSpeller"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_view_speller</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1370" name="line-1370"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ViewSource"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_view_sources</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1371" name="line-1371"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ViewDB"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_view_databases</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1372" name="line-1372"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"ViewStrat"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_view_strategies</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1373" name="line-1373"></a> +<a id="line-1374" name="line-1374"></a><span class="w"> </span><span class="cm">/* Help menu */</span> +<a id="line-1375" name="line-1375"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"HelpContents"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_help_contents</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1376" name="line-1376"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"HelpAbout"</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_cmd_help_about</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">},</span> +<a id="line-1377" name="line-1377"></a><span class="p">};</span> +<a id="line-1378" name="line-1378"></a> +<a id="line-1379" name="line-1379"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-1380" name="line-1380"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">keyval</span><span class="p">;</span> +<a id="line-1381" name="line-1381"></a><span class="w"> </span><span class="n">GdkModifierType</span><span class="w"> </span><span class="n">modifier</span><span class="p">;</span> +<a id="line-1382" name="line-1382"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">widget_id</span><span class="p">;</span> +<a id="line-1383" name="line-1383"></a><span class="p">}</span><span class="w"> </span><span class="n">menu_keybindings</span><span class="w"> </span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-1384" name="line-1384"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_N</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"new_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1385" name="line-1385"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_S</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_SHIFT_MASK</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"preview_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1386" name="line-1386"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_P</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"print_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1387" name="line-1387"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_W</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"close_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1388" name="line-1388"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_C</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"copy_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1389" name="line-1389"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_A</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"select_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1390" name="line-1390"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_F</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"find_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1391" name="line-1391"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_G</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"find_next_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1392" name="line-1392"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_G</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_SHIFT_MASK</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"find_previous_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1393" name="line-1393"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_Page_Up</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"go_up_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1394" name="line-1394"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_Page_Down</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"go_down_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1395" name="line-1395"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_Home</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"go_home_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1396" name="line-1396"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_End</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"go_end_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1397" name="line-1397"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_F9</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">"side_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1398" name="line-1398"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_T</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"speller_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1399" name="line-1399"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_D</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"sources_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1400" name="line-1400"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_B</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"db_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1401" name="line-1401"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_R</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="s">"strategies_item"</span><span class="w"> </span><span class="p">},</span> +<a id="line-1402" name="line-1402"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDK_KEY_F1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">"help_item"</span><span class="w"> </span><span class="p">}</span> +<a id="line-1403" name="line-1403"></a><span class="p">};</span> +<a id="line-1404" name="line-1404"></a> +<a id="line-1405" name="line-1405"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1406" name="line-1406"></a><span class="nf">gdict_window_delete_event_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1407" name="line-1407"></a><span class="w"> </span><span class="n">GdkEvent</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-1408" name="line-1408"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1409" name="line-1409"></a><span class="p">{</span> +<a id="line-1410" name="line-1410"></a><span class="w"> </span><span class="n">gdict_window_cmd_file_close_window</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-1411" name="line-1411"></a> +<a id="line-1412" name="line-1412"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1413" name="line-1413"></a><span class="p">}</span> +<a id="line-1414" name="line-1414"></a> +<a id="line-1415" name="line-1415"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1416" name="line-1416"></a><span class="nf">gdict_window_state_event_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1417" name="line-1417"></a><span class="w"> </span><span class="n">GdkEventWindowState</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-1418" name="line-1418"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1419" name="line-1419"></a><span class="p">{</span> +<a id="line-1420" name="line-1420"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-1421" name="line-1421"></a> +<a id="line-1422" name="line-1422"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">new_window_state</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">GDK_WINDOW_STATE_MAXIMIZED</span><span class="p">)</span> +<a id="line-1423" name="line-1423"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">is_maximized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1424" name="line-1424"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1425" name="line-1425"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">is_maximized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1426" name="line-1426"></a> +<a id="line-1427" name="line-1427"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1428" name="line-1428"></a><span class="p">}</span> +<a id="line-1429" name="line-1429"></a> +<a id="line-1430" name="line-1430"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1431" name="line-1431"></a><span class="nf">lookup_word</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-1432" name="line-1432"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">dummy</span><span class="p">)</span> +<a id="line-1433" name="line-1433"></a><span class="p">{</span> +<a id="line-1434" name="line-1434"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">entry_text</span><span class="p">;</span> +<a id="line-1435" name="line-1435"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">;</span> +<a id="line-1436" name="line-1436"></a> +<a id="line-1437" name="line-1437"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1438" name="line-1438"></a> +<a id="line-1439" name="line-1439"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-1440" name="line-1440"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1441" name="line-1441"></a> +<a id="line-1442" name="line-1442"></a><span class="w"> </span><span class="n">entry_text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">));</span> +<a id="line-1443" name="line-1443"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">entry_text</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="o">*</span><span class="n">entry_text</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-1444" name="line-1444"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-1445" name="line-1445"></a> +<a id="line-1446" name="line-1446"></a><span class="w"> </span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">entry_text</span><span class="p">);</span> +<a id="line-1447" name="line-1447"></a><span class="w"> </span><span class="n">gdict_window_set_word</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">g_strstrip</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1448" name="line-1448"></a> +<a id="line-1449" name="line-1449"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="p">);</span> +<a id="line-1450" name="line-1450"></a><span class="p">}</span> +<a id="line-1451" name="line-1451"></a> +<a id="line-1452" name="line-1452"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1453" name="line-1453"></a><span class="nf">source_activated_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSourceChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-1454" name="line-1454"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="p">,</span> +<a id="line-1455" name="line-1455"></a><span class="w"> </span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-1456" name="line-1456"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-1457" name="line-1457"></a><span class="p">{</span> +<a id="line-1458" name="line-1458"></a><span class="w"> </span><span class="n">g_signal_handlers_block_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">,</span><span class="w"> </span><span class="n">source_activated_cb</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1459" name="line-1459"></a><span class="w"> </span><span class="n">gdict_window_set_source_name</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">source_name</span><span class="p">);</span> +<a id="line-1460" name="line-1460"></a><span class="w"> </span><span class="n">g_signal_handlers_unblock_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">,</span><span class="w"> </span><span class="n">source_activated_cb</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1461" name="line-1461"></a> +<a id="line-1462" name="line-1462"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">)</span> +<a id="line-1463" name="line-1463"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1464" name="line-1464"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-1465" name="line-1465"></a> +<a id="line-1466" name="line-1466"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Dictionary source `%s' selected"</span><span class="p">),</span> +<a id="line-1467" name="line-1467"></a><span class="w"> </span><span class="n">gdict_source_get_description</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">));</span> +<a id="line-1468" name="line-1468"></a><span class="w"> </span><span class="n">gtk_statusbar_push</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-1469" name="line-1469"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">);</span> +<a id="line-1470" name="line-1470"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1471" name="line-1471"></a><span class="p">}</span> +<a id="line-1472" name="line-1472"></a> +<a id="line-1473" name="line-1473"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1474" name="line-1474"></a><span class="nf">strategy_activated_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictStrategyChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-1475" name="line-1475"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">strat_name</span><span class="p">,</span> +<a id="line-1476" name="line-1476"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">strat_desc</span><span class="p">,</span> +<a id="line-1477" name="line-1477"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-1478" name="line-1478"></a><span class="p">{</span> +<a id="line-1479" name="line-1479"></a><span class="w"> </span><span class="n">g_signal_handlers_block_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">,</span><span class="w"> </span><span class="n">strategy_activated_cb</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1480" name="line-1480"></a><span class="w"> </span><span class="n">gdict_window_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">strat_name</span><span class="p">);</span> +<a id="line-1481" name="line-1481"></a><span class="w"> </span><span class="n">g_signal_handlers_unblock_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">,</span><span class="w"> </span><span class="n">strategy_activated_cb</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1482" name="line-1482"></a> +<a id="line-1483" name="line-1483"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">)</span> +<a id="line-1484" name="line-1484"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1485" name="line-1485"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-1486" name="line-1486"></a> +<a id="line-1487" name="line-1487"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Strategy `%s' selected"</span><span class="p">),</span><span class="w"> </span><span class="n">strat_desc</span><span class="p">);</span> +<a id="line-1488" name="line-1488"></a><span class="w"> </span><span class="n">gtk_statusbar_push</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-1489" name="line-1489"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">);</span> +<a id="line-1490" name="line-1490"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1491" name="line-1491"></a><span class="p">}</span> +<a id="line-1492" name="line-1492"></a> +<a id="line-1493" name="line-1493"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1494" name="line-1494"></a><span class="nf">database_activated_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDatabaseChooser</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-1495" name="line-1495"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">db_name</span><span class="p">,</span> +<a id="line-1496" name="line-1496"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">db_desc</span><span class="p">,</span> +<a id="line-1497" name="line-1497"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-1498" name="line-1498"></a><span class="p">{</span> +<a id="line-1499" name="line-1499"></a><span class="w"> </span><span class="n">g_signal_handlers_block_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">,</span><span class="w"> </span><span class="n">database_activated_cb</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1500" name="line-1500"></a><span class="w"> </span><span class="n">gdict_window_set_database</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">db_name</span><span class="p">);</span> +<a id="line-1501" name="line-1501"></a><span class="w"> </span><span class="n">g_signal_handlers_unblock_by_func</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">,</span><span class="w"> </span><span class="n">database_activated_cb</span><span class="p">,</span><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1502" name="line-1502"></a> +<a id="line-1503" name="line-1503"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">)</span> +<a id="line-1504" name="line-1504"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1505" name="line-1505"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-1506" name="line-1506"></a> +<a id="line-1507" name="line-1507"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Database `%s' selected"</span><span class="p">),</span><span class="w"> </span><span class="n">db_desc</span><span class="p">);</span> +<a id="line-1508" name="line-1508"></a><span class="w"> </span><span class="n">gtk_statusbar_push</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-1509" name="line-1509"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">);</span> +<a id="line-1510" name="line-1510"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1511" name="line-1511"></a><span class="p">}</span> +<a id="line-1512" name="line-1512"></a> +<a id="line-1513" name="line-1513"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1514" name="line-1514"></a><span class="nf">speller_word_activated_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSpeller</span><span class="w"> </span><span class="o">*</span><span class="n">speller</span><span class="p">,</span> +<a id="line-1515" name="line-1515"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">,</span> +<a id="line-1516" name="line-1516"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">db_name</span><span class="p">,</span> +<a id="line-1517" name="line-1517"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-1518" name="line-1518"></a><span class="p">{</span> +<a id="line-1519" name="line-1519"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="n">word</span><span class="p">);</span> +<a id="line-1520" name="line-1520"></a> +<a id="line-1521" name="line-1521"></a><span class="w"> </span><span class="n">gdict_window_set_word</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="n">db_name</span><span class="p">);</span> +<a id="line-1522" name="line-1522"></a> +<a id="line-1523" name="line-1523"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">)</span> +<a id="line-1524" name="line-1524"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1525" name="line-1525"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-1526" name="line-1526"></a> +<a id="line-1527" name="line-1527"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Word `%s' selected"</span><span class="p">),</span><span class="w"> </span><span class="n">word</span><span class="p">);</span> +<a id="line-1528" name="line-1528"></a><span class="w"> </span><span class="n">gtk_statusbar_push</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-1529" name="line-1529"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">);</span> +<a id="line-1530" name="line-1530"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1531" name="line-1531"></a><span class="p">}</span> +<a id="line-1532" name="line-1532"></a> +<a id="line-1533" name="line-1533"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1534" name="line-1534"></a><span class="nf">sidebar_page_changed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSidebar</span><span class="w"> </span><span class="o">*</span><span class="n">sidebar</span><span class="p">,</span> +<a id="line-1535" name="line-1535"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-1536" name="line-1536"></a><span class="p">{</span> +<a id="line-1537" name="line-1537"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">page_id</span><span class="p">;</span> +<a id="line-1538" name="line-1538"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span> +<a id="line-1539" name="line-1539"></a> +<a id="line-1540" name="line-1540"></a><span class="w"> </span><span class="n">page_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_sidebar_current_page</span><span class="w"> </span><span class="p">(</span><span class="n">sidebar</span><span class="p">);</span> +<a id="line-1541" name="line-1541"></a> +<a id="line-1542" name="line-1542"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_page</span><span class="p">);</span> +<a id="line-1543" name="line-1543"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_page</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">page_id</span><span class="p">);</span> +<a id="line-1544" name="line-1544"></a> +<a id="line-1545" name="line-1545"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">page_id</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> +<a id="line-1546" name="line-1546"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1547" name="line-1547"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'s'</span><span class="p">:</span> +<a id="line-1548" name="line-1548"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1549" name="line-1549"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">page_id</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> +<a id="line-1550" name="line-1550"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1551" name="line-1551"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'p'</span><span class="p">:</span><span class="w"> </span><span class="cm">/* speller */</span> +<a id="line-1552" name="line-1552"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Double-click on the word to look up"</span><span class="p">);</span> +<a id="line-1553" name="line-1553"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">)</span> +<a id="line-1554" name="line-1554"></a><span class="w"> </span><span class="n">gdict_speller_match</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span> +<a id="line-1555" name="line-1555"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-1556" name="line-1556"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1557" name="line-1557"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'t'</span><span class="p">:</span><span class="w"> </span><span class="cm">/* strat-chooser */</span> +<a id="line-1558" name="line-1558"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Double-click on the matching strategy to use"</span><span class="p">);</span> +<a id="line-1559" name="line-1559"></a> +<a id="line-1560" name="line-1560"></a><span class="w"> </span><span class="n">gdict_strategy_chooser_refresh</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_STRATEGY_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strat_chooser</span><span class="p">));</span> +<a id="line-1561" name="line-1561"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1562" name="line-1562"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'o'</span><span class="p">:</span><span class="w"> </span><span class="cm">/* source-chooser */</span> +<a id="line-1563" name="line-1563"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Double-click on the source to use"</span><span class="p">);</span> +<a id="line-1564" name="line-1564"></a><span class="w"> </span><span class="n">gdict_source_chooser_refresh</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SOURCE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_chooser</span><span class="p">));</span> +<a id="line-1565" name="line-1565"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1566" name="line-1566"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1567" name="line-1567"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1568" name="line-1568"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1569" name="line-1569"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1570" name="line-1570"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1571" name="line-1571"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="sc">'d'</span><span class="p">:</span><span class="w"> </span><span class="cm">/* db-chooser */</span> +<a id="line-1572" name="line-1572"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Double-click on the database to use"</span><span class="p">);</span> +<a id="line-1573" name="line-1573"></a> +<a id="line-1574" name="line-1574"></a><span class="w"> </span><span class="n">gdict_database_chooser_refresh</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DATABASE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">db_chooser</span><span class="p">));</span> +<a id="line-1575" name="line-1575"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1576" name="line-1576"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1577" name="line-1577"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1578" name="line-1578"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1579" name="line-1579"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1580" name="line-1580"></a> +<a id="line-1581" name="line-1581"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">)</span> +<a id="line-1582" name="line-1582"></a><span class="w"> </span><span class="n">gtk_statusbar_push</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-1583" name="line-1583"></a><span class="p">}</span> +<a id="line-1584" name="line-1584"></a> +<a id="line-1585" name="line-1585"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1586" name="line-1586"></a><span class="nf">sidebar_closed_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GdictSidebar</span><span class="w"> </span><span class="o">*</span><span class="n">sidebar</span><span class="p">,</span> +<a id="line-1587" name="line-1587"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-1588" name="line-1588"></a><span class="p">{</span> +<a id="line-1589" name="line-1589"></a><span class="w"> </span><span class="n">gdict_window_set_sidebar_visible</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1590" name="line-1590"></a><span class="p">}</span> +<a id="line-1591" name="line-1591"></a> +<a id="line-1592" name="line-1592"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1593" name="line-1593"></a><span class="nf">gdict_window_link_clicked</span><span class="w"> </span><span class="p">(</span><span class="n">GdictDefbox</span><span class="w"> </span><span class="o">*</span><span class="n">defbox</span><span class="p">,</span> +<a id="line-1594" name="line-1594"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">link_text</span><span class="p">,</span> +<a id="line-1595" name="line-1595"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-1596" name="line-1596"></a><span class="p">{</span> +<a id="line-1597" name="line-1597"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">new_window</span><span class="p">;</span> +<a id="line-1598" name="line-1598"></a> +<a id="line-1599" name="line-1599"></a><span class="w"> </span><span class="n">gdict_window_store_state</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-1600" name="line-1600"></a> +<a id="line-1601" name="line-1601"></a><span class="w"> </span><span class="n">new_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_window_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_WINDOW_ACTION_LOOKUP</span><span class="p">,</span> +<a id="line-1602" name="line-1602"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span> +<a id="line-1603" name="line-1603"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">link_text</span><span class="p">);</span> +<a id="line-1604" name="line-1604"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">new_window</span><span class="p">);</span> +<a id="line-1605" name="line-1605"></a> +<a id="line-1606" name="line-1606"></a><span class="w"> </span><span class="n">g_signal_emit</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">gdict_window_signals</span><span class="p">[</span><span class="n">CREATED</span><span class="p">],</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">new_window</span><span class="p">);</span> +<a id="line-1607" name="line-1607"></a><span class="p">}</span> +<a id="line-1608" name="line-1608"></a> +<a id="line-1609" name="line-1609"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1610" name="line-1610"></a><span class="nf">gdict_window_drag_data_received_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1611" name="line-1611"></a><span class="w"> </span><span class="n">GdkDragContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-1612" name="line-1612"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">x</span><span class="p">,</span> +<a id="line-1613" name="line-1613"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">y</span><span class="p">,</span> +<a id="line-1614" name="line-1614"></a><span class="w"> </span><span class="n">GtkSelectionData</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">,</span> +<a id="line-1615" name="line-1615"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">info</span><span class="p">,</span> +<a id="line-1616" name="line-1616"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">time_</span><span class="p">,</span> +<a id="line-1617" name="line-1617"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1618" name="line-1618"></a><span class="p">{</span> +<a id="line-1619" name="line-1619"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-1620" name="line-1620"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">;</span> +<a id="line-1621" name="line-1621"></a> +<a id="line-1622" name="line-1622"></a><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_selection_data_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">);</span> +<a id="line-1623" name="line-1623"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">)</span> +<a id="line-1624" name="line-1624"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1625" name="line-1625"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="n">text</span><span class="p">);</span> +<a id="line-1626" name="line-1626"></a> +<a id="line-1627" name="line-1627"></a><span class="w"> </span><span class="n">gdict_window_set_word</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1628" name="line-1628"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-1629" name="line-1629"></a> +<a id="line-1630" name="line-1630"></a><span class="w"> </span><span class="n">gtk_drag_finish</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">time_</span><span class="p">);</span> +<a id="line-1631" name="line-1631"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1632" name="line-1632"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1633" name="line-1633"></a><span class="w"> </span><span class="n">gtk_drag_finish</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">time_</span><span class="p">);</span> +<a id="line-1634" name="line-1634"></a><span class="p">}</span> +<a id="line-1635" name="line-1635"></a> +<a id="line-1636" name="line-1636"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1637" name="line-1637"></a><span class="nf">gdict_window_size_allocate</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1638" name="line-1638"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="o">*</span><span class="n">allocation</span><span class="p">)</span> +<a id="line-1639" name="line-1639"></a><span class="p">{</span> +<a id="line-1640" name="line-1640"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-1641" name="line-1641"></a> +<a id="line-1642" name="line-1642"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">window</span><span class="o">-></span><span class="n">is_maximized</span><span class="p">)</span> +<a id="line-1643" name="line-1643"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1644" name="line-1644"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">current_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="o">-></span><span class="n">width</span><span class="p">;</span> +<a id="line-1645" name="line-1645"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">current_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="o">-></span><span class="n">height</span><span class="p">;</span> +<a id="line-1646" name="line-1646"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1647" name="line-1647"></a> +<a id="line-1648" name="line-1648"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">size_allocate</span><span class="p">)</span> +<a id="line-1649" name="line-1649"></a><span class="w"> </span><span class="n">GTK_WIDGET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">size_allocate</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1650" name="line-1650"></a><span class="w"> </span><span class="n">allocation</span><span class="p">);</span> +<a id="line-1651" name="line-1651"></a><span class="p">}</span> +<a id="line-1652" name="line-1652"></a> +<a id="line-1653" name="line-1653"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1654" name="line-1654"></a><span class="nf">gdict_window_handle_notify_position_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1655" name="line-1655"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">pspec</span><span class="p">,</span> +<a id="line-1656" name="line-1656"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1657" name="line-1657"></a><span class="p">{</span> +<a id="line-1658" name="line-1658"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">user_data</span><span class="p">);</span> +<a id="line-1659" name="line-1659"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">window_width</span><span class="p">,</span><span class="w"> </span><span class="n">pos</span><span class="p">;</span> +<a id="line-1660" name="line-1660"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-1661" name="line-1661"></a> +<a id="line-1662" name="line-1662"></a><span class="w"> </span><span class="n">pos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_paned_get_position</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_PANED</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">));</span> +<a id="line-1663" name="line-1663"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-1664" name="line-1664"></a><span class="w"> </span><span class="n">window_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="p">;</span> +<a id="line-1665" name="line-1665"></a> +<a id="line-1666" name="line-1666"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">window_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">pos</span><span class="p">;</span> +<a id="line-1667" name="line-1667"></a><span class="p">}</span> +<a id="line-1668" name="line-1668"></a> +<a id="line-1669" name="line-1669"></a><span class="k">static</span><span class="w"> </span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span> +<a id="line-1670" name="line-1670"></a><span class="nf">gdict_window_constructor</span><span class="w"> </span><span class="p">(</span><span class="n">GType</span><span class="w"> </span><span class="n">type</span><span class="p">,</span> +<a id="line-1671" name="line-1671"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">n_construct_properties</span><span class="p">,</span> +<a id="line-1672" name="line-1672"></a><span class="w"> </span><span class="n">GObjectConstructParam</span><span class="w"> </span><span class="o">*</span><span class="n">construct_params</span><span class="p">)</span> +<a id="line-1673" name="line-1673"></a><span class="p">{</span> +<a id="line-1674" name="line-1674"></a><span class="w"> </span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">;</span> +<a id="line-1675" name="line-1675"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-1676" name="line-1676"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hbox</span><span class="p">;</span> +<a id="line-1677" name="line-1677"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">handle</span><span class="p">;</span> +<a id="line-1678" name="line-1678"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">frame1</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">frame2</span><span class="p">;</span> +<a id="line-1679" name="line-1679"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">vbox</span><span class="p">;</span> +<a id="line-1680" name="line-1680"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">;</span> +<a id="line-1681" name="line-1681"></a><span class="hll"><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'item' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'item' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-1682" name="line-1682"></a><span class="w"> </span><span class="n">GActionGroup</span><span class="w"> </span><span class="o">*</span><span class="n">action_group</span><span class="p">;</span> +<a id="line-1683" name="line-1683"></a><span class="w"> </span><span class="n">GtkAccelGroup</span><span class="w"> </span><span class="o">*</span><span class="n">accel_group</span><span class="p">;</span> +<a id="line-1684" name="line-1684"></a><span class="w"> </span><span class="n">PangoFontDescription</span><span class="w"> </span><span class="o">*</span><span class="n">font_desc</span><span class="p">;</span> +<a id="line-1685" name="line-1685"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">font_name</span><span class="p">;</span> +<a id="line-1686" name="line-1686"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">;</span> +<a id="line-1687" name="line-1687"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-1688" name="line-1688"></a><span class="w"> </span><span class="n">GClosure</span><span class="w"> </span><span class="o">*</span><span class="n">lookup</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">escape</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">slash</span><span class="p">;</span> +<a id="line-1689" name="line-1689"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-1690" name="line-1690"></a> +<a id="line-1691" name="line-1691"></a><span class="w"> </span><span class="n">object</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">constructor</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="p">,</span><span class="w"> </span><span class="n">n_construct_properties</span><span class="p">,</span><span class="w"> </span><span class="n">construct_params</span><span class="p">);</span> +<a id="line-1692" name="line-1692"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-1693" name="line-1693"></a> +<a id="line-1694" name="line-1694"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">in_construction</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-1695" name="line-1695"></a> +<a id="line-1696" name="line-1696"></a><span class="w"> </span><span class="cm">/* recover the state */</span> +<a id="line-1697" name="line-1697"></a><span class="w"> </span><span class="n">gdict_window_load_state</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-1698" name="line-1698"></a> +<a id="line-1699" name="line-1699"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">main_box</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1700" name="line-1700"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">main_box</span><span class="p">);</span> +<a id="line-1701" name="line-1701"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">main_box</span><span class="p">);</span> +<a id="line-1702" name="line-1702"></a> +<a id="line-1703" name="line-1703"></a><span class="w"> </span><span class="cm">/* build menus */</span> +<a id="line-1704" name="line-1704"></a><span class="w"> </span><span class="n">action_group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GActionGroup</span><span class="o">*</span><span class="p">)</span><span class="n">g_simple_action_group_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1705" name="line-1705"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">action_group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">action_group</span><span class="p">;</span> +<a id="line-1706" name="line-1706"></a><span class="w"> </span><span class="n">g_action_map_add_action_entries</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION_MAP</span><span class="w"> </span><span class="p">(</span><span class="n">action_group</span><span class="p">),</span> +<a id="line-1707" name="line-1707"></a><span class="w"> </span><span class="n">entries</span><span class="p">,</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">entries</span><span class="p">),</span> +<a id="line-1708" name="line-1708"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1709" name="line-1709"></a> +<a id="line-1710" name="line-1710"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">ui_manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_builder_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1711" name="line-1711"></a><span class="w"> </span><span class="n">gtk_widget_insert_action_group</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="s">"win"</span><span class="p">,</span><span class="w"> </span><span class="n">action_group</span><span class="p">);</span> +<a id="line-1712" name="line-1712"></a> +<a id="line-1713" name="line-1713"></a><span class="w"> </span><span class="n">accel_group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_accel_group_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1714" name="line-1714"></a><span class="w"> </span><span class="n">gtk_window_add_accel_group</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">accel_group</span><span class="p">);</span> +<a id="line-1715" name="line-1715"></a> +<a id="line-1716" name="line-1716"></a><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1717" name="line-1717"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_builder_add_from_file</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">,</span> +<a id="line-1718" name="line-1718"></a><span class="w"> </span><span class="n">PKGDATADIR</span><span class="w"> </span><span class="s">"/mate-dictionary-ui.xml"</span><span class="p">,</span> +<a id="line-1719" name="line-1719"></a><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">))</span> +<a id="line-1720" name="line-1720"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1721" name="line-1721"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Building menus failed: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1722" name="line-1722"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-1723" name="line-1723"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1724" name="line-1724"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1725" name="line-1725"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1726" name="line-1726"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">menubar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">gtk_builder_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">,</span><span class="w"> </span><span class="s">"dictionarymenubar"</span><span class="p">);</span> +<a id="line-1727" name="line-1727"></a> +<a id="line-1728" name="line-1728"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">main_box</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">menubar</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1729" name="line-1729"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">menubar</span><span class="p">);</span> +<a id="line-1730" name="line-1730"></a> +<a id="line-1731" name="line-1731"></a><span class="w"> </span><span class="n">gdict_window_ensure_menu_state</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-1732" name="line-1732"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1733" name="line-1733"></a> +<a id="line-1734" name="line-1734"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">menu_keybindings</span><span class="p">);</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-1735" name="line-1735"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1736" name="line-1736"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="o">*</span><span class="p">)</span><span class="n">gtk_builder_get_object</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">ui_manager</span><span class="p">,</span><span class="w"> </span><span class="n">menu_keybindings</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">widget_id</span><span class="p">);</span> +<a id="line-1737" name="line-1737"></a><span class="w"> </span><span class="n">gtk_widget_add_accelerator</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span><span class="w"> </span><span class="n">accel_group</span><span class="p">,</span> +<a id="line-1738" name="line-1738"></a><span class="w"> </span><span class="n">menu_keybindings</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">keyval</span><span class="p">,</span> +<a id="line-1739" name="line-1739"></a><span class="w"> </span><span class="n">menu_keybindings</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">modifier</span><span class="p">,</span> +<a id="line-1740" name="line-1740"></a><span class="w"> </span><span class="n">GTK_ACCEL_VISIBLE</span><span class="p">);</span> +<a id="line-1741" name="line-1741"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1742" name="line-1742"></a><span class="w"> </span><span class="n">lookup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_cclosure_new_swap</span><span class="w"> </span><span class="p">(</span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_cmd_lookup</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1743" name="line-1743"></a><span class="w"> </span><span class="n">gtk_accel_group_connect</span><span class="w"> </span><span class="p">(</span><span class="n">accel_group</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_KEY_L</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CONTROL_MASK</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">lookup</span><span class="p">);</span> +<a id="line-1744" name="line-1744"></a> +<a id="line-1745" name="line-1745"></a><span class="w"> </span><span class="n">escape</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_cclosure_new_swap</span><span class="w"> </span><span class="p">(</span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_cmd_escape</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1746" name="line-1746"></a><span class="w"> </span><span class="n">gtk_accel_group_connect</span><span class="w"> </span><span class="p">(</span><span class="n">accel_group</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_KEY_Escape</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">escape</span><span class="p">);</span> +<a id="line-1747" name="line-1747"></a> +<a id="line-1748" name="line-1748"></a><span class="w"> </span><span class="n">slash</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_cclosure_new_swap</span><span class="w"> </span><span class="p">(</span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_cmd_slash</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1749" name="line-1749"></a><span class="w"> </span><span class="n">gtk_accel_group_connect</span><span class="w"> </span><span class="p">(</span><span class="n">accel_group</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_KEY_slash</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">slash</span><span class="p">);</span> +<a id="line-1750" name="line-1750"></a> +<a id="line-1751" name="line-1751"></a><span class="w"> </span><span class="n">vbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1752" name="line-1752"></a><span class="w"> </span><span class="n">gtk_container_set_border_width</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span> +<a id="line-1753" name="line-1753"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">main_box</span><span class="p">),</span><span class="w"> </span><span class="n">vbox</span><span class="p">);</span> +<a id="line-1754" name="line-1754"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">);</span> +<a id="line-1755" name="line-1755"></a> +<a id="line-1756" name="line-1756"></a><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">,</span><span class="w"> </span><span class="mi">12</span><span class="p">);</span> +<a id="line-1757" name="line-1757"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">hbox</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1758" name="line-1758"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">);</span> +<a id="line-1759" name="line-1759"></a> +<a id="line-1760" name="line-1760"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Look _up:"</span><span class="p">));</span> +<a id="line-1761" name="line-1761"></a><span class="w"> </span><span class="n">g_signal_connect_swapped</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="s">"clicked"</span><span class="p">,</span> +<a id="line-1762" name="line-1762"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">lookup_word</span><span class="p">),</span> +<a id="line-1763" name="line-1763"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1764" name="line-1764"></a><span class="w"> </span><span class="n">gtk_button_set_relief</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_RELIEF_NONE</span><span class="p">);</span> +<a id="line-1765" name="line-1765"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1766" name="line-1766"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">);</span> +<a id="line-1767" name="line-1767"></a> +<a id="line-1768" name="line-1768"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">completion_model</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_list_store_new</span><span class="w"> </span><span class="p">(</span><span class="n">COMPLETION_N_COLUMNS</span><span class="p">,</span> +<a id="line-1769" name="line-1769"></a><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">);</span> +<a id="line-1770" name="line-1770"></a> +<a id="line-1771" name="line-1771"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">completion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_completion_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1772" name="line-1772"></a><span class="w"> </span><span class="n">gtk_entry_completion_set_popup_completion</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">completion</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1773" name="line-1773"></a><span class="w"> </span><span class="n">gtk_entry_completion_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">completion</span><span class="p">,</span> +<a id="line-1774" name="line-1774"></a><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">completion_model</span><span class="p">));</span> +<a id="line-1775" name="line-1775"></a><span class="w"> </span><span class="n">gtk_entry_completion_set_text_column</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">completion</span><span class="p">,</span> +<a id="line-1776" name="line-1776"></a><span class="w"> </span><span class="n">COMPLETION_TEXT_COLUMN</span><span class="p">);</span> +<a id="line-1777" name="line-1777"></a> +<a id="line-1778" name="line-1778"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1779" name="line-1779"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">)</span> +<a id="line-1780" name="line-1780"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="p">);</span> +<a id="line-1781" name="line-1781"></a> +<a id="line-1782" name="line-1782"></a><span class="w"> </span><span class="n">gtk_entry_set_completion</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">),</span> +<a id="line-1783" name="line-1783"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">completion</span><span class="p">);</span> +<a id="line-1784" name="line-1784"></a><span class="w"> </span><span class="n">g_signal_connect_swapped</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-1785" name="line-1785"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">lookup_word</span><span class="p">),</span> +<a id="line-1786" name="line-1786"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1787" name="line-1787"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1788" name="line-1788"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">);</span> +<a id="line-1789" name="line-1789"></a> +<a id="line-1790" name="line-1790"></a><span class="w"> </span><span class="n">handle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_paned_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_HORIZONTAL</span><span class="p">);</span> +<a id="line-1791" name="line-1791"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">vbox</span><span class="p">),</span><span class="w"> </span><span class="n">handle</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1792" name="line-1792"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">handle</span><span class="p">);</span> +<a id="line-1793" name="line-1793"></a> +<a id="line-1794" name="line-1794"></a><span class="w"> </span><span class="n">frame1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1795" name="line-1795"></a><span class="w"> </span><span class="n">frame2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_box_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ORIENTATION_VERTICAL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1796" name="line-1796"></a> +<a id="line-1797" name="line-1797"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_defbox_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1798" name="line-1798"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-1799" name="line-1799"></a><span class="w"> </span><span class="n">gdict_defbox_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-1800" name="line-1800"></a> +<a id="line-1801" name="line-1801"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="s">"link-clicked"</span><span class="p">,</span> +<a id="line-1802" name="line-1802"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_link_clicked</span><span class="p">),</span> +<a id="line-1803" name="line-1803"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1804" name="line-1804"></a> +<a id="line-1805" name="line-1805"></a><span class="w"> </span><span class="n">gtk_drag_dest_set</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">,</span> +<a id="line-1806" name="line-1806"></a><span class="w"> </span><span class="n">GTK_DEST_DEFAULT_ALL</span><span class="p">,</span> +<a id="line-1807" name="line-1807"></a><span class="w"> </span><span class="n">drop_types</span><span class="p">,</span><span class="w"> </span><span class="n">n_drop_types</span><span class="p">,</span> +<a id="line-1808" name="line-1808"></a><span class="w"> </span><span class="n">GDK_ACTION_COPY</span><span class="p">);</span> +<a id="line-1809" name="line-1809"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">,</span><span class="w"> </span><span class="s">"drag-data-received"</span><span class="p">,</span> +<a id="line-1810" name="line-1810"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_drag_data_received_cb</span><span class="p">),</span> +<a id="line-1811" name="line-1811"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1812" name="line-1812"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">frame1</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1813" name="line-1813"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">);</span> +<a id="line-1814" name="line-1814"></a> +<a id="line-1815" name="line-1815"></a><span class="w"> </span><span class="cm">/* Sidebar */</span> +<a id="line-1816" name="line-1816"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_sidebar_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1817" name="line-1817"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">,</span><span class="w"> </span><span class="s">"page-changed"</span><span class="p">,</span> +<a id="line-1818" name="line-1818"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">sidebar_page_changed_cb</span><span class="p">),</span> +<a id="line-1819" name="line-1819"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1820" name="line-1820"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">,</span><span class="w"> </span><span class="s">"closed"</span><span class="p">,</span> +<a id="line-1821" name="line-1821"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">sidebar_closed_cb</span><span class="p">),</span> +<a id="line-1822" name="line-1822"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1823" name="line-1823"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">);</span> +<a id="line-1824" name="line-1824"></a> +<a id="line-1825" name="line-1825"></a><span class="w"> </span><span class="cm">/* Speller */</span> +<a id="line-1826" name="line-1826"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_speller_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1827" name="line-1827"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-1828" name="line-1828"></a><span class="w"> </span><span class="n">gdict_speller_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span> +<a id="line-1829" name="line-1829"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-1830" name="line-1830"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">,</span><span class="w"> </span><span class="s">"word-activated"</span><span class="p">,</span> +<a id="line-1831" name="line-1831"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">speller_word_activated_cb</span><span class="p">),</span> +<a id="line-1832" name="line-1832"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1833" name="line-1833"></a><span class="w"> </span><span class="n">gdict_sidebar_add_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span> +<a id="line-1834" name="line-1834"></a><span class="w"> </span><span class="n">GDICT_SIDEBAR_SPELLER_PAGE</span><span class="p">,</span> +<a id="line-1835" name="line-1835"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Similar words"</span><span class="p">),</span> +<a id="line-1836" name="line-1836"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">);</span> +<a id="line-1837" name="line-1837"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">);</span> +<a id="line-1838" name="line-1838"></a> +<a id="line-1839" name="line-1839"></a><span class="w"> </span><span class="cm">/* Database chooser */</span> +<a id="line-1840" name="line-1840"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-1841" name="line-1841"></a><span class="w"> </span><span class="n">gdict_database_chooser_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DATABASE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">db_chooser</span><span class="p">),</span> +<a id="line-1842" name="line-1842"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-1843" name="line-1843"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">db_chooser</span><span class="p">,</span><span class="w"> </span><span class="s">"database-activated"</span><span class="p">,</span> +<a id="line-1844" name="line-1844"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">database_activated_cb</span><span class="p">),</span> +<a id="line-1845" name="line-1845"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1846" name="line-1846"></a><span class="w"> </span><span class="n">gdict_sidebar_add_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span> +<a id="line-1847" name="line-1847"></a><span class="w"> </span><span class="n">GDICT_SIDEBAR_DATABASES_PAGE</span><span class="p">,</span> +<a id="line-1848" name="line-1848"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Available dictionaries"</span><span class="p">),</span> +<a id="line-1849" name="line-1849"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">db_chooser</span><span class="p">);</span> +<a id="line-1850" name="line-1850"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">db_chooser</span><span class="p">);</span> +<a id="line-1851" name="line-1851"></a> +<a id="line-1852" name="line-1852"></a><span class="w"> </span><span class="cm">/* bind the database property to the database setting */</span> +<a id="line-1853" name="line-1853"></a><span class="w"> </span><span class="n">g_settings_bind</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_DATABASE_KEY</span><span class="p">,</span> +<a id="line-1854" name="line-1854"></a><span class="w"> </span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"database"</span><span class="p">,</span> +<a id="line-1855" name="line-1855"></a><span class="w"> </span><span class="n">G_SETTINGS_BIND_DEFAULT</span><span class="p">);</span> +<a id="line-1856" name="line-1856"></a> +<a id="line-1857" name="line-1857"></a><span class="w"> </span><span class="cm">/* Strategy chooser */</span> +<a id="line-1858" name="line-1858"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">)</span> +<a id="line-1859" name="line-1859"></a><span class="w"> </span><span class="n">gdict_strategy_chooser_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_STRATEGY_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strat_chooser</span><span class="p">),</span> +<a id="line-1860" name="line-1860"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="p">);</span> +<a id="line-1861" name="line-1861"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strat_chooser</span><span class="p">,</span><span class="w"> </span><span class="s">"strategy-activated"</span><span class="p">,</span> +<a id="line-1862" name="line-1862"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">strategy_activated_cb</span><span class="p">),</span> +<a id="line-1863" name="line-1863"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1864" name="line-1864"></a><span class="w"> </span><span class="n">gdict_sidebar_add_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span> +<a id="line-1865" name="line-1865"></a><span class="w"> </span><span class="n">GDICT_SIDEBAR_STRATEGIES_PAGE</span><span class="p">,</span> +<a id="line-1866" name="line-1866"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Available strategies"</span><span class="p">),</span> +<a id="line-1867" name="line-1867"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strat_chooser</span><span class="p">);</span> +<a id="line-1868" name="line-1868"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">strat_chooser</span><span class="p">);</span> +<a id="line-1869" name="line-1869"></a> +<a id="line-1870" name="line-1870"></a><span class="w"> </span><span class="cm">/* bind the strategy property to the strategy setting */</span> +<a id="line-1871" name="line-1871"></a><span class="w"> </span><span class="n">g_settings_bind</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_STRATEGY_KEY</span><span class="p">,</span> +<a id="line-1872" name="line-1872"></a><span class="w"> </span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"strategy"</span><span class="p">,</span> +<a id="line-1873" name="line-1873"></a><span class="w"> </span><span class="n">G_SETTINGS_BIND_DEFAULT</span><span class="p">);</span> +<a id="line-1874" name="line-1874"></a> +<a id="line-1875" name="line-1875"></a><span class="w"> </span><span class="cm">/* Source chooser */</span> +<a id="line-1876" name="line-1876"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_chooser_new_with_loader</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">);</span> +<a id="line-1877" name="line-1877"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_chooser</span><span class="p">,</span><span class="w"> </span><span class="s">"source-activated"</span><span class="p">,</span> +<a id="line-1878" name="line-1878"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">source_activated_cb</span><span class="p">),</span> +<a id="line-1879" name="line-1879"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1880" name="line-1880"></a><span class="w"> </span><span class="n">gdict_sidebar_add_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span> +<a id="line-1881" name="line-1881"></a><span class="w"> </span><span class="n">GDICT_SIDEBAR_SOURCES_PAGE</span><span class="p">,</span> +<a id="line-1882" name="line-1882"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Dictionary sources"</span><span class="p">),</span> +<a id="line-1883" name="line-1883"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_chooser</span><span class="p">);</span> +<a id="line-1884" name="line-1884"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">source_chooser</span><span class="p">);</span> +<a id="line-1885" name="line-1885"></a> +<a id="line-1886" name="line-1886"></a><span class="w"> </span><span class="cm">/* bind the source-name property to the source setting */</span> +<a id="line-1887" name="line-1887"></a><span class="w"> </span><span class="n">g_settings_bind</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_SETTINGS_SOURCE_KEY</span><span class="p">,</span> +<a id="line-1888" name="line-1888"></a><span class="w"> </span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"source-name"</span><span class="p">,</span> +<a id="line-1889" name="line-1889"></a><span class="w"> </span><span class="n">G_SETTINGS_BIND_DEFAULT</span><span class="p">);</span> +<a id="line-1890" name="line-1890"></a> +<a id="line-1891" name="line-1891"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">frame2</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">);</span> +<a id="line-1892" name="line-1892"></a> +<a id="line-1893" name="line-1893"></a><span class="w"> </span><span class="n">gtk_paned_pack1</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_PANED</span><span class="w"> </span><span class="p">(</span><span class="n">handle</span><span class="p">),</span><span class="w"> </span><span class="n">frame1</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1894" name="line-1894"></a><span class="w"> </span><span class="n">gtk_paned_pack2</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_PANED</span><span class="w"> </span><span class="p">(</span><span class="n">handle</span><span class="p">),</span><span class="w"> </span><span class="n">frame2</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1895" name="line-1895"></a> +<a id="line-1896" name="line-1896"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">defbox_frame</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">frame1</span><span class="p">;</span> +<a id="line-1897" name="line-1897"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_frame</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">frame2</span><span class="p">;</span> +<a id="line-1898" name="line-1898"></a> +<a id="line-1899" name="line-1899"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox_frame</span><span class="p">);</span> +<a id="line-1900" name="line-1900"></a> +<a id="line-1901" name="line-1901"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="p">)</span> +<a id="line-1902" name="line-1902"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1903" name="line-1903"></a><span class="w"> </span><span class="n">GAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">;</span> +<a id="line-1904" name="line-1904"></a> +<a id="line-1905" name="line-1905"></a><span class="w"> </span><span class="n">action</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_action_map_lookup_action</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION_MAP</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">action_group</span><span class="p">),</span><span class="w"> </span><span class="s">"ViewSidebar"</span><span class="p">);</span> +<a id="line-1906" name="line-1906"></a><span class="w"> </span><span class="n">g_simple_action_set_state</span><span class="w"> </span><span class="p">(</span><span class="n">G_SIMPLE_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">),</span><span class="w"> </span><span class="n">g_variant_new_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">));</span> +<a id="line-1907" name="line-1907"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_frame</span><span class="p">);</span> +<a id="line-1908" name="line-1908"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1909" name="line-1909"></a> +<a id="line-1910" name="line-1910"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_statusbar_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1911" name="line-1911"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">main_box</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1912" name="line-1912"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="p">)</span> +<a id="line-1913" name="line-1913"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1914" name="line-1914"></a><span class="w"> </span><span class="n">GAction</span><span class="w"> </span><span class="o">*</span><span class="n">action</span><span class="p">;</span> +<a id="line-1915" name="line-1915"></a> +<a id="line-1916" name="line-1916"></a><span class="w"> </span><span class="n">action</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_action_map_lookup_action</span><span class="w"> </span><span class="p">(</span><span class="n">G_ACTION_MAP</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">action_group</span><span class="p">),</span><span class="w"> </span><span class="s">"ViewStatusbar"</span><span class="p">);</span> +<a id="line-1917" name="line-1917"></a><span class="w"> </span><span class="n">g_simple_action_set_state</span><span class="w"> </span><span class="p">(</span><span class="n">G_SIMPLE_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">),</span><span class="w"> </span><span class="n">g_variant_new_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">));</span> +<a id="line-1918" name="line-1918"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">);</span> +<a id="line-1919" name="line-1919"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1920" name="line-1920"></a> +<a id="line-1921" name="line-1921"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">progress</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_progress_bar_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1922" name="line-1922"></a><span class="w"> </span><span class="n">gtk_box_pack_end</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">status</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">progress</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1923" name="line-1923"></a> +<a id="line-1924" name="line-1924"></a><span class="w"> </span><span class="cm">/* retrieve the document font size */</span> +<a id="line-1925" name="line-1925"></a><span class="w"> </span><span class="n">font_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">desktop_settings</span><span class="p">,</span><span class="w"> </span><span class="n">DOCUMENT_FONT_KEY</span><span class="p">);</span> +<a id="line-1926" name="line-1926"></a><span class="w"> </span><span class="n">gdict_window_set_defbox_font</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">font_name</span><span class="p">);</span> +<a id="line-1927" name="line-1927"></a><span class="w"> </span><span class="n">font_desc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pango_font_description_from_string</span><span class="w"> </span><span class="p">(</span><span class="n">font_name</span><span class="p">);</span> +<a id="line-1928" name="line-1928"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">font_name</span><span class="p">);</span> +<a id="line-1929" name="line-1929"></a> +<a id="line-1930" name="line-1930"></a><span class="w"> </span><span class="n">g_settings_bind</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">desktop_settings</span><span class="p">,</span><span class="w"> </span><span class="n">DOCUMENT_FONT_KEY</span><span class="p">,</span> +<a id="line-1931" name="line-1931"></a><span class="w"> </span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"defbox-font"</span><span class="p">,</span> +<a id="line-1932" name="line-1932"></a><span class="w"> </span><span class="n">G_SETTINGS_BIND_GET</span><span class="p">);</span> +<a id="line-1933" name="line-1933"></a> +<a id="line-1934" name="line-1934"></a><span class="w"> </span><span class="cm">/* if the (width, height) tuple is not defined, use the font to</span> +<a id="line-1935" name="line-1935"></a><span class="cm"> * calculate the right window geometry</span> +<a id="line-1936" name="line-1936"></a><span class="cm"> */</span> +<a id="line-1937" name="line-1937"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">default_width</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_height</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-1938" name="line-1938"></a><span class="w"> </span><span class="p">{</span> +<a id="line-1939" name="line-1939"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">font_size</span><span class="p">;</span> +<a id="line-1940" name="line-1940"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-1941" name="line-1941"></a> +<a id="line-1942" name="line-1942"></a><span class="w"> </span><span class="n">font_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pango_font_description_get_size</span><span class="w"> </span><span class="p">(</span><span class="n">font_desc</span><span class="p">);</span> +<a id="line-1943" name="line-1943"></a><span class="w"> </span><span class="n">font_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PANGO_PIXELS</span><span class="w"> </span><span class="p">(</span><span class="n">font_size</span><span class="p">);</span> +<a id="line-1944" name="line-1944"></a> +<a id="line-1945" name="line-1945"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_WINDOW_COLUMNS</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">font_size</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_WINDOW_MIN_WIDTH</span><span class="p">);</span> +<a id="line-1946" name="line-1946"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_WINDOW_ROWS</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">font_size</span><span class="p">,</span><span class="w"> </span><span class="n">GDICT_WINDOW_MIN_HEIGHT</span><span class="p">);</span> +<a id="line-1947" name="line-1947"></a> +<a id="line-1948" name="line-1948"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">width</span><span class="p">;</span> +<a id="line-1949" name="line-1949"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-1950" name="line-1950"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1951" name="line-1951"></a> +<a id="line-1952" name="line-1952"></a><span class="w"> </span><span class="n">pango_font_description_free</span><span class="w"> </span><span class="p">(</span><span class="n">font_desc</span><span class="p">);</span> +<a id="line-1953" name="line-1953"></a> +<a id="line-1954" name="line-1954"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Dictionary"</span><span class="p">));</span> +<a id="line-1955" name="line-1955"></a><span class="w"> </span><span class="n">gtk_window_set_default_size</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-1956" name="line-1956"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_width</span><span class="p">,</span> +<a id="line-1957" name="line-1957"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_height</span><span class="p">);</span> +<a id="line-1958" name="line-1958"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">is_maximized</span><span class="p">)</span> +<a id="line-1959" name="line-1959"></a><span class="w"> </span><span class="n">gtk_window_maximize</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-1960" name="line-1960"></a> +<a id="line-1961" name="line-1961"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-1962" name="line-1962"></a><span class="w"> </span><span class="n">gtk_paned_set_position</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_PANED</span><span class="w"> </span><span class="p">(</span><span class="n">handle</span><span class="p">),</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_width</span><span class="p">);</span> +<a id="line-1963" name="line-1963"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_page</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-1964" name="line-1964"></a><span class="w"> </span><span class="n">gdict_sidebar_view_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_page</span><span class="p">);</span> +<a id="line-1965" name="line-1965"></a><span class="w"> </span><span class="k">else</span> +<a id="line-1966" name="line-1966"></a><span class="w"> </span><span class="n">gdict_sidebar_view_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span><span class="w"> </span><span class="n">GDICT_SIDEBAR_SPELLER_PAGE</span><span class="p">);</span> +<a id="line-1967" name="line-1967"></a> +<a id="line-1968" name="line-1968"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"delete-event"</span><span class="p">,</span> +<a id="line-1969" name="line-1969"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_delete_event_cb</span><span class="p">),</span> +<a id="line-1970" name="line-1970"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1971" name="line-1971"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"window-state-event"</span><span class="p">,</span> +<a id="line-1972" name="line-1972"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_state_event_cb</span><span class="p">),</span> +<a id="line-1973" name="line-1973"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1974" name="line-1974"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">handle</span><span class="p">,</span><span class="w"> </span><span class="s">"notify::position"</span><span class="p">,</span> +<a id="line-1975" name="line-1975"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gdict_window_handle_notify_position_cb</span><span class="p">),</span> +<a id="line-1976" name="line-1976"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-1977" name="line-1977"></a> +<a id="line-1978" name="line-1978"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">);</span> +<a id="line-1979" name="line-1979"></a> +<a id="line-1980" name="line-1980"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">in_construction</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1981" name="line-1981"></a> +<a id="line-1982" name="line-1982"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">object</span><span class="p">;</span> +<a id="line-1983" name="line-1983"></a><span class="p">}</span> +<a id="line-1984" name="line-1984"></a> +<a id="line-1985" name="line-1985"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1986" name="line-1986"></a><span class="nf">gdict_window_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindowClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-1987" name="line-1987"></a><span class="p">{</span> +<a id="line-1988" name="line-1988"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">gobject_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-1989" name="line-1989"></a><span class="w"> </span><span class="n">GtkWidgetClass</span><span class="w"> </span><span class="o">*</span><span class="n">widget_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-1990" name="line-1990"></a> +<a id="line-1991" name="line-1991"></a><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_ACTION</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-1992" name="line-1992"></a><span class="w"> </span><span class="n">g_param_spec_enum</span><span class="w"> </span><span class="p">(</span><span class="s">"action"</span><span class="p">,</span> +<a id="line-1993" name="line-1993"></a><span class="w"> </span><span class="s">"Action"</span><span class="p">,</span> +<a id="line-1994" name="line-1994"></a><span class="w"> </span><span class="s">"The default action performed by the window"</span><span class="p">,</span> +<a id="line-1995" name="line-1995"></a><span class="w"> </span><span class="n">GDICT_TYPE_WINDOW_ACTION</span><span class="p">,</span> +<a id="line-1996" name="line-1996"></a><span class="w"> </span><span class="n">GDICT_WINDOW_ACTION_CLEAR</span><span class="p">,</span> +<a id="line-1997" name="line-1997"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span> +<a id="line-1998" name="line-1998"></a><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="w"> </span><span class="o">|</span> +<a id="line-1999" name="line-1999"></a><span class="w"> </span><span class="n">G_PARAM_CONSTRUCT_ONLY</span><span class="p">);</span> +<a id="line-2000" name="line-2000"></a> +<a id="line-2001" name="line-2001"></a><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_SOURCE_LOADER</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-2002" name="line-2002"></a><span class="w"> </span><span class="n">g_param_spec_object</span><span class="w"> </span><span class="p">(</span><span class="s">"source-loader"</span><span class="p">,</span> +<a id="line-2003" name="line-2003"></a><span class="w"> </span><span class="s">"Source Loader"</span><span class="p">,</span> +<a id="line-2004" name="line-2004"></a><span class="w"> </span><span class="s">"The GdictSourceLoader to be used to load dictionary sources"</span><span class="p">,</span> +<a id="line-2005" name="line-2005"></a><span class="w"> </span><span class="n">GDICT_TYPE_SOURCE_LOADER</span><span class="p">,</span> +<a id="line-2006" name="line-2006"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span> +<a id="line-2007" name="line-2007"></a><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="w"> </span><span class="o">|</span> +<a id="line-2008" name="line-2008"></a><span class="w"> </span><span class="n">G_PARAM_CONSTRUCT_ONLY</span><span class="p">);</span> +<a id="line-2009" name="line-2009"></a> +<a id="line-2010" name="line-2010"></a><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_SOURCE_NAME</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-2011" name="line-2011"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"source-name"</span><span class="p">,</span> +<a id="line-2012" name="line-2012"></a><span class="w"> </span><span class="s">"Source Name"</span><span class="p">,</span> +<a id="line-2013" name="line-2013"></a><span class="w"> </span><span class="s">"The name of the GdictSource to be used"</span><span class="p">,</span> +<a id="line-2014" name="line-2014"></a><span class="w"> </span><span class="n">GDICT_DEFAULT_SOURCE_NAME</span><span class="p">,</span> +<a id="line-2015" name="line-2015"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="p">);</span> +<a id="line-2016" name="line-2016"></a> +<a id="line-2017" name="line-2017"></a><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_DATABASE</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-2018" name="line-2018"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"database"</span><span class="p">,</span> +<a id="line-2019" name="line-2019"></a><span class="w"> </span><span class="s">"Database"</span><span class="p">,</span> +<a id="line-2020" name="line-2020"></a><span class="w"> </span><span class="s">"The name of the database to search"</span><span class="p">,</span> +<a id="line-2021" name="line-2021"></a><span class="w"> </span><span class="n">GDICT_DEFAULT_DATABASE</span><span class="p">,</span> +<a id="line-2022" name="line-2022"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="p">);</span> +<a id="line-2023" name="line-2023"></a> +<a id="line-2024" name="line-2024"></a><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_STRATEGY</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-2025" name="line-2025"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"strategy"</span><span class="p">,</span> +<a id="line-2026" name="line-2026"></a><span class="w"> </span><span class="s">"Strategy"</span><span class="p">,</span> +<a id="line-2027" name="line-2027"></a><span class="w"> </span><span class="s">"The name of the strategy"</span><span class="p">,</span> +<a id="line-2028" name="line-2028"></a><span class="w"> </span><span class="n">GDICT_DEFAULT_STRATEGY</span><span class="p">,</span> +<a id="line-2029" name="line-2029"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="p">);</span> +<a id="line-2030" name="line-2030"></a> +<a id="line-2031" name="line-2031"></a><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_PRINT_FONT</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-2032" name="line-2032"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"print-font"</span><span class="p">,</span> +<a id="line-2033" name="line-2033"></a><span class="w"> </span><span class="s">"Print Font"</span><span class="p">,</span> +<a id="line-2034" name="line-2034"></a><span class="w"> </span><span class="s">"The font name to be used when printing"</span><span class="p">,</span> +<a id="line-2035" name="line-2035"></a><span class="w"> </span><span class="n">GDICT_DEFAULT_PRINT_FONT</span><span class="p">,</span> +<a id="line-2036" name="line-2036"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="p">);</span> +<a id="line-2037" name="line-2037"></a> +<a id="line-2038" name="line-2038"></a><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_DEFBOX_FONT</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-2039" name="line-2039"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"defbox-font"</span><span class="p">,</span> +<a id="line-2040" name="line-2040"></a><span class="w"> </span><span class="s">"Defbox Font"</span><span class="p">,</span> +<a id="line-2041" name="line-2041"></a><span class="w"> </span><span class="s">"The font name to be used by the defbox widget"</span><span class="p">,</span> +<a id="line-2042" name="line-2042"></a><span class="w"> </span><span class="n">GDICT_DEFAULT_DEFBOX_FONT</span><span class="p">,</span> +<a id="line-2043" name="line-2043"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="p">);</span> +<a id="line-2044" name="line-2044"></a> +<a id="line-2045" name="line-2045"></a><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_WORD</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-2046" name="line-2046"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"word"</span><span class="p">,</span> +<a id="line-2047" name="line-2047"></a><span class="w"> </span><span class="s">"Word"</span><span class="p">,</span> +<a id="line-2048" name="line-2048"></a><span class="w"> </span><span class="s">"The word to search"</span><span class="p">,</span> +<a id="line-2049" name="line-2049"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-2050" name="line-2050"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="p">);</span> +<a id="line-2051" name="line-2051"></a> +<a id="line-2052" name="line-2052"></a><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">[</span><span class="n">PROP_WINDOW_ID</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-2053" name="line-2053"></a><span class="w"> </span><span class="n">g_param_spec_uint</span><span class="w"> </span><span class="p">(</span><span class="s">"window-id"</span><span class="p">,</span> +<a id="line-2054" name="line-2054"></a><span class="w"> </span><span class="s">"Window ID"</span><span class="p">,</span> +<a id="line-2055" name="line-2055"></a><span class="w"> </span><span class="s">"The unique identifier for this window"</span><span class="p">,</span> +<a id="line-2056" name="line-2056"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_MAXUINT</span><span class="p">,</span> +<a id="line-2057" name="line-2057"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-2058" name="line-2058"></a><span class="w"> </span><span class="n">G_PARAM_READABLE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="p">);</span> +<a id="line-2059" name="line-2059"></a> +<a id="line-2060" name="line-2060"></a><span class="w"> </span><span class="n">gdict_window_signals</span><span class="p">[</span><span class="n">CREATED</span><span class="p">]</span><span class="w"> </span><span class="o">=</span> +<a id="line-2061" name="line-2061"></a><span class="w"> </span><span class="n">g_signal_new</span><span class="w"> </span><span class="p">(</span><span class="s">"created"</span><span class="p">,</span> +<a id="line-2062" name="line-2062"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS_TYPE</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">),</span> +<a id="line-2063" name="line-2063"></a><span class="w"> </span><span class="n">G_SIGNAL_RUN_LAST</span><span class="p">,</span> +<a id="line-2064" name="line-2064"></a><span class="w"> </span><span class="n">G_STRUCT_OFFSET</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindowClass</span><span class="p">,</span><span class="w"> </span><span class="n">created</span><span class="p">),</span> +<a id="line-2065" name="line-2065"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-2066" name="line-2066"></a><span class="w"> </span><span class="n">g_cclosure_marshal_VOID__OBJECT</span><span class="p">,</span> +<a id="line-2067" name="line-2067"></a><span class="w"> </span><span class="n">G_TYPE_NONE</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span> +<a id="line-2068" name="line-2068"></a><span class="w"> </span><span class="n">GDICT_TYPE_WINDOW</span><span class="p">);</span> +<a id="line-2069" name="line-2069"></a> +<a id="line-2070" name="line-2070"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_window_finalize</span><span class="p">;</span> +<a id="line-2071" name="line-2071"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">dispose</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_window_dispose</span><span class="p">;</span> +<a id="line-2072" name="line-2072"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">set_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_window_set_property</span><span class="p">;</span> +<a id="line-2073" name="line-2073"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">get_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_window_get_property</span><span class="p">;</span> +<a id="line-2074" name="line-2074"></a><span class="w"> </span><span class="n">gobject_class</span><span class="o">-></span><span class="n">constructor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_window_constructor</span><span class="p">;</span> +<a id="line-2075" name="line-2075"></a> +<a id="line-2076" name="line-2076"></a><span class="w"> </span><span class="n">g_object_class_install_properties</span><span class="w"> </span><span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> +<a id="line-2077" name="line-2077"></a><span class="w"> </span><span class="n">LAST_PROP</span><span class="p">,</span> +<a id="line-2078" name="line-2078"></a><span class="w"> </span><span class="n">gdict_window_properties</span><span class="p">);</span> +<a id="line-2079" name="line-2079"></a> +<a id="line-2080" name="line-2080"></a><span class="w"> </span><span class="n">widget_class</span><span class="o">-></span><span class="n">size_allocate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_window_size_allocate</span><span class="p">;</span> +<a id="line-2081" name="line-2081"></a><span class="p">}</span> +<a id="line-2082" name="line-2082"></a> +<a id="line-2083" name="line-2083"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-2084" name="line-2084"></a><span class="nf">gdict_window_init</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-2085" name="line-2085"></a><span class="p">{</span> +<a id="line-2086" name="line-2086"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">action</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW_ACTION_CLEAR</span><span class="p">;</span> +<a id="line-2087" name="line-2087"></a> +<a id="line-2088" name="line-2088"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2089" name="line-2089"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2090" name="line-2090"></a> +<a id="line-2091" name="line-2091"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SETTINGS_SCHEMA</span><span class="p">);</span> +<a id="line-2092" name="line-2092"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">desktop_settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="n">DESKTOP_SETTINGS_SCHEMA</span><span class="p">);</span> +<a id="line-2093" name="line-2093"></a> +<a id="line-2094" name="line-2094"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">word</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2095" name="line-2095"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2096" name="line-2096"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">print_font</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2097" name="line-2097"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">defbox_font</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2098" name="line-2098"></a> +<a id="line-2099" name="line-2099"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">database</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2100" name="line-2100"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2101" name="line-2101"></a> +<a id="line-2102" name="line-2102"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-2103" name="line-2103"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">default_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-2104" name="line-2104"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">is_maximized</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2105" name="line-2105"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2106" name="line-2106"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">statusbar_visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-2107" name="line-2107"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">sidebar_page</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-2108" name="line-2108"></a> +<a id="line-2109" name="line-2109"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">window_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gulong</span><span class="p">)</span><span class="w"> </span><span class="n">time</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2110" name="line-2110"></a> +<a id="line-2111" name="line-2111"></a><span class="w"> </span><span class="cm">/* we need to create the chooser widgets for the sidebar before</span> +<a id="line-2112" name="line-2112"></a><span class="cm"> * we set the construction properties</span> +<a id="line-2113" name="line-2113"></a><span class="cm"> */</span> +<a id="line-2114" name="line-2114"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">db_chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_database_chooser_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2115" name="line-2115"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strat_chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_strategy_chooser_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-2116" name="line-2116"></a><span class="p">}</span> +<a id="line-2117" name="line-2117"></a> +<a id="line-2118" name="line-2118"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-2119" name="line-2119"></a><span class="nf">gdict_window_new</span><span class="w"> </span><span class="p">(</span><span class="n">GdictWindowAction</span><span class="w"> </span><span class="n">action</span><span class="p">,</span> +<a id="line-2120" name="line-2120"></a><span class="w"> </span><span class="n">GdictSourceLoader</span><span class="w"> </span><span class="o">*</span><span class="n">loader</span><span class="p">,</span> +<a id="line-2121" name="line-2121"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">source_name</span><span class="p">,</span> +<a id="line-2122" name="line-2122"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">word</span><span class="p">)</span> +<a id="line-2123" name="line-2123"></a><span class="p">{</span> +<a id="line-2124" name="line-2124"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">retval</span><span class="p">;</span> +<a id="line-2125" name="line-2125"></a><span class="w"> </span><span class="n">GdictWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-2126" name="line-2126"></a> +<a id="line-2127" name="line-2127"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_IS_SOURCE_LOADER</span><span class="w"> </span><span class="p">(</span><span class="n">loader</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2128" name="line-2128"></a> +<a id="line-2129" name="line-2129"></a><span class="w"> </span><span class="n">retval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_TYPE_WINDOW</span><span class="p">,</span> +<a id="line-2130" name="line-2130"></a><span class="w"> </span><span class="s">"action"</span><span class="p">,</span><span class="w"> </span><span class="n">action</span><span class="p">,</span> +<a id="line-2131" name="line-2131"></a><span class="w"> </span><span class="s">"source-loader"</span><span class="p">,</span><span class="w"> </span><span class="n">loader</span><span class="p">,</span> +<a id="line-2132" name="line-2132"></a><span class="w"> </span><span class="s">"source-name"</span><span class="p">,</span><span class="w"> </span><span class="n">source_name</span><span class="p">,</span> +<a id="line-2133" name="line-2133"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2134" name="line-2134"></a> +<a id="line-2135" name="line-2135"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDICT_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">retval</span><span class="p">);</span> +<a id="line-2136" name="line-2136"></a> +<a id="line-2137" name="line-2137"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">word</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">word</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">)</span> +<a id="line-2138" name="line-2138"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2139" name="line-2139"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">)</span> +<a id="line-2140" name="line-2140"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2141" name="line-2141"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_WINDOW_ACTION_LOOKUP</span><span class="p">:</span> +<a id="line-2142" name="line-2142"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="n">word</span><span class="p">);</span> +<a id="line-2143" name="line-2143"></a><span class="w"> </span><span class="n">gdict_window_set_word</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">word</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-2144" name="line-2144"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2145" name="line-2145"></a> +<a id="line-2146" name="line-2146"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_WINDOW_ACTION_MATCH</span><span class="p">:</span> +<a id="line-2147" name="line-2147"></a><span class="w"> </span><span class="p">{</span> +<a id="line-2148" name="line-2148"></a><span class="w"> </span><span class="n">GdictSource</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">;</span> +<a id="line-2149" name="line-2149"></a><span class="w"> </span><span class="n">GdictContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-2150" name="line-2150"></a> +<a id="line-2151" name="line-2151"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="n">word</span><span class="p">);</span> +<a id="line-2152" name="line-2152"></a> +<a id="line-2153" name="line-2153"></a><span class="w"> </span><span class="n">gdict_window_set_sidebar_visible</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-2154" name="line-2154"></a><span class="w"> </span><span class="n">gdict_sidebar_view_page</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SIDEBAR</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">sidebar</span><span class="p">),</span> +<a id="line-2155" name="line-2155"></a><span class="w"> </span><span class="n">GDICT_SIDEBAR_SPELLER_PAGE</span><span class="p">);</span> +<a id="line-2156" name="line-2156"></a> +<a id="line-2157" name="line-2157"></a><span class="w"> </span><span class="cm">/* we clone the context, so that the signals that it</span> +<a id="line-2158" name="line-2158"></a><span class="cm"> * fires do not get caught by the signal handlers we</span> +<a id="line-2159" name="line-2159"></a><span class="cm"> * use for getting the definitions.</span> +<a id="line-2160" name="line-2160"></a><span class="cm"> */</span> +<a id="line-2161" name="line-2161"></a><span class="w"> </span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_loader_get_source</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">loader</span><span class="p">,</span> +<a id="line-2162" name="line-2162"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">source_name</span><span class="p">);</span> +<a id="line-2163" name="line-2163"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdict_source_get_context</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-2164" name="line-2164"></a> +<a id="line-2165" name="line-2165"></a><span class="w"> </span><span class="n">gdict_speller_set_context</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="n">context</span><span class="p">);</span> +<a id="line-2166" name="line-2166"></a> +<a id="line-2167" name="line-2167"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-2168" name="line-2168"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">);</span> +<a id="line-2169" name="line-2169"></a> +<a id="line-2170" name="line-2170"></a><span class="w"> </span><span class="n">gdict_speller_set_strategy</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span> +<a id="line-2171" name="line-2171"></a><span class="w"> </span><span class="n">window</span><span class="o">-></span><span class="n">strategy</span><span class="p">);</span> +<a id="line-2172" name="line-2172"></a> +<a id="line-2173" name="line-2173"></a><span class="w"> </span><span class="n">gdict_speller_match</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_SPELLER</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">speller</span><span class="p">),</span><span class="w"> </span><span class="n">word</span><span class="p">);</span> +<a id="line-2174" name="line-2174"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2175" name="line-2175"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2176" name="line-2176"></a> +<a id="line-2177" name="line-2177"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">GDICT_WINDOW_ACTION_CLEAR</span><span class="p">:</span> +<a id="line-2178" name="line-2178"></a><span class="w"> </span><span class="n">gdict_defbox_clear</span><span class="w"> </span><span class="p">(</span><span class="n">GDICT_DEFBOX</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="o">-></span><span class="n">defbox</span><span class="p">));</span> +<a id="line-2179" name="line-2179"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2180" name="line-2180"></a> +<a id="line-2181" name="line-2181"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-2182" name="line-2182"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-2183" name="line-2183"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-2184" name="line-2184"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2185" name="line-2185"></a><span class="w"> </span><span class="p">}</span> +<a id="line-2186" name="line-2186"></a> +<a id="line-2187" name="line-2187"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retval</span><span class="p">;</span> +<a id="line-2188" name="line-2188"></a><span class="p">}</span> +<a id="line-2189" name="line-2189"></a> +<a id="line-2190" name="line-2190"></a><span class="cm">/* GdictWindowAction */</span> +<a id="line-2191" name="line-2191"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GEnumValue</span><span class="w"> </span><span class="n">_gdict_window_action_values</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-2192" name="line-2192"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDICT_WINDOW_ACTION_LOOKUP</span><span class="p">,</span><span class="w"> </span><span class="s">"GDICT_WINDOW_ACTION_LOOKUP"</span><span class="p">,</span><span class="w"> </span><span class="s">"lookup"</span><span class="w"> </span><span class="p">},</span> +<a id="line-2193" name="line-2193"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDICT_WINDOW_ACTION_MATCH</span><span class="p">,</span><span class="w"> </span><span class="s">"GDICT_WINDOW_ACTION_MATCH"</span><span class="p">,</span><span class="w"> </span><span class="s">"match"</span><span class="w"> </span><span class="p">},</span> +<a id="line-2194" name="line-2194"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">GDICT_WINDOW_ACTION_CLEAR</span><span class="p">,</span><span class="w"> </span><span class="s">"GDICT_WINDOW_ACTION_CLEAR"</span><span class="p">,</span><span class="w"> </span><span class="s">"clear"</span><span class="w"> </span><span class="p">},</span> +<a id="line-2195" name="line-2195"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">}</span> +<a id="line-2196" name="line-2196"></a><span class="p">};</span> +<a id="line-2197" name="line-2197"></a> +<a id="line-2198" name="line-2198"></a><span class="n">GType</span> +<a id="line-2199" name="line-2199"></a><span class="nf">gdict_window_action_get_type</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-2200" name="line-2200"></a><span class="p">{</span> +<a id="line-2201" name="line-2201"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GType</span><span class="w"> </span><span class="n">our_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-2202" name="line-2202"></a> +<a id="line-2203" name="line-2203"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">our_type</span><span class="p">)</span> +<a id="line-2204" name="line-2204"></a><span class="w"> </span><span class="n">our_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_enum_register_static</span><span class="w"> </span><span class="p">(</span><span class="s">"GdictWindowAction"</span><span class="p">,</span><span class="w"> </span><span class="n">_gdict_window_action_values</span><span class="p">);</span> +<a id="line-2205" name="line-2205"></a> +<a id="line-2206" name="line-2206"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">our_type</span><span class="p">;</span> +<a id="line-2207" name="line-2207"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/35.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/35.html new file mode 100644 index 00000000..2da69c73 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/35.html @@ -0,0 +1,997 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-screenshot/src/screenshot-dialog.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> screenshot-dialog.c</p> +<a href="35.html#line-175"> shadowVariable 175</a><a href="35.html#line-205"> shadowVariable 205</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2001-2006 Jonathan Blandford <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-22" name="line-22"></a><span class="cp">#endif</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-26" name="line-26"></a> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"screenshot-dialog.h"</span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"screenshot-save.h"</span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkkeysyms.h></span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-32" name="line-32"></a> +<a id="line-33" name="line-33"></a><span class="cp">#define GET_WIDGET(x) (GTK_WIDGET (gtk_builder_get_object (dialog->builder, (x))))</span> +<a id="line-34" name="line-34"></a> +<a id="line-35" name="line-35"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="n">TYPE_IMAGE_PNG</span><span class="p">,</span> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="n">TYPE_TEXT_URI_LIST</span><span class="p">,</span> +<a id="line-38" name="line-38"></a> +<a id="line-39" name="line-39"></a><span class="w"> </span><span class="n">LAST_TYPE</span> +<a id="line-40" name="line-40"></a><span class="p">};</span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkTargetEntry</span><span class="w"> </span><span class="n">drag_types</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span> +<a id="line-43" name="line-43"></a><span class="p">{</span> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"image/png"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">TYPE_IMAGE_PNG</span><span class="w"> </span><span class="p">},</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"text/uri-list"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">TYPE_TEXT_URI_LIST</span><span class="w"> </span><span class="p">},</span> +<a id="line-46" name="line-46"></a><span class="p">};</span> +<a id="line-47" name="line-47"></a> +<a id="line-48" name="line-48"></a><span class="k">struct</span><span class="w"> </span><span class="nc">ScreenshotDialog</span> +<a id="line-49" name="line-49"></a><span class="p">{</span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">GtkBuilder</span><span class="w"> </span><span class="o">*</span><span class="n">builder</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">screenshot</span><span class="p">;</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">preview_image</span><span class="p">;</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">save_widget</span><span class="p">;</span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">filename_entry</span><span class="p">;</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">drag_x</span><span class="p">;</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">drag_y</span><span class="p">;</span> +<a id="line-57" name="line-57"></a><span class="p">};</span> +<a id="line-58" name="line-58"></a> +<a id="line-59" name="line-59"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-60" name="line-60"></a><span class="nf">on_toplevel_key_press_event</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">GdkEventKey</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">)</span> +<a id="line-62" name="line-62"></a><span class="p">{</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">key</span><span class="o">-></span><span class="n">keyval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_KEY_F1</span><span class="p">)</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="p">{</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">gtk_dialog_response</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_RESPONSE_HELP</span><span class="p">);</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="p">}</span> +<a id="line-68" name="line-68"></a> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-70" name="line-70"></a><span class="p">}</span> +<a id="line-71" name="line-71"></a> +<a id="line-72" name="line-72"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-73" name="line-73"></a><span class="nf">on_preview_draw</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">drawing_area</span><span class="p">,</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-76" name="line-76"></a><span class="p">{</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="n">GtkStyleContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-80" name="line-80"></a> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_allocated_width</span><span class="w"> </span><span class="p">(</span><span class="n">drawing_area</span><span class="p">);</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_allocated_height</span><span class="w"> </span><span class="p">(</span><span class="n">drawing_area</span><span class="p">);</span> +<a id="line-83" name="line-83"></a> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">dialog</span><span class="o">-></span><span class="n">preview_image</span><span class="w"> </span><span class="o">||</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">gdk_pixbuf_get_width</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">preview_image</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">||</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">gdk_pixbuf_get_height</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">preview_image</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">height</span><span class="p">)</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="p">{</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">g_clear_object</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">dialog</span><span class="o">-></span><span class="n">preview_image</span><span class="p">);</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">preview_image</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_scale_simple</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">screenshot</span><span class="p">,</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">width</span><span class="p">,</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="n">height</span><span class="p">,</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="n">GDK_INTERP_BILINEAR</span><span class="p">);</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="p">}</span> +<a id="line-94" name="line-94"></a> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_style_context</span><span class="w"> </span><span class="p">(</span><span class="n">drawing_area</span><span class="p">);</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">gtk_style_context_save</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-97" name="line-97"></a> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">gtk_style_context_set_state</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_widget_get_state_flags</span><span class="w"> </span><span class="p">(</span><span class="n">drawing_area</span><span class="p">));</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="n">gtk_render_icon</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">preview_image</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-100" name="line-100"></a> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">gtk_style_context_restore</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-102" name="line-102"></a><span class="p">}</span> +<a id="line-103" name="line-103"></a> +<a id="line-104" name="line-104"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-105" name="line-105"></a><span class="nf">on_preview_button_press_event</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">drawing_area</span><span class="p">,</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-108" name="line-108"></a><span class="p">{</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-110" name="line-110"></a> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">drag_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x</span><span class="p">;</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">drag_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y</span><span class="p">;</span> +<a id="line-113" name="line-113"></a> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-115" name="line-115"></a><span class="p">}</span> +<a id="line-116" name="line-116"></a> +<a id="line-117" name="line-117"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-118" name="line-118"></a><span class="nf">on_preview_button_release_event</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">drawing_area</span><span class="p">,</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-121" name="line-121"></a><span class="p">{</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">drag_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">drag_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-126" name="line-126"></a> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-128" name="line-128"></a><span class="p">}</span> +<a id="line-129" name="line-129"></a> +<a id="line-130" name="line-130"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-131" name="line-131"></a><span class="nf">drag_data_get</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="n">GdkDragContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">GtkSelectionData</span><span class="w"> </span><span class="o">*</span><span class="n">selection_data</span><span class="p">,</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">info</span><span class="p">,</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">time</span><span class="p">,</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-137" name="line-137"></a><span class="p">{</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TYPE_TEXT_URI_LIST</span><span class="p">)</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="p">{</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">uris</span><span class="p">;</span> +<a id="line-141" name="line-141"></a> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">uris</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">uris</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="s">"file://"</span><span class="p">,</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">screenshot_save_get_filename</span><span class="w"> </span><span class="p">(),</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">uris</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-147" name="line-147"></a> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">gtk_selection_data_set_uris</span><span class="w"> </span><span class="p">(</span><span class="n">selection_data</span><span class="p">,</span><span class="w"> </span><span class="n">uris</span><span class="p">);</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">);</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="p">}</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TYPE_IMAGE_PNG</span><span class="p">)</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="p">{</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">gtk_selection_data_set_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">selection_data</span><span class="p">,</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">screenshot</span><span class="p">);</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="p">}</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="k">else</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="p">{</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Unknown type %d"</span><span class="p">,</span><span class="w"> </span><span class="n">info</span><span class="p">);</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="p">}</span> +<a id="line-159" name="line-159"></a><span class="p">}</span> +<a id="line-160" name="line-160"></a> +<a id="line-161" name="line-161"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-162" name="line-162"></a><span class="nf">drag_begin</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">GdkDragContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-165" name="line-165"></a><span class="p">{</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">gtk_drag_set_icon_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">preview_image</span><span class="p">,</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">drag_x</span><span class="p">,</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">drag_y</span><span class="p">);</span> +<a id="line-168" name="line-168"></a><span class="p">}</span> +<a id="line-169" name="line-169"></a> +<a id="line-170" name="line-170"></a><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span> +<a id="line-171" name="line-171"></a><span class="nf">screenshot_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">screenshot</span><span class="p">,</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">initial_uri</span><span class="p">,</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">take_window_shot</span><span class="p">)</span> +<a id="line-174" name="line-174"></a><span class="p">{</span> +<a id="line-175" name="line-175"></a><span class="hll"><span class="w"> </span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span><span class="error2"><--- Shadowed declaration</span> +</span><a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">toplevel</span><span class="p">;</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">preview_darea</span><span class="p">;</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">aspect_frame</span><span class="p">;</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">file_chooser_box</span><span class="p">;</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">current_folder</span><span class="p">;</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">current_name</span><span class="p">;</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">ext</span><span class="p">;</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">pos</span><span class="p">;</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">tmp_file</span><span class="p">;</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">parent_file</span><span class="p">;</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-188" name="line-188"></a> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">tmp_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_uri</span><span class="w"> </span><span class="p">(</span><span class="n">initial_uri</span><span class="p">);</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">parent_file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">tmp_file</span><span class="p">);</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">current_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_basename</span><span class="w"> </span><span class="p">(</span><span class="n">tmp_file</span><span class="p">);</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">current_folder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">parent_file</span><span class="p">);</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">tmp_file</span><span class="p">);</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">parent_file</span><span class="p">);</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new0</span><span class="w"> </span><span class="p">(</span><span class="n">ScreenshotDialog</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_builder_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-200" name="line-200"></a> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">screenshot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">screenshot</span><span class="p">;</span> +<a id="line-202" name="line-202"></a> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_builder_add_from_resource</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">builder</span><span class="p">,</span><span class="w"> </span><span class="s">"/org/mate/screenshot/mate-screenshot.ui"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="p">{</span> +<a id="line-205" name="line-205"></a><span class="hll"><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span><span class="error2"><--- Shadow variable</span> +</span><a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Error loading UI definition file for the screenshot program: </span><span class="se">\n</span><span class="s">%s</span><span class="se">\n\n</span><span class="s">"</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="s">"Please check your installation of mate-utils."</span><span class="p">),</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-213" name="line-213"></a> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">exit</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="p">}</span> +<a id="line-217" name="line-217"></a> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">gtk_builder_set_translation_domain</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">builder</span><span class="p">,</span><span class="w"> </span><span class="n">GETTEXT_PACKAGE</span><span class="p">);</span> +<a id="line-219" name="line-219"></a> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_width</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot</span><span class="p">);</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_height</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot</span><span class="p">);</span> +<a id="line-222" name="line-222"></a> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">/=</span><span class="w"> </span><span class="mi">5</span><span class="p">;</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">/=</span><span class="w"> </span><span class="mi">5</span><span class="p">;</span> +<a id="line-225" name="line-225"></a> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">toplevel</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"toplevel"</span><span class="p">);</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">aspect_frame</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"aspect_frame"</span><span class="p">);</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">preview_darea</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"preview_darea"</span><span class="p">);</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">filename_entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"filename_entry"</span><span class="p">);</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">file_chooser_box</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"file_chooser_box"</span><span class="p">);</span> +<a id="line-231" name="line-231"></a> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">save_widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_button_new</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Select a folder"</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</span><span class="p">);</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_local_only</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">save_widget</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_current_folder_uri</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">save_widget</span><span class="p">),</span><span class="w"> </span><span class="n">current_folder</span><span class="p">);</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">gtk_entry_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">filename_entry</span><span class="p">),</span><span class="w"> </span><span class="n">current_name</span><span class="p">);</span> +<a id="line-236" name="line-236"></a> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser_box</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">save_widget</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">current_folder</span><span class="p">);</span> +<a id="line-239" name="line-239"></a> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">gtk_widget_set_size_request</span><span class="w"> </span><span class="p">(</span><span class="n">preview_darea</span><span class="p">,</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">);</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_height</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot</span><span class="p">);</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_width</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot</span><span class="p">);</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">gtk_aspect_frame_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ASPECT_FRAME</span><span class="w"> </span><span class="p">(</span><span class="n">aspect_frame</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mf">0.5</span><span class="p">,</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="p">(</span><span class="n">gfloat</span><span class="p">)</span><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="n">gfloat</span><span class="p">)</span><span class="w"> </span><span class="n">height</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">toplevel</span><span class="p">,</span><span class="w"> </span><span class="s">"key_press_event"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_toplevel_key_press_event</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">preview_darea</span><span class="p">,</span><span class="w"> </span><span class="s">"draw"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_preview_draw</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">preview_darea</span><span class="p">,</span><span class="w"> </span><span class="s">"button_press_event"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_preview_button_press_event</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">preview_darea</span><span class="p">,</span><span class="w"> </span><span class="s">"button_release_event"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_preview_button_release_event</span><span class="p">),</span><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-249" name="line-249"></a> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">take_window_shot</span><span class="p">)</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">gtk_frame_set_shadow_type</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FRAME</span><span class="w"> </span><span class="p">(</span><span class="n">aspect_frame</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_SHADOW_NONE</span><span class="p">);</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="k">else</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">gtk_frame_set_shadow_type</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FRAME</span><span class="w"> </span><span class="p">(</span><span class="n">aspect_frame</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_SHADOW_IN</span><span class="p">);</span> +<a id="line-254" name="line-254"></a> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="cm">/* setup dnd */</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">preview_darea</span><span class="p">,</span><span class="w"> </span><span class="s">"drag_begin"</span><span class="p">,</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">drag_begin</span><span class="p">),</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">preview_darea</span><span class="p">,</span><span class="w"> </span><span class="s">"drag_data_get"</span><span class="p">,</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">drag_data_get</span><span class="p">),</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">dialog</span><span class="p">);</span> +<a id="line-262" name="line-262"></a> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">toplevel</span><span class="p">);</span> +<a id="line-264" name="line-264"></a> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="cm">/* select the name of the file but leave out the extension if there's any;</span> +<a id="line-266" name="line-266"></a><span class="cm"> * the dialog must be realized for select_region to work</span> +<a id="line-267" name="line-267"></a><span class="cm"> */</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">ext</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strrchr</span><span class="w"> </span><span class="p">(</span><span class="n">current_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="sc">'.'</span><span class="p">);</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ext</span><span class="p">)</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">pos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">current_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">ext</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="k">else</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">pos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-273" name="line-273"></a> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="n">gtk_editable_select_region</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_EDITABLE</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">filename_entry</span><span class="p">),</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">pos</span><span class="p">);</span> +<a id="line-277" name="line-277"></a> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">current_name</span><span class="p">);</span> +<a id="line-279" name="line-279"></a> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-281" name="line-281"></a><span class="p">}</span> +<a id="line-282" name="line-282"></a> +<a id="line-283" name="line-283"></a><span class="kt">void</span> +<a id="line-284" name="line-284"></a><span class="nf">screenshot_dialog_focus_entry</span><span class="w"> </span><span class="p">(</span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-285" name="line-285"></a><span class="p">{</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">gtk_widget_grab_focus</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">filename_entry</span><span class="p">);</span> +<a id="line-287" name="line-287"></a><span class="p">}</span> +<a id="line-288" name="line-288"></a> +<a id="line-289" name="line-289"></a><span class="kt">void</span> +<a id="line-290" name="line-290"></a><span class="nf">screenshot_dialog_enable_dnd</span><span class="w"> </span><span class="p">(</span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-291" name="line-291"></a><span class="p">{</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">preview_darea</span><span class="p">;</span> +<a id="line-293" name="line-293"></a> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-295" name="line-295"></a> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="n">preview_darea</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"preview_darea"</span><span class="p">);</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">gtk_drag_source_set</span><span class="w"> </span><span class="p">(</span><span class="n">preview_darea</span><span class="p">,</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">GDK_BUTTON1_MASK</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GDK_BUTTON3_MASK</span><span class="p">,</span> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="n">drag_types</span><span class="p">,</span><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">drag_types</span><span class="p">),</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">GDK_ACTION_COPY</span><span class="p">);</span> +<a id="line-301" name="line-301"></a><span class="p">}</span> +<a id="line-302" name="line-302"></a> +<a id="line-303" name="line-303"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-304" name="line-304"></a><span class="nf">screenshot_dialog_get_toplevel</span><span class="w"> </span><span class="p">(</span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-305" name="line-305"></a><span class="p">{</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"toplevel"</span><span class="p">);</span> +<a id="line-307" name="line-307"></a><span class="p">}</span> +<a id="line-308" name="line-308"></a> +<a id="line-309" name="line-309"></a><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-310" name="line-310"></a><span class="nf">screenshot_dialog_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-311" name="line-311"></a><span class="p">{</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">folder</span><span class="p">;</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">file_name</span><span class="p">;</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">uri</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">tmp</span><span class="p">;</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">;</span> +<a id="line-316" name="line-316"></a> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="n">folder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">save_widget</span><span class="p">));</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">file_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_get_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">filename_entry</span><span class="p">));</span> +<a id="line-319" name="line-319"></a> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_from_utf8</span><span class="w"> </span><span class="p">(</span><span class="n">file_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="p">{</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Unable to convert `%s' to valid UTF-8: %s</span><span class="se">\n</span><span class="s">"</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="s">"Falling back to default file."</span><span class="p">,</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">file_name</span><span class="p">,</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Screenshot.png"</span><span class="p">));</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="p">}</span> +<a id="line-331" name="line-331"></a> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_uri_escape_string</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_build_filename</span><span class="w"> </span><span class="p">(</span><span class="n">folder</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-334" name="line-334"></a> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">folder</span><span class="p">);</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">);</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-338" name="line-338"></a> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">uri</span><span class="p">;</span> +<a id="line-340" name="line-340"></a><span class="p">}</span> +<a id="line-341" name="line-341"></a> +<a id="line-342" name="line-342"></a><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-343" name="line-343"></a><span class="nf">screenshot_dialog_get_folder</span><span class="w"> </span><span class="p">(</span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-344" name="line-344"></a><span class="p">{</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">gtk_file_chooser_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">save_widget</span><span class="p">));</span> +<a id="line-346" name="line-346"></a><span class="p">}</span> +<a id="line-347" name="line-347"></a> +<a id="line-348" name="line-348"></a><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span> +<a id="line-349" name="line-349"></a><span class="nf">screenshot_dialog_get_screenshot</span><span class="w"> </span><span class="p">(</span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-350" name="line-350"></a><span class="p">{</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">screenshot</span><span class="p">;</span> +<a id="line-352" name="line-352"></a><span class="p">}</span> +<a id="line-353" name="line-353"></a> +<a id="line-354" name="line-354"></a><span class="kt">void</span> +<a id="line-355" name="line-355"></a><span class="nf">screenshot_dialog_set_busy</span><span class="w"> </span><span class="p">(</span><span class="n">ScreenshotDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">,</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">busy</span><span class="p">)</span> +<a id="line-357" name="line-357"></a><span class="p">{</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">toplevel</span><span class="p">;</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-360" name="line-360"></a> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">toplevel</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">screenshot_dialog_get_toplevel</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">toplevel</span><span class="p">);</span> +<a id="line-363" name="line-363"></a> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">busy</span><span class="p">)</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="p">{</span> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="n">GdkCursor</span><span class="w"> </span><span class="o">*</span><span class="n">cursor</span><span class="p">;</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="cm">/* Change cursor to busy */</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="n">cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_WATCH</span><span class="p">);</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">toplevel</span><span class="p">),</span><span class="w"> </span><span class="n">cursor</span><span class="p">);</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">cursor</span><span class="p">);</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="p">}</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="k">else</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="p">{</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">toplevel</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="p">}</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">toplevel</span><span class="p">,</span><span class="w"> </span><span class="o">!</span><span class="w"> </span><span class="n">busy</span><span class="p">);</span> +<a id="line-378" name="line-378"></a> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">gdk_display_flush</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-380" name="line-380"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/36.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/36.html new file mode 100644 index 00000000..3236b888 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/36.html @@ -0,0 +1,853 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-screenshot/src/screenshot-resources.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> screenshot-resources.c</p> +<a href="36.html#line-9"> unusedStructMember 9</a><a href="36.html#line-9"> unusedStructMember 9</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-2" name="line-2"></a> +<a id="line-3" name="line-3"></a><span class="cp">#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))</span> +<a id="line-4" name="line-4"></a><span class="cp"># define SECTION __attribute__ ((section (".gresource.screenshot"), aligned (8)))</span> +<a id="line-5" name="line-5"></a><span class="cp">#else</span> +<a id="line-6" name="line-6"></a><span class="cp"># define SECTION</span> +<a id="line-7" name="line-7"></a><span class="cp">#endif</span> +<a id="line-8" name="line-8"></a> +<a id="line-9" name="line-9"></a><span class="hll"><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">SECTION</span><span class="w"> </span><span class="k">union</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">guint8</span><span class="w"> </span><span class="n">data</span><span class="p">[</span><span class="mi">1649</span><span class="p">];</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">alignment</span><span class="p">;</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">ptr</span><span class="p">;}</span><span class="w"> </span><span class="n">screenshot_resource_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">{</span><span class="error2"><--- union member 'Anonymous0::alignment' is never used.</span><span class="error2"><--- union member 'Anonymous0::ptr' is never used.</span> +</span><a id="line-10" name="line-10"></a><span class="w"> </span><span class="mo">0107</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-11" name="line-11"></a><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-12" name="line-12"></a><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-13" name="line-13"></a><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-14" name="line-14"></a><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span> +<a id="line-15" name="line-15"></a><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-16" name="line-16"></a><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-17" name="line-17"></a><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0265</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-18" name="line-18"></a><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-19" name="line-19"></a><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-20" name="line-20"></a><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span> +<a id="line-21" name="line-21"></a><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span> +<a id="line-22" name="line-22"></a><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-23" name="line-23"></a><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span> +<a id="line-24" name="line-24"></a><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span> +<a id="line-25" name="line-25"></a><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span> +<a id="line-26" name="line-26"></a><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span> +<a id="line-27" name="line-27"></a><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span> +<a id="line-28" name="line-28"></a><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span> +<a id="line-29" name="line-29"></a><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span> +<a id="line-30" name="line-30"></a><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span> +<a id="line-31" name="line-31"></a><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span> +<a id="line-32" name="line-32"></a><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span> +<a id="line-33" name="line-33"></a><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span> +<a id="line-34" name="line-34"></a><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span> +<a id="line-35" name="line-35"></a><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0210</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0047</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span> +<a id="line-38" name="line-38"></a><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span> +<a id="line-39" name="line-39"></a><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span> +<a id="line-40" name="line-40"></a><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span> +<a id="line-41" name="line-41"></a><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span> +<a id="line-42" name="line-42"></a><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span> +<a id="line-43" name="line-43"></a><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0303</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0241</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0226</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0142</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0122</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0364</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0025</span><span class="p">,</span><span class="w"> </span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0360</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0110</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0006</span><span class="p">,</span><span class="w"> </span><span class="mo">0260</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0020</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0374</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0266</span><span class="p">,</span><span class="w"> </span><span class="mo">0027</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0201</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0301</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0257</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0106</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0100</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0144</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0326</span><span class="p">,</span><span class="w"> </span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="mo">0231</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0377</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0133</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0242</span><span class="p">,</span><span class="w"> </span><span class="mo">0161</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0344</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0071</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0251</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0040</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0200</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0256</span><span class="p">,</span><span class="w"> </span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="mo">0170</span><span class="p">,</span><span class="w"> </span><span class="mo">0154</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0124</span><span class="p">,</span><span class="w"> </span><span class="mo">0066</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0115</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0376</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0322</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0331</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0061</span><span class="p">,</span><span class="w"> </span><span class="mo">0026</span><span class="p">,</span><span class="w"> </span><span class="mo">0312</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0341</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="mo">0220</span><span class="p">,</span><span class="w"> </span><span class="mo">0151</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0311</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0253</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0300</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="mo">0274</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0354</span><span class="p">,</span><span class="w"> </span><span class="mo">0014</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="mo">0230</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0245</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0361</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span><span class="mo">0010</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="mo">0373</span><span class="p">,</span><span class="w"> </span><span class="mo">0254</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0262</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0070</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="mo">0314</span><span class="p">,</span><span class="w"> </span><span class="mo">0304</span><span class="p">,</span><span class="w"> </span><span class="mo">0147</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0263</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0023</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0347</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0223</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0204</span><span class="p">,</span><span class="w"> </span><span class="mo">0261</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0166</span><span class="p">,</span><span class="w"> </span><span class="mo">0033</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0140</span><span class="p">,</span><span class="w"> </span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0052</span><span class="p">,</span><span class="w"> </span><span class="mo">0302</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0365</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0120</span><span class="p">,</span><span class="w"> </span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0352</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0324</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0224</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0013</span><span class="p">,</span><span class="w"> </span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0336</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0042</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0044</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0335</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0320</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0357</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0160</span><span class="p">,</span><span class="w"> </span><span class="mo">0031</span><span class="p">,</span><span class="w"> </span><span class="mo">0104</span><span class="p">,</span><span class="w"> </span><span class="mo">0103</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0060</span><span class="p">,</span><span class="w"> </span><span class="mo">0250</span><span class="p">,</span><span class="w"> </span><span class="mo">0017</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0127</span><span class="p">,</span><span class="w"> </span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0343</span><span class="p">,</span><span class="w"> </span><span class="mo">0212</span><span class="p">,</span><span class="w"> </span><span class="mo">0337</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0134</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0342</span><span class="p">,</span><span class="w"> </span><span class="mo">0167</span><span class="p">,</span><span class="w"> </span><span class="mo">0065</span><span class="p">,</span><span class="w"> </span><span class="mo">0315</span><span class="p">,</span><span class="w"> </span><span class="mo">0034</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0215</span><span class="p">,</span><span class="w"> </span><span class="mo">0123</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0111</span><span class="p">,</span><span class="w"> </span><span class="mo">0370</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0211</span><span class="p">,</span><span class="w"> </span><span class="mo">0222</span><span class="p">,</span><span class="w"> </span><span class="mo">0207</span><span class="p">,</span><span class="w"> </span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0005</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0046</span><span class="p">,</span><span class="w"> </span><span class="mo">0125</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0221</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0202</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0333</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0313</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0217</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0264</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0116</span><span class="p">,</span><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0062</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="mo">0243</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0055</span><span class="p">,</span><span class="w"> </span><span class="mo">0146</span><span class="p">,</span><span class="w"> </span><span class="mo">0021</span><span class="p">,</span><span class="w"> </span><span class="mo">0054</span><span class="p">,</span><span class="w"> </span><span class="mo">0206</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0117</span><span class="p">,</span><span class="w"> </span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="mo">0272</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0012</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span><span class="mo">0152</span><span class="p">,</span><span class="w"> </span><span class="mo">0310</span><span class="p">,</span><span class="w"> </span><span class="mo">0216</span><span class="p">,</span><span class="w"> </span><span class="mo">0074</span><span class="p">,</span><span class="w"> </span><span class="mo">0236</span><span class="p">,</span><span class="w"> </span><span class="mo">0016</span><span class="p">,</span><span class="w"> </span><span class="mo">0233</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0353</span><span class="p">,</span><span class="w"> </span><span class="mo">0041</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0176</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0332</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0102</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0121</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0267</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0277</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0307</span><span class="p">,</span><span class="w"> </span><span class="mo">0321</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0367</span><span class="p">,</span><span class="w"> </span><span class="mo">0351</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0346</span><span class="p">,</span><span class="w"> </span><span class="mo">0375</span><span class="p">,</span><span class="w"> </span><span class="mo">0252</span><span class="p">,</span><span class="w"> </span><span class="mo">0213</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0173</span><span class="p">,</span><span class="w"> </span><span class="mo">0305</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0325</span><span class="p">,</span><span class="w"> </span><span class="mo">0105</span><span class="p">,</span><span class="w"> </span><span class="mo">0275</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0045</span><span class="p">,</span><span class="w"> </span><span class="mo">0126</span><span class="p">,</span><span class="w"> </span><span class="mo">0036</span><span class="p">,</span><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0032</span><span class="p">,</span><span class="w"> </span><span class="mo">0114</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0244</span><span class="p">,</span><span class="w"> </span><span class="mo">0101</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0273</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0334</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0234</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0366</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0345</span><span class="p">,</span><span class="w"> </span><span class="mo">0073</span><span class="p">,</span><span class="w"> </span><span class="mo">0035</span><span class="p">,</span><span class="w"> </span><span class="mo">0022</span><span class="p">,</span><span class="w"> </span><span class="mo">0076</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0153</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="mo">0225</span><span class="p">,</span><span class="w"> </span><span class="mo">0306</span><span class="p">,</span><span class="w"> </span><span class="mo">0271</span><span class="p">,</span><span class="w"> </span><span class="mo">0227</span><span class="p">,</span><span class="w"> </span><span class="mo">0056</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0371</span><span class="p">,</span><span class="w"> </span><span class="mo">0112</span><span class="p">,</span><span class="w"> </span><span class="mo">0323</span><span class="p">,</span><span class="w"> </span><span class="mo">0063</span><span class="p">,</span><span class="w"> </span><span class="mo">0024</span><span class="p">,</span><span class="w"> </span><span class="mo">0137</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0214</span><span class="p">,</span><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0255</span><span class="p">,</span><span class="w"> </span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="mo">0340</span><span class="p">,</span><span class="w"> </span><span class="mo">0003</span><span class="p">,</span><span class="w"> </span><span class="mo">0011</span><span class="p">,</span><span class="w"> </span><span class="mo">0037</span><span class="p">,</span><span class="w"> </span><span class="mo">0317</span><span class="p">,</span><span class="w"> </span><span class="mo">0135</span><span class="p">,</span><span class="w"> </span><span class="mo">0113</span><span class="p">,</span><span class="w"> </span><span class="mo">0205</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0075</span><span class="p">,</span><span class="w"> </span><span class="mo">0064</span><span class="p">,</span><span class="w"> </span><span class="mo">0015</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0043</span><span class="p">,</span><span class="w"> </span><span class="mo">0072</span><span class="p">,</span><span class="w"> </span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="mo">0007</span><span class="p">,</span><span class="w"> </span><span class="mo">0276</span><span class="p">,</span><span class="w"> </span><span class="mo">0350</span><span class="p">,</span><span class="w"> </span><span class="mo">0237</span><span class="p">,</span><span class="w"> </span><span class="mo">0240</span><span class="p">,</span><span class="w"> </span><span class="mo">0330</span><span class="p">,</span><span class="w"> </span><span class="mo">0030</span><span class="p">,</span><span class="w"> </span><span class="mo">0067</span><span class="p">,</span><span class="w"> </span><span class="mo">0362</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0355</span><span class="p">,</span><span class="w"> </span><span class="mo">0002</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0247</span><span class="p">,</span><span class="w"> </span><span class="mo">0053</span><span class="p">,</span><span class="w"> </span><span class="mo">0356</span><span class="p">,</span><span class="w"> </span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="mo">0270</span><span class="p">,</span><span class="w"> </span><span class="mo">0363</span><span class="p">,</span><span class="w"> </span><span class="mo">0130</span><span class="p">,</span><span class="w"> </span><span class="mo">0174</span><span class="p">,</span><span class="w"> </span><span class="mo">0131</span><span class="p">,</span><span class="w"> </span><span class="mo">0077</span><span class="p">,</span><span class="w"> </span><span class="mo">0172</span><span class="p">,</span><span class="w"> </span><span class="mo">0175</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0246</span><span class="p">,</span><span class="w"> </span><span class="mo">0327</span><span class="p">,</span><span class="w"> </span><span class="mo">0132</span><span class="p">,</span><span class="w"> </span><span class="mo">0372</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0232</span><span class="p">,</span><span class="w"> </span><span class="mo">0177</span><span class="p">,</span><span class="w"> </span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0203</span><span class="p">,</span><span class="w"> </span><span class="mo">0316</span><span class="p">,</span><span class="w"> </span><span class="mo">0235</span><span class="p">,</span><span class="w"> </span><span class="mo">0136</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0050</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0165</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0171</span><span class="p">,</span><span class="w"> </span><span class="mo">0051</span><span class="p">,</span><span class="w"> </span><span class="mo">0155</span><span class="p">,</span><span class="w"> </span><span class="mo">0141</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0004</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0143</span><span class="p">,</span><span class="w"> </span><span class="mo">0162</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0145</span><span class="p">,</span><span class="w"> </span><span class="mo">0156</span><span class="p">,</span><span class="w"> </span><span class="mo">0163</span><span class="p">,</span><span class="w"> </span><span class="mo">0150</span><span class="p">,</span><span class="w"> </span><span class="mo">0157</span><span class="p">,</span><span class="w"> </span><span class="mo">0164</span><span class="p">,</span><span class="w"> </span><span class="mo">0057</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0001</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span><span class="p">,</span><span class="w"> </span><span class="mo">0000</span> +<a id="line-113" name="line-113"></a><span class="p">}</span><span class="w"> </span><span class="p">};</span> +<a id="line-114" name="line-114"></a> +<a id="line-115" name="line-115"></a><span class="k">static</span><span class="w"> </span><span class="n">GStaticResource</span><span class="w"> </span><span class="n">static_resource</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">screenshot_resource_data</span><span class="p">.</span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot_resource_data</span><span class="p">.</span><span class="n">data</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="cm">/* nul terminator */</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">};</span> +<a id="line-116" name="line-116"></a> +<a id="line-117" name="line-117"></a><span class="n">G_MODULE_EXPORT</span> +<a id="line-118" name="line-118"></a><span class="n">GResource</span><span class="w"> </span><span class="o">*</span><span class="n">screenshot_get_resource</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> +<a id="line-119" name="line-119"></a><span class="n">GResource</span><span class="w"> </span><span class="o">*</span><span class="nf">screenshot_get_resource</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-120" name="line-120"></a><span class="p">{</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_static_resource_get_resource</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">static_resource</span><span class="p">);</span> +<a id="line-122" name="line-122"></a><span class="p">}</span> +<a id="line-123" name="line-123"></a><span class="cm">/* GLIB - Library of useful routines for C programming</span> +<a id="line-124" name="line-124"></a><span class="cm"> * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald</span> +<a id="line-125" name="line-125"></a><span class="cm"> *</span> +<a id="line-126" name="line-126"></a><span class="cm"> * SPDX-License-Identifier: LGPL-2.1-or-later</span> +<a id="line-127" name="line-127"></a><span class="cm"> *</span> +<a id="line-128" name="line-128"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span> +<a id="line-129" name="line-129"></a><span class="cm"> * modify it under the terms of the GNU Lesser General Public</span> +<a id="line-130" name="line-130"></a><span class="cm"> * License as published by the Free Software Foundation; either</span> +<a id="line-131" name="line-131"></a><span class="cm"> * version 2.1 of the License, or (at your option) any later version.</span> +<a id="line-132" name="line-132"></a><span class="cm"> *</span> +<a id="line-133" name="line-133"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span> +<a id="line-134" name="line-134"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-135" name="line-135"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> +<a id="line-136" name="line-136"></a><span class="cm"> * Lesser General Public License for more details.</span> +<a id="line-137" name="line-137"></a><span class="cm"> *</span> +<a id="line-138" name="line-138"></a><span class="cm"> * You should have received a copy of the GNU Lesser General Public</span> +<a id="line-139" name="line-139"></a><span class="cm"> * License along with this library; if not, see <http://www.gnu.org/licenses/>.</span> +<a id="line-140" name="line-140"></a><span class="cm"> */</span> +<a id="line-141" name="line-141"></a> +<a id="line-142" name="line-142"></a><span class="cm">/*</span> +<a id="line-143" name="line-143"></a><span class="cm"> * Modified by the GLib Team and others 1997-2000. See the AUTHORS</span> +<a id="line-144" name="line-144"></a><span class="cm"> * file for a list of people on the GLib Team. See the ChangeLog</span> +<a id="line-145" name="line-145"></a><span class="cm"> * files for a list of changes. These files are distributed with</span> +<a id="line-146" name="line-146"></a><span class="cm"> * GLib at ftp://ftp.gtk.org/pub/gtk/.</span> +<a id="line-147" name="line-147"></a><span class="cm"> */</span> +<a id="line-148" name="line-148"></a> +<a id="line-149" name="line-149"></a><span class="cp">#ifndef __G_CONSTRUCTOR_H__</span> +<a id="line-150" name="line-150"></a><span class="cp">#define __G_CONSTRUCTOR_H__</span> +<a id="line-151" name="line-151"></a> +<a id="line-152" name="line-152"></a><span class="cm">/*</span> +<a id="line-153" name="line-153"></a><span class="cm"> If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and</span> +<a id="line-154" name="line-154"></a><span class="cm"> destructors, in a usable way, including e.g. on library unload. If not you're on</span> +<a id="line-155" name="line-155"></a><span class="cm"> your own.</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="cm"> Some compilers need #pragma to handle this, which does not work with macros,</span> +<a id="line-158" name="line-158"></a><span class="cm"> so the way you need to use this is (for constructors):</span> +<a id="line-159" name="line-159"></a> +<a id="line-160" name="line-160"></a><span class="cm"> #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA</span> +<a id="line-161" name="line-161"></a><span class="cm"> #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)</span> +<a id="line-162" name="line-162"></a><span class="cm"> #endif</span> +<a id="line-163" name="line-163"></a><span class="cm"> G_DEFINE_CONSTRUCTOR(my_constructor)</span> +<a id="line-164" name="line-164"></a><span class="cm"> static void my_constructor(void) {</span> +<a id="line-165" name="line-165"></a><span class="cm"> ...</span> +<a id="line-166" name="line-166"></a><span class="cm"> }</span> +<a id="line-167" name="line-167"></a> +<a id="line-168" name="line-168"></a><span class="cm">*/</span> +<a id="line-169" name="line-169"></a> +<a id="line-170" name="line-170"></a><span class="cp">#ifndef __GTK_DOC_IGNORE__</span> +<a id="line-171" name="line-171"></a> +<a id="line-172" name="line-172"></a><span class="cp">#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)</span> +<a id="line-173" name="line-173"></a> +<a id="line-174" name="line-174"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-175" name="line-175"></a> +<a id="line-176" name="line-176"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);</span> +<a id="line-177" name="line-177"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);</span> +<a id="line-178" name="line-178"></a> +<a id="line-179" name="line-179"></a><span class="cp">#elif defined (_MSC_VER) && (_MSC_VER >= 1500)</span> +<a id="line-180" name="line-180"></a><span class="cm">/* Visual studio 2008 and later has _Pragma */</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="cm">/*</span> +<a id="line-183" name="line-183"></a><span class="cm"> * Only try to include gslist.h if not already included via glib.h,</span> +<a id="line-184" name="line-184"></a><span class="cm"> * so that items using gconstructor.h outside of GLib (such as</span> +<a id="line-185" name="line-185"></a><span class="cm"> * GResources) continue to build properly.</span> +<a id="line-186" name="line-186"></a><span class="cm"> */</span> +<a id="line-187" name="line-187"></a><span class="cp">#ifndef __G_LIB_H__</span> +<a id="line-188" name="line-188"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gslist.h"</span> +<a id="line-189" name="line-189"></a><span class="cp">#endif</span> +<a id="line-190" name="line-190"></a> +<a id="line-191" name="line-191"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-192" name="line-192"></a> +<a id="line-193" name="line-193"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-194" name="line-194"></a> +<a id="line-195" name="line-195"></a><span class="cm">/* We do some weird things to avoid the constructors being optimized</span> +<a id="line-196" name="line-196"></a><span class="cm"> * away on VS2015 if WholeProgramOptimization is enabled. First we</span> +<a id="line-197" name="line-197"></a><span class="cm"> * make a reference to the array from the wrapper to make sure its</span> +<a id="line-198" name="line-198"></a><span class="cm"> * references. Then we use a pragma to make sure the wrapper function</span> +<a id="line-199" name="line-199"></a><span class="cm"> * symbol is always included at the link stage. Also, the symbols</span> +<a id="line-200" name="line-200"></a><span class="cm"> * need to be extern (but not dllexport), even though they are not</span> +<a id="line-201" name="line-201"></a><span class="cm"> * really used from another object file.</span> +<a id="line-202" name="line-202"></a><span class="cm"> */</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="cm">/* We need to account for differences between the mangling of symbols</span> +<a id="line-205" name="line-205"></a><span class="cm"> * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed</span> +<a id="line-206" name="line-206"></a><span class="cm"> * with an underscore but symbols on x64/ARM/ARM64 are not.</span> +<a id="line-207" name="line-207"></a><span class="cm"> */</span> +<a id="line-208" name="line-208"></a><span class="cp">#ifdef _M_IX86</span> +<a id="line-209" name="line-209"></a><span class="cp">#define G_MSVC_SYMBOL_PREFIX "_"</span> +<a id="line-210" name="line-210"></a><span class="cp">#else</span> +<a id="line-211" name="line-211"></a><span class="cp">#define G_MSVC_SYMBOL_PREFIX ""</span> +<a id="line-212" name="line-212"></a><span class="cp">#endif</span> +<a id="line-213" name="line-213"></a> +<a id="line-214" name="line-214"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)</span> +<a id="line-215" name="line-215"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX)</span> +<a id="line-216" name="line-216"></a> +<a id="line-217" name="line-217"></a><span class="cp">#define G_MSVC_CTOR(_func,_sym_prefix) \</span> +<a id="line-218" name="line-218"></a><span class="cp"> static void _func(void); \</span> +<a id="line-219" name="line-219"></a><span class="cp"> extern int (* _array ## _func)(void); \</span> +<a id="line-220" name="line-220"></a><span class="cp"> int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \</span> +<a id="line-221" name="line-221"></a><span class="cp"> __pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \</span> +<a id="line-222" name="line-222"></a><span class="cp"> __pragma(section(".CRT$XCU",read)) \</span> +<a id="line-223" name="line-223"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _wrapper;</span> +<a id="line-224" name="line-224"></a> +<a id="line-225" name="line-225"></a><span class="cp">#define G_MSVC_DTOR(_func,_sym_prefix) \</span> +<a id="line-226" name="line-226"></a><span class="cp"> static void _func(void); \</span> +<a id="line-227" name="line-227"></a><span class="cp"> extern int (* _array ## _func)(void); \</span> +<a id="line-228" name="line-228"></a><span class="cp"> int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \</span> +<a id="line-229" name="line-229"></a><span class="cp"> __pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \</span> +<a id="line-230" name="line-230"></a><span class="cp"> __pragma(section(".CRT$XCU",read)) \</span> +<a id="line-231" name="line-231"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _constructor;</span> +<a id="line-232" name="line-232"></a> +<a id="line-233" name="line-233"></a><span class="cp">#elif defined (_MSC_VER)</span> +<a id="line-234" name="line-234"></a> +<a id="line-235" name="line-235"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-236" name="line-236"></a> +<a id="line-237" name="line-237"></a><span class="cm">/* Pre Visual studio 2008 must use #pragma section */</span> +<a id="line-238" name="line-238"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-239" name="line-239"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-240" name="line-240"></a> +<a id="line-241" name="line-241"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-242" name="line-242"></a><span class="cp"> section(".CRT$XCU",read)</span> +<a id="line-243" name="line-243"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) \</span> +<a id="line-244" name="line-244"></a><span class="cp"> static void _func(void); \</span> +<a id="line-245" name="line-245"></a><span class="cp"> static int _func ## _wrapper(void) { _func(); return 0; } \</span> +<a id="line-246" name="line-246"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper;</span> +<a id="line-247" name="line-247"></a> +<a id="line-248" name="line-248"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-249" name="line-249"></a><span class="cp"> section(".CRT$XCU",read)</span> +<a id="line-250" name="line-250"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) \</span> +<a id="line-251" name="line-251"></a><span class="cp"> static void _func(void); \</span> +<a id="line-252" name="line-252"></a><span class="cp"> static int _func ## _constructor(void) { atexit (_func); return 0; } \</span> +<a id="line-253" name="line-253"></a><span class="cp"> __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;</span> +<a id="line-254" name="line-254"></a> +<a id="line-255" name="line-255"></a><span class="cp">#elif defined(__SUNPRO_C)</span> +<a id="line-256" name="line-256"></a> +<a id="line-257" name="line-257"></a><span class="cm">/* This is not tested, but i believe it should work, based on:</span> +<a id="line-258" name="line-258"></a><span class="cm"> * http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c</span> +<a id="line-259" name="line-259"></a><span class="cm"> */</span> +<a id="line-260" name="line-260"></a> +<a id="line-261" name="line-261"></a><span class="cp">#define G_HAS_CONSTRUCTORS 1</span> +<a id="line-262" name="line-262"></a> +<a id="line-263" name="line-263"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-264" name="line-264"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1</span> +<a id="line-265" name="line-265"></a> +<a id="line-266" name="line-266"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-267" name="line-267"></a><span class="cp"> init(_func)</span> +<a id="line-268" name="line-268"></a><span class="cp">#define G_DEFINE_CONSTRUCTOR(_func) \</span> +<a id="line-269" name="line-269"></a><span class="cp"> static void _func(void);</span> +<a id="line-270" name="line-270"></a> +<a id="line-271" name="line-271"></a><span class="cp">#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \</span> +<a id="line-272" name="line-272"></a><span class="cp"> fini(_func)</span> +<a id="line-273" name="line-273"></a><span class="cp">#define G_DEFINE_DESTRUCTOR(_func) \</span> +<a id="line-274" name="line-274"></a><span class="cp"> static void _func(void);</span> +<a id="line-275" name="line-275"></a> +<a id="line-276" name="line-276"></a><span class="cp">#else</span> +<a id="line-277" name="line-277"></a> +<a id="line-278" name="line-278"></a><span class="cm">/* constructors not supported for this compiler */</span> +<a id="line-279" name="line-279"></a> +<a id="line-280" name="line-280"></a><span class="cp">#endif</span> +<a id="line-281" name="line-281"></a> +<a id="line-282" name="line-282"></a><span class="cp">#endif </span><span class="cm">/* __GTK_DOC_IGNORE__ */</span> +<a id="line-283" name="line-283"></a><span class="cp">#endif </span><span class="cm">/* __G_CONSTRUCTOR_H__ */</span> +<a id="line-284" name="line-284"></a> +<a id="line-285" name="line-285"></a><span class="cp">#ifdef G_HAS_CONSTRUCTORS</span> +<a id="line-286" name="line-286"></a> +<a id="line-287" name="line-287"></a><span class="cp">#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA</span> +<a id="line-288" name="line-288"></a><span class="cp">#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(screenshotresource_constructor)</span> +<a id="line-289" name="line-289"></a><span class="cp">#endif</span> +<a id="line-290" name="line-290"></a><span class="n">G_DEFINE_CONSTRUCTOR</span><span class="p">(</span><span class="n">screenshotresource_constructor</span><span class="p">)</span> +<a id="line-291" name="line-291"></a><span class="cp">#ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA</span> +<a id="line-292" name="line-292"></a><span class="cp">#pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(screenshotresource_destructor)</span> +<a id="line-293" name="line-293"></a><span class="cp">#endif</span> +<a id="line-294" name="line-294"></a><span class="n">G_DEFINE_DESTRUCTOR</span><span class="p">(</span><span class="n">screenshotresource_destructor</span><span class="p">)</span> +<a id="line-295" name="line-295"></a> +<a id="line-296" name="line-296"></a><span class="cp">#else</span> +<a id="line-297" name="line-297"></a><span class="cp">#warning "Constructor not supported on this compiler, linking in resources will not work"</span> +<a id="line-298" name="line-298"></a><span class="cp">#endif</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">screenshotresource_constructor</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-301" name="line-301"></a><span class="p">{</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">g_static_resource_init</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">static_resource</span><span class="p">);</span> +<a id="line-303" name="line-303"></a><span class="p">}</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">screenshotresource_destructor</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-306" name="line-306"></a><span class="p">{</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">g_static_resource_fini</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">static_resource</span><span class="p">);</span> +<a id="line-308" name="line-308"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/37.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/37.html new file mode 100644 index 00000000..abc825ec --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/37.html @@ -0,0 +1,821 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-screenshot/src/screenshot-save.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> screenshot-save.c</p> +<a href="37.html#line-51"> variableScope 51</a><a href="37.html#line-116"> variableScope 116</a><a href="37.html#line-143"> variableScope 143</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2001-2006 Jonathan Blandford <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-22" name="line-22"></a><span class="cp">#endif</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><unistd.h></span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><errno.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><signal.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-30" name="line-30"></a> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"screenshot-save.h"</span> +<a id="line-32" name="line-32"></a> +<a id="line-33" name="line-33"></a><span class="k">static</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">parent_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-34" name="line-34"></a><span class="k">static</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">tmp_filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-35" name="line-35"></a> +<a id="line-36" name="line-36"></a><span class="k">static</span><span class="w"> </span><span class="n">SaveFunction</span><span class="w"> </span><span class="n">save_callback</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-37" name="line-37"></a><span class="k">static</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">save_user_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-38" name="line-38"></a> +<a id="line-39" name="line-39"></a><span class="cm">/* Strategy for saving:</span> +<a id="line-40" name="line-40"></a><span class="cm"> *</span> +<a id="line-41" name="line-41"></a><span class="cm"> * We keep another process around to handle saving the image. This is</span> +<a id="line-42" name="line-42"></a><span class="cm"> * done for two reasons. One, the saving takes a non-zero amount of</span> +<a id="line-43" name="line-43"></a><span class="cm"> * time (about a quarter of a second on my box.) This will make it</span> +<a id="line-44" name="line-44"></a><span class="cm"> * more interactive. The second reason is to make the child</span> +<a id="line-45" name="line-45"></a><span class="cm"> * responsible for cleaning up the temp dir. If the parent process is</span> +<a id="line-46" name="line-46"></a><span class="cm"> * killed or segfaults, the child process can clean up the temp dir.</span> +<a id="line-47" name="line-47"></a><span class="cm"> */</span> +<a id="line-48" name="line-48"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-49" name="line-49"></a><span class="nf">clean_up_temporary_dir</span><span class="w"> </span><span class="p">(</span><span class="n">gboolean</span><span class="w"> </span><span class="n">gui_on_error</span><span class="p">)</span> +<a id="line-50" name="line-50"></a><span class="p">{</span> +<a id="line-51" name="line-51"></a><span class="hll"><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'message' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'message' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">error_occurred</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">tmp_filename</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">))</span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">error_occurred</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">unlink</span><span class="w"> </span><span class="p">(</span><span class="n">tmp_filename</span><span class="p">);</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_test</span><span class="w"> </span><span class="p">(</span><span class="n">parent_dir</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_TEST_EXISTS</span><span class="p">))</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">error_occurred</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rmdir</span><span class="w"> </span><span class="p">(</span><span class="n">parent_dir</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">error_occurred</span><span class="p">;</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error_occurred</span><span class="p">)</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="p">{</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Unable to clear the temporary folder:</span><span class="se">\n</span><span class="s">%s"</span><span class="p">),</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">tmp_filename</span><span class="p">);</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gui_on_error</span><span class="p">)</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="p">{</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-65" name="line-65"></a> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="p">}</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="k">else</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="p">{</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="p">}</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="p">);</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="p">}</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp_filename</span><span class="p">);</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">parent_dir</span><span class="p">);</span> +<a id="line-81" name="line-81"></a><span class="p">}</span> +<a id="line-82" name="line-82"></a> +<a id="line-83" name="line-83"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-84" name="line-84"></a><span class="nf">child_done_notification</span><span class="w"> </span><span class="p">(</span><span class="n">GPid</span><span class="w"> </span><span class="n">pid</span><span class="p">,</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">status</span><span class="p">,</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-87" name="line-87"></a><span class="p">{</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="cm">/* This should never be called. */</span> +<a id="line-89" name="line-89"></a> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="cm">/* We expect the child to die after the parent. If the child dies</span> +<a id="line-91" name="line-91"></a><span class="cm"> * than it either segfaulted, or was randomly killed. In either</span> +<a id="line-92" name="line-92"></a><span class="cm"> * case, we can't reasonably continue. */</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-94" name="line-94"></a> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The child save process unexpectedly exited. We are unable to write the screenshot to disk."</span><span class="p">));</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-101" name="line-101"></a> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">clean_up_temporary_dir</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-103" name="line-103"></a> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">exit</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> +<a id="line-105" name="line-105"></a><span class="p">}</span> +<a id="line-106" name="line-106"></a> +<a id="line-107" name="line-107"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-108" name="line-108"></a><span class="nf">read_pipe_from_child</span><span class="w"> </span><span class="p">(</span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">,</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">GIOCondition</span><span class="w"> </span><span class="n">condition</span><span class="p">,</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-111" name="line-111"></a><span class="p">{</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">condition</span><span class="w"> </span><span class="o">&</span><span class="w"> </span><span class="n">G_IO_IN</span><span class="p">)</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="p">{</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">error_message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-116" name="line-116"></a><span class="hll"><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'dialog' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'dialog' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-117" name="line-117"></a><span class="w"> </span><span class="n">GIOStatus</span><span class="w"> </span><span class="n">status</span><span class="p">;</span> +<a id="line-118" name="line-118"></a> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_read_line</span><span class="w"> </span><span class="p">(</span><span class="n">source</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error_message</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-120" name="line-120"></a> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">status</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_STATUS_NORMAL</span><span class="p">)</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="p">{</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"Unable to save the screenshot to disk:</span><span class="se">\n\n</span><span class="s">%s"</span><span class="p">,</span><span class="w"> </span><span class="n">error_message</span><span class="p">);</span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">exit</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="p">}</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="p">}</span> +<a id="line-133" name="line-133"></a> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">save_callback</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">save_user_data</span><span class="p">);</span> +<a id="line-135" name="line-135"></a> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-137" name="line-137"></a><span class="p">}</span> +<a id="line-138" name="line-138"></a> +<a id="line-139" name="line-139"></a><span class="k">static</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-140" name="line-140"></a><span class="nf">make_temp_directory</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-141" name="line-141"></a><span class="p">{</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">result</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-143" name="line-143"></a><span class="hll"><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">dir_name</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'dir_name' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'dir_name' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-144" name="line-144"></a> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="k">do</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="p">{</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">tmp_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"mate-screenshot.%u.%d"</span><span class="p">,</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="n">getpid</span><span class="w"> </span><span class="p">(),</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">);</span> +<a id="line-151" name="line-151"></a> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">dir_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_build_filename</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_tmp_dir</span><span class="w"> </span><span class="p">(),</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">tmp_dir</span><span class="p">,</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">tmp_dir</span><span class="p">);</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_mkdir_with_parents</span><span class="w"> </span><span class="p">(</span><span class="n">dir_name</span><span class="p">,</span><span class="w"> </span><span class="mo">0777</span><span class="p">);</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">result</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="p">{</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir_name</span><span class="p">);</span> +<a id="line-161" name="line-161"></a> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">errno</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">EEXIST</span><span class="p">)</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="k">else</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="p">}</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="k">else</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">dir_name</span><span class="p">;</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="p">}</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-171" name="line-171"></a><span class="p">}</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-174" name="line-174"></a><span class="nf">signal_handler</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">sig</span><span class="p">)</span> +<a id="line-175" name="line-175"></a><span class="p">{</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">clean_up_temporary_dir</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-177" name="line-177"></a> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">signal</span><span class="w"> </span><span class="p">(</span><span class="n">sig</span><span class="p">,</span><span class="w"> </span><span class="n">SIG_DFL</span><span class="p">);</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">kill</span><span class="w"> </span><span class="p">(</span><span class="n">getpid</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">sig</span><span class="p">);</span> +<a id="line-180" name="line-180"></a><span class="p">}</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="kt">void</span> +<a id="line-183" name="line-183"></a><span class="nf">screenshot_save_start</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">pixbuf</span><span class="p">,</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">SaveFunction</span><span class="w"> </span><span class="n">callback</span><span class="p">,</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-186" name="line-186"></a><span class="p">{</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">GPid</span><span class="w"> </span><span class="n">pid</span><span class="p">;</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">parent_exit_notification</span><span class="p">[</span><span class="mi">2</span><span class="p">];</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">pipe_from_child</span><span class="p">[</span><span class="mi">2</span><span class="p">];</span> +<a id="line-190" name="line-190"></a> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">pipe</span><span class="w"> </span><span class="p">(</span><span class="n">parent_exit_notification</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">perror</span><span class="p">(</span><span class="s">"pipe error"</span><span class="p">);</span> +<a id="line-193" name="line-193"></a> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">pipe</span><span class="w"> </span><span class="p">(</span><span class="n">pipe_from_child</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">perror</span><span class="p">(</span><span class="s">"pipe error"</span><span class="p">);</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">parent_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">make_temp_directory</span><span class="w"> </span><span class="p">();</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parent_dir</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-200" name="line-200"></a> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">tmp_filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_build_filename</span><span class="w"> </span><span class="p">(</span><span class="n">parent_dir</span><span class="p">,</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Screenshot.png"</span><span class="p">),</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">save_callback</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">callback</span><span class="p">;</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">save_user_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-206" name="line-206"></a> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">pid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">fork</span><span class="w"> </span><span class="p">();</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">pid</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="p">{</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">c</span><span class="p">;</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">signal</span><span class="w"> </span><span class="p">(</span><span class="n">SIGINT</span><span class="p">,</span><span class="w"> </span><span class="n">signal_handler</span><span class="p">);</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">signal</span><span class="w"> </span><span class="p">(</span><span class="n">SIGTERM</span><span class="p">,</span><span class="w"> </span><span class="n">signal_handler</span><span class="p">);</span> +<a id="line-215" name="line-215"></a> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">close</span><span class="w"> </span><span class="p">(</span><span class="n">parent_exit_notification</span><span class="w"> </span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">close</span><span class="w"> </span><span class="p">(</span><span class="n">pipe_from_child</span><span class="w"> </span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span> +<a id="line-218" name="line-218"></a> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="w"> </span><span class="n">gdk_pixbuf_save</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">tmp_filename</span><span class="p">,</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="s">"png"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">,</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="s">"tEXt::Software"</span><span class="p">,</span><span class="w"> </span><span class="s">"mate-screenshot"</span><span class="p">,</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="p">{</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">)</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="p">{</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">write</span><span class="w"> </span><span class="p">(</span><span class="n">pipe_from_child</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">perror</span><span class="p">(</span><span class="s">"write error"</span><span class="p">);</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="p">}</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="k">else</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="p">{</span> +<a id="line-231" name="line-231"></a><span class="cp">#define ERROR_MESSAGE _("Unknown error saving screenshot to disk")</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">write</span><span class="w"> </span><span class="p">(</span><span class="n">pipe_from_child</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">ERROR_MESSAGE</span><span class="p">,</span><span class="w"> </span><span class="n">strlen</span><span class="w"> </span><span class="p">(</span><span class="n">ERROR_MESSAGE</span><span class="p">))</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">perror</span><span class="p">(</span><span class="s">"write error"</span><span class="p">);</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="p">}</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="p">}</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="cm">/* By closing the pipe, we let the main process know that we're</span> +<a id="line-237" name="line-237"></a><span class="cm"> * done saving it. */</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">close</span><span class="w"> </span><span class="p">(</span><span class="n">pipe_from_child</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span> +<a id="line-239" name="line-239"></a> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">read</span><span class="w"> </span><span class="p">(</span><span class="n">parent_exit_notification</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span><span class="w"> </span><span class="o">&</span><span class="n">c</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">perror</span><span class="p">(</span><span class="s">"read error"</span><span class="p">);</span> +<a id="line-242" name="line-242"></a> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">clean_up_temporary_dir</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">_exit</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="p">);</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="p">}</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">pid</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="p">{</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">GIOChannel</span><span class="w"> </span><span class="o">*</span><span class="n">channel</span><span class="p">;</span> +<a id="line-249" name="line-249"></a> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">close</span><span class="w"> </span><span class="p">(</span><span class="n">parent_exit_notification</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">close</span><span class="w"> </span><span class="p">(</span><span class="n">pipe_from_child</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span> +<a id="line-252" name="line-252"></a> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">channel</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_io_channel_unix_new</span><span class="w"> </span><span class="p">(</span><span class="n">pipe_from_child</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">g_io_add_watch</span><span class="w"> </span><span class="p">(</span><span class="n">channel</span><span class="p">,</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">G_IO_IN</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_IO_ERR</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_IO_HUP</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">G_IO_NVAL</span><span class="p">,</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">read_pipe_from_child</span><span class="p">,</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">g_io_channel_unref</span><span class="w"> </span><span class="p">(</span><span class="n">channel</span><span class="p">);</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">g_child_watch_add</span><span class="w"> </span><span class="p">(</span><span class="n">pid</span><span class="p">,</span><span class="w"> </span><span class="n">child_done_notification</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="p">}</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="k">else</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="cm">/* George awesomely wrote code originally to handle the</span> +<a id="line-263" name="line-263"></a><span class="cm"> * could-not-fork case synchronously. I'm not copying it, as I'm</span> +<a id="line-264" name="line-264"></a><span class="cm"> * guessing that the system is pretty hosed if that's the case.</span> +<a id="line-265" name="line-265"></a><span class="cm"> * However, he gets major kudos for trying. (-:</span> +<a id="line-266" name="line-266"></a><span class="cm"> */</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">g_assert_not_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-268" name="line-268"></a><span class="p">}</span> +<a id="line-269" name="line-269"></a> +<a id="line-270" name="line-270"></a><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-271" name="line-271"></a><span class="nf">screenshot_save_get_filename</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-272" name="line-272"></a><span class="p">{</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">tmp_filename</span><span class="p">;</span> +<a id="line-274" name="line-274"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/38.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/38.html new file mode 100644 index 00000000..fc472a08 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/38.html @@ -0,0 +1,2009 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-screenshot/src/screenshot-utils.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> screenshot-utils.c</p> +<a href="38.html#line-684"> variableScope 684</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span> +<span class="normal">533</span> +<span class="normal">534</span> +<span class="normal">535</span> +<span class="normal">536</span> +<span class="normal">537</span> +<span class="normal">538</span> +<span class="normal">539</span> +<span class="normal">540</span> +<span class="normal">541</span> +<span class="normal">542</span> +<span class="normal">543</span> +<span class="normal">544</span> +<span class="normal">545</span> +<span class="normal">546</span> +<span class="normal">547</span> +<span class="normal">548</span> +<span class="normal">549</span> +<span class="normal">550</span> +<span class="normal">551</span> +<span class="normal">552</span> +<span class="normal">553</span> +<span class="normal">554</span> +<span class="normal">555</span> +<span class="normal">556</span> +<span class="normal">557</span> +<span class="normal">558</span> +<span class="normal">559</span> +<span class="normal">560</span> +<span class="normal">561</span> +<span class="normal">562</span> +<span class="normal">563</span> +<span class="normal">564</span> +<span class="normal">565</span> +<span class="normal">566</span> +<span class="normal">567</span> +<span class="normal">568</span> +<span class="normal">569</span> +<span class="normal">570</span> +<span class="normal">571</span> +<span class="normal">572</span> +<span class="normal">573</span> +<span class="normal">574</span> +<span class="normal">575</span> +<span class="normal">576</span> +<span class="normal">577</span> +<span class="normal">578</span> +<span class="normal">579</span> +<span class="normal">580</span> +<span class="normal">581</span> +<span class="normal">582</span> +<span class="normal">583</span> +<span class="normal">584</span> +<span class="normal">585</span> +<span class="normal">586</span> +<span class="normal">587</span> +<span class="normal">588</span> +<span class="normal">589</span> +<span class="normal">590</span> +<span class="normal">591</span> +<span class="normal">592</span> +<span class="normal">593</span> +<span class="normal">594</span> +<span class="normal">595</span> +<span class="normal">596</span> +<span class="normal">597</span> +<span class="normal">598</span> +<span class="normal">599</span> +<span class="normal">600</span> +<span class="normal">601</span> +<span class="normal">602</span> +<span class="normal">603</span> +<span class="normal">604</span> +<span class="normal">605</span> +<span class="normal">606</span> +<span class="normal">607</span> +<span class="normal">608</span> +<span class="normal">609</span> +<span class="normal">610</span> +<span class="normal">611</span> +<span class="normal">612</span> +<span class="normal">613</span> +<span class="normal">614</span> +<span class="normal">615</span> +<span class="normal">616</span> +<span class="normal">617</span> +<span class="normal">618</span> +<span class="normal">619</span> +<span class="normal">620</span> +<span class="normal">621</span> +<span class="normal">622</span> +<span class="normal">623</span> +<span class="normal">624</span> +<span class="normal">625</span> +<span class="normal">626</span> +<span class="normal">627</span> +<span class="normal">628</span> +<span class="normal">629</span> +<span class="normal">630</span> +<span class="normal">631</span> +<span class="normal">632</span> +<span class="normal">633</span> +<span class="normal">634</span> +<span class="normal">635</span> +<span class="normal">636</span> +<span class="normal">637</span> +<span class="normal">638</span> +<span class="normal">639</span> +<span class="normal">640</span> +<span class="normal">641</span> +<span class="normal">642</span> +<span class="normal">643</span> +<span class="normal">644</span> +<span class="normal">645</span> +<span class="normal">646</span> +<span class="normal">647</span> +<span class="normal">648</span> +<span class="normal">649</span> +<span class="normal">650</span> +<span class="normal">651</span> +<span class="normal">652</span> +<span class="normal">653</span> +<span class="normal">654</span> +<span class="normal">655</span> +<span class="normal">656</span> +<span class="normal">657</span> +<span class="normal">658</span> +<span class="normal">659</span> +<span class="normal">660</span> +<span class="normal">661</span> +<span class="normal">662</span> +<span class="normal">663</span> +<span class="normal">664</span> +<span class="normal">665</span> +<span class="normal">666</span> +<span class="normal">667</span> +<span class="normal">668</span> +<span class="normal">669</span> +<span class="normal">670</span> +<span class="normal">671</span> +<span class="normal">672</span> +<span class="normal">673</span> +<span class="normal">674</span> +<span class="normal">675</span> +<span class="normal">676</span> +<span class="normal">677</span> +<span class="normal">678</span> +<span class="normal">679</span> +<span class="normal">680</span> +<span class="normal">681</span> +<span class="normal">682</span> +<span class="normal">683</span> +<span class="normal">684</span> +<span class="normal">685</span> +<span class="normal">686</span> +<span class="normal">687</span> +<span class="normal">688</span> +<span class="normal">689</span> +<span class="normal">690</span> +<span class="normal">691</span> +<span class="normal">692</span> +<span class="normal">693</span> +<span class="normal">694</span> +<span class="normal">695</span> +<span class="normal">696</span> +<span class="normal">697</span> +<span class="normal">698</span> +<span class="normal">699</span> +<span class="normal">700</span> +<span class="normal">701</span> +<span class="normal">702</span> +<span class="normal">703</span> +<span class="normal">704</span> +<span class="normal">705</span> +<span class="normal">706</span> +<span class="normal">707</span> +<span class="normal">708</span> +<span class="normal">709</span> +<span class="normal">710</span> +<span class="normal">711</span> +<span class="normal">712</span> +<span class="normal">713</span> +<span class="normal">714</span> +<span class="normal">715</span> +<span class="normal">716</span> +<span class="normal">717</span> +<span class="normal">718</span> +<span class="normal">719</span> +<span class="normal">720</span> +<span class="normal">721</span> +<span class="normal">722</span> +<span class="normal">723</span> +<span class="normal">724</span> +<span class="normal">725</span> +<span class="normal">726</span> +<span class="normal">727</span> +<span class="normal">728</span> +<span class="normal">729</span> +<span class="normal">730</span> +<span class="normal">731</span> +<span class="normal">732</span> +<span class="normal">733</span> +<span class="normal">734</span> +<span class="normal">735</span> +<span class="normal">736</span> +<span class="normal">737</span> +<span class="normal">738</span> +<span class="normal">739</span> +<span class="normal">740</span> +<span class="normal">741</span> +<span class="normal">742</span> +<span class="normal">743</span> +<span class="normal">744</span> +<span class="normal">745</span> +<span class="normal">746</span> +<span class="normal">747</span> +<span class="normal">748</span> +<span class="normal">749</span> +<span class="normal">750</span> +<span class="normal">751</span> +<span class="normal">752</span> +<span class="normal">753</span> +<span class="normal">754</span> +<span class="normal">755</span> +<span class="normal">756</span> +<span class="normal">757</span> +<span class="normal">758</span> +<span class="normal">759</span> +<span class="normal">760</span> +<span class="normal">761</span> +<span class="normal">762</span> +<span class="normal">763</span> +<span class="normal">764</span> +<span class="normal">765</span> +<span class="normal">766</span> +<span class="normal">767</span> +<span class="normal">768</span> +<span class="normal">769</span> +<span class="normal">770</span> +<span class="normal">771</span> +<span class="normal">772</span> +<span class="normal">773</span> +<span class="normal">774</span> +<span class="normal">775</span> +<span class="normal">776</span> +<span class="normal">777</span> +<span class="normal">778</span> +<span class="normal">779</span> +<span class="normal">780</span> +<span class="normal">781</span> +<span class="normal">782</span> +<span class="normal">783</span> +<span class="normal">784</span> +<span class="normal">785</span> +<span class="normal">786</span> +<span class="normal">787</span> +<span class="normal">788</span> +<span class="normal">789</span> +<span class="normal">790</span> +<span class="normal">791</span> +<span class="normal">792</span> +<span class="normal">793</span> +<span class="normal">794</span> +<span class="normal">795</span> +<span class="normal">796</span> +<span class="normal">797</span> +<span class="normal">798</span> +<span class="normal">799</span> +<span class="normal">800</span> +<span class="normal">801</span> +<span class="normal">802</span> +<span class="normal">803</span> +<span class="normal">804</span> +<span class="normal">805</span> +<span class="normal">806</span> +<span class="normal">807</span> +<span class="normal">808</span> +<span class="normal">809</span> +<span class="normal">810</span> +<span class="normal">811</span> +<span class="normal">812</span> +<span class="normal">813</span> +<span class="normal">814</span> +<span class="normal">815</span> +<span class="normal">816</span> +<span class="normal">817</span> +<span class="normal">818</span> +<span class="normal">819</span> +<span class="normal">820</span> +<span class="normal">821</span> +<span class="normal">822</span> +<span class="normal">823</span> +<span class="normal">824</span> +<span class="normal">825</span> +<span class="normal">826</span> +<span class="normal">827</span> +<span class="normal">828</span> +<span class="normal">829</span> +<span class="normal">830</span> +<span class="normal">831</span> +<span class="normal">832</span> +<span class="normal">833</span> +<span class="normal">834</span> +<span class="normal">835</span> +<span class="normal">836</span> +<span class="normal">837</span> +<span class="normal">838</span> +<span class="normal">839</span> +<span class="normal">840</span> +<span class="normal">841</span> +<span class="normal">842</span> +<span class="normal">843</span> +<span class="normal">844</span> +<span class="normal">845</span> +<span class="normal">846</span> +<span class="normal">847</span> +<span class="normal">848</span> +<span class="normal">849</span> +<span class="normal">850</span> +<span class="normal">851</span> +<span class="normal">852</span> +<span class="normal">853</span> +<span class="normal">854</span> +<span class="normal">855</span> +<span class="normal">856</span> +<span class="normal">857</span> +<span class="normal">858</span> +<span class="normal">859</span> +<span class="normal">860</span> +<span class="normal">861</span> +<span class="normal">862</span> +<span class="normal">863</span> +<span class="normal">864</span> +<span class="normal">865</span> +<span class="normal">866</span> +<span class="normal">867</span> +<span class="normal">868</span> +<span class="normal">869</span> +<span class="normal">870</span> +<span class="normal">871</span> +<span class="normal">872</span> +<span class="normal">873</span> +<span class="normal">874</span> +<span class="normal">875</span> +<span class="normal">876</span> +<span class="normal">877</span> +<span class="normal">878</span> +<span class="normal">879</span> +<span class="normal">880</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2001-2006 Jonathan Blandford <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2008 Cosimo Cecchi <[email protected]></span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-4" name="line-4"></a><span class="cm"> *</span> +<a id="line-5" name="line-5"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-6" name="line-6"></a><span class="cm"> *</span> +<a id="line-7" name="line-7"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-8" name="line-8"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-9" name="line-9"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-10" name="line-10"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-11" name="line-11"></a><span class="cm"> *</span> +<a id="line-12" name="line-12"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-13" name="line-13"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-14" name="line-14"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-15" name="line-15"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-16" name="line-16"></a><span class="cm"> *</span> +<a id="line-17" name="line-17"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-18" name="line-18"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-19" name="line-19"></a><span class="cm"> */</span> +<a id="line-20" name="line-20"></a> +<a id="line-21" name="line-21"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-22" name="line-22"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-23" name="line-23"></a><span class="cp">#endif</span> +<a id="line-24" name="line-24"></a> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"screenshot-utils.h"</span> +<a id="line-26" name="line-26"></a> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><X11/Xatom.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkx.h></span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gdk/gdkkeysyms.h></span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-33" name="line-33"></a> +<a id="line-34" name="line-34"></a><span class="cp">#ifdef HAVE_X11_EXTENSIONS_SHAPE_H</span> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><X11/extensions/shape.h></span> +<a id="line-36" name="line-36"></a><span class="cp">#endif</span> +<a id="line-37" name="line-37"></a> +<a id="line-38" name="line-38"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">selection_window</span><span class="p">;</span> +<a id="line-39" name="line-39"></a> +<a id="line-40" name="line-40"></a><span class="cp">#define SELECTION_NAME "_MATE_PANEL_SCREENSHOT"</span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="cm">/* To make sure there is only one screenshot taken at a time,</span> +<a id="line-43" name="line-43"></a><span class="cm"> * (Imagine key repeat for the print screen key) we hold a selection</span> +<a id="line-44" name="line-44"></a><span class="cm"> * until we are done taking the screenshot</span> +<a id="line-45" name="line-45"></a><span class="cm"> */</span> +<a id="line-46" name="line-46"></a><span class="n">gboolean</span> +<a id="line-47" name="line-47"></a><span class="nf">screenshot_grab_lock</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-48" name="line-48"></a><span class="p">{</span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="n">GdkAtom</span><span class="w"> </span><span class="n">selection_atom</span><span class="p">;</span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-52" name="line-52"></a> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="n">selection_atom</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_atom_intern</span><span class="w"> </span><span class="p">(</span><span class="n">SELECTION_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">gdk_x11_grab_server</span><span class="w"> </span><span class="p">();</span> +<a id="line-55" name="line-55"></a> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_selection_owner_get</span><span class="w"> </span><span class="p">(</span><span class="n">selection_atom</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-58" name="line-58"></a> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">selection_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_invisible_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">selection_window</span><span class="p">);</span> +<a id="line-61" name="line-61"></a> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_selection_owner_set</span><span class="w"> </span><span class="p">(</span><span class="n">selection_window</span><span class="p">,</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">gdk_atom_intern</span><span class="w"> </span><span class="p">(</span><span class="n">SELECTION_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">),</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">GDK_CURRENT_TIME</span><span class="p">))</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="p">{</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">selection_window</span><span class="p">);</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">selection_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="p">}</span> +<a id="line-70" name="line-70"></a> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="nl">out</span><span class="p">:</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">gdk_x11_ungrab_server</span><span class="w"> </span><span class="p">();</span> +<a id="line-75" name="line-75"></a> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_default</span><span class="w"> </span><span class="p">();</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">gdk_display_flush</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-78" name="line-78"></a> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-80" name="line-80"></a><span class="p">}</span> +<a id="line-81" name="line-81"></a> +<a id="line-82" name="line-82"></a><span class="kt">void</span> +<a id="line-83" name="line-83"></a><span class="nf">screenshot_release_lock</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-84" name="line-84"></a><span class="p">{</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-86" name="line-86"></a> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">selection_window</span><span class="p">)</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="p">{</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">selection_window</span><span class="p">);</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">selection_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="p">}</span> +<a id="line-92" name="line-92"></a> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_default</span><span class="w"> </span><span class="p">();</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">gdk_display_flush</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-95" name="line-95"></a><span class="p">}</span> +<a id="line-96" name="line-96"></a> +<a id="line-97" name="line-97"></a><span class="k">static</span><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span> +<a id="line-98" name="line-98"></a><span class="nf">screen_get_active_window</span><span class="w"> </span><span class="p">(</span><span class="n">GdkScreen</span><span class="w"> </span><span class="o">*</span><span class="n">screen</span><span class="p">)</span> +<a id="line-99" name="line-99"></a><span class="p">{</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">Atom</span><span class="w"> </span><span class="n">type_return</span><span class="p">;</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">format_return</span><span class="p">;</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">gulong</span><span class="w"> </span><span class="n">nitems_return</span><span class="p">;</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">gulong</span><span class="w"> </span><span class="n">bytes_after_return</span><span class="p">;</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-106" name="line-106"></a> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gdk_x11_screen_supports_net_wm_hint</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">,</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">gdk_atom_intern_static_string</span><span class="w"> </span><span class="p">(</span><span class="s">"_NET_ACTIVE_WINDOW"</span><span class="p">)))</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-110" name="line-110"></a> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">XGetWindowProperty</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_DISPLAY_XDISPLAY</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_screen_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">)),</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">RootWindow</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_DISPLAY_XDISPLAY</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_screen_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">)),</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">GDK_SCREEN_XNUMBER</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">)),</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">gdk_x11_get_xatom_by_name_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_screen_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">),</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="s">"_NET_ACTIVE_WINDOW"</span><span class="p">),</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">False</span><span class="p">,</span><span class="w"> </span><span class="n">XA_WINDOW</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">type_return</span><span class="p">,</span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="o">&</span><span class="n">format_return</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">nitems_return</span><span class="p">,</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="o">&</span><span class="n">bytes_after_return</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">data</span><span class="p">)</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">Success</span><span class="p">)</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="p">{</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">type_return</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">XA_WINDOW</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">format_return</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">32</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">))</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="p">{</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">Window</span><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="p">(</span><span class="n">Window</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-124" name="line-124"></a> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">None</span><span class="p">)</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="p">{</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_x11_window_foreign_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_screen_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">),</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">window</span><span class="p">);</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="p">}</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="p">}</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="p">}</span> +<a id="line-132" name="line-132"></a> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">)</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">XFree</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">);</span> +<a id="line-135" name="line-135"></a> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-137" name="line-137"></a><span class="p">}</span> +<a id="line-138" name="line-138"></a> +<a id="line-139" name="line-139"></a><span class="k">static</span><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span> +<a id="line-140" name="line-140"></a><span class="nf">screenshot_find_active_window</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-141" name="line-141"></a><span class="p">{</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">GdkScreen</span><span class="w"> </span><span class="o">*</span><span class="n">default_screen</span><span class="p">;</span> +<a id="line-144" name="line-144"></a> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">default_screen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_screen_get_default</span><span class="w"> </span><span class="p">();</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">screen_get_active_window</span><span class="w"> </span><span class="p">(</span><span class="n">default_screen</span><span class="p">);</span> +<a id="line-147" name="line-147"></a> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">window</span><span class="p">;</span> +<a id="line-149" name="line-149"></a><span class="p">}</span> +<a id="line-150" name="line-150"></a> +<a id="line-151" name="line-151"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-152" name="line-152"></a><span class="nf">screenshot_window_is_desktop</span><span class="w"> </span><span class="p">(</span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">)</span> +<a id="line-153" name="line-153"></a><span class="p">{</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">root_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_get_default_root_window</span><span class="w"> </span><span class="p">();</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">GdkWindowTypeHint</span><span class="w"> </span><span class="n">window_type_hint</span><span class="p">;</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">root_window</span><span class="p">)</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-159" name="line-159"></a> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">window_type_hint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_type_hint</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window_type_hint</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_WINDOW_TYPE_HINT_DESKTOP</span><span class="p">)</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-163" name="line-163"></a> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-165" name="line-165"></a> +<a id="line-166" name="line-166"></a><span class="p">}</span> +<a id="line-167" name="line-167"></a> +<a id="line-168" name="line-168"></a><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span> +<a id="line-169" name="line-169"></a><span class="nf">screenshot_find_current_window</span><span class="w"> </span><span class="p">()</span> +<a id="line-170" name="line-170"></a><span class="p">{</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">current_window</span><span class="p">;</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">GdkSeat</span><span class="w"> </span><span class="o">*</span><span class="n">seat</span><span class="p">;</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">GdkDevice</span><span class="w"> </span><span class="o">*</span><span class="n">device</span><span class="p">;</span> +<a id="line-175" name="line-175"></a> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">current_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">screenshot_find_active_window</span><span class="w"> </span><span class="p">();</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">current_window</span><span class="p">);</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">seat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_default_seat</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">device</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_seat_get_pointer</span><span class="w"> </span><span class="p">(</span><span class="n">seat</span><span class="p">);</span> +<a id="line-180" name="line-180"></a> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="cm">/* If there's no active window, we fall back to returning the</span> +<a id="line-182" name="line-182"></a><span class="cm"> * window that the cursor is in.</span> +<a id="line-183" name="line-183"></a><span class="cm"> */</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">current_window</span><span class="p">)</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">current_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_device_get_window_at_position</span><span class="w"> </span><span class="p">(</span><span class="n">device</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-186" name="line-186"></a> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">current_window</span><span class="p">)</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="p">{</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot_window_is_desktop</span><span class="w"> </span><span class="p">(</span><span class="n">current_window</span><span class="p">))</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="cm">/* if the current window is the desktop (e.g. caja), we</span> +<a id="line-191" name="line-191"></a><span class="cm"> * return NULL, as getting the whole screen makes more sense.</span> +<a id="line-192" name="line-192"></a><span class="cm"> */</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-194" name="line-194"></a> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="cm">/* Once we have a window, we take the toplevel ancestor. */</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="n">current_window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_toplevel</span><span class="w"> </span><span class="p">(</span><span class="n">current_window</span><span class="p">);</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="p">}</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">current_window</span><span class="p">;</span> +<a id="line-200" name="line-200"></a><span class="p">}</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">rect</span><span class="p">;</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">button_pressed</span><span class="p">;</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-206" name="line-206"></a><span class="p">}</span><span class="w"> </span><span class="n">select_area_filter_data</span><span class="p">;</span> +<a id="line-207" name="line-207"></a> +<a id="line-208" name="line-208"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-209" name="line-209"></a><span class="nf">select_area_button_press</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">select_area_filter_data</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">)</span> +<a id="line-212" name="line-212"></a><span class="p">{</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">button_pressed</span><span class="p">)</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-215" name="line-215"></a> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">button_pressed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x_root</span><span class="p">;</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y_root</span><span class="p">;</span> +<a id="line-219" name="line-219"></a> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-221" name="line-221"></a><span class="p">}</span> +<a id="line-222" name="line-222"></a> +<a id="line-223" name="line-223"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-224" name="line-224"></a><span class="nf">select_area_motion_notify</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">GdkEventMotion</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">select_area_filter_data</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">)</span> +<a id="line-227" name="line-227"></a><span class="p">{</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">draw_rect</span><span class="p">;</span> +<a id="line-229" name="line-229"></a> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">data</span><span class="o">-></span><span class="n">button_pressed</span><span class="p">)</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-232" name="line-232"></a> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ABS</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x_root</span><span class="p">);</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ABS</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y_root</span><span class="p">);</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x_root</span><span class="p">);</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y_root</span><span class="p">);</span> +<a id="line-237" name="line-237"></a> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">draw_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="p">{</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">gtk_window_move</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="mi">-100</span><span class="p">,</span><span class="w"> </span><span class="mi">-100</span><span class="p">);</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">gtk_window_resize</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="p">}</span> +<a id="line-244" name="line-244"></a> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">gtk_window_move</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">y</span><span class="p">);</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">gtk_window_resize</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">height</span><span class="p">);</span> +<a id="line-247" name="line-247"></a> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="cm">/* We (ab)use app-paintable to indicate if we have an RGBA window */</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_widget_get_app_paintable</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">))</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="p">{</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">gdkwindow</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-252" name="line-252"></a> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="cm">/* Shape the window to make only the outline visible */</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">draw_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">2</span><span class="p">)</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="p">{</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">cairo_region_t</span><span class="w"> </span><span class="o">*</span><span class="n">region</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">region2</span><span class="p">;</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">cairo_rectangle_int_t</span><span class="w"> </span><span class="n">region_rect</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="n">draw_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">2</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="p">};</span> +<a id="line-261" name="line-261"></a> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">region</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cairo_region_create_rectangle</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">region_rect</span><span class="p">);</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">region_rect</span><span class="p">.</span><span class="n">x</span><span class="o">++</span><span class="p">;</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">region_rect</span><span class="p">.</span><span class="n">y</span><span class="o">++</span><span class="p">;</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">region_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">region_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">region2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cairo_region_create_rectangle</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">region_rect</span><span class="p">);</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">cairo_region_subtract</span><span class="w"> </span><span class="p">(</span><span class="n">region</span><span class="p">,</span><span class="w"> </span><span class="n">region2</span><span class="p">);</span> +<a id="line-269" name="line-269"></a> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">gdk_window_shape_combine_region</span><span class="w"> </span><span class="p">(</span><span class="n">gdkwindow</span><span class="p">,</span><span class="w"> </span><span class="n">region</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-271" name="line-271"></a> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">cairo_region_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">region</span><span class="p">);</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">cairo_region_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">region2</span><span class="p">);</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="p">}</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="k">else</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">gdk_window_shape_combine_region</span><span class="w"> </span><span class="p">(</span><span class="n">gdkwindow</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="p">}</span> +<a id="line-278" name="line-278"></a> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-280" name="line-280"></a><span class="p">}</span> +<a id="line-281" name="line-281"></a> +<a id="line-282" name="line-282"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-283" name="line-283"></a><span class="nf">select_area_button_release</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">select_area_filter_data</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">)</span> +<a id="line-286" name="line-286"></a><span class="p">{</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">data</span><span class="o">-></span><span class="n">button_pressed</span><span class="p">)</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-289" name="line-289"></a> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ABS</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x_root</span><span class="p">);</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ABS</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y_root</span><span class="p">);</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">x_root</span><span class="p">);</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">event</span><span class="o">-></span><span class="n">y_root</span><span class="p">);</span> +<a id="line-294" name="line-294"></a> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="n">gtk_main_quit</span><span class="w"> </span><span class="p">();</span> +<a id="line-296" name="line-296"></a> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-298" name="line-298"></a><span class="p">}</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-301" name="line-301"></a><span class="nf">select_area_key_press</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">GdkEventKey</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">select_area_filter_data</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">)</span> +<a id="line-304" name="line-304"></a><span class="p">{</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">keyval</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_KEY_Escape</span><span class="p">)</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="p">{</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">gtk_main_quit</span><span class="w"> </span><span class="p">();</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="p">}</span> +<a id="line-313" name="line-313"></a> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-315" name="line-315"></a><span class="p">}</span> +<a id="line-316" name="line-316"></a> +<a id="line-317" name="line-317"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-318" name="line-318"></a><span class="nf">draw</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">unused</span><span class="p">)</span> +<a id="line-319" name="line-319"></a><span class="p">{</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="n">GtkStyleContext</span><span class="w"> </span><span class="o">*</span><span class="n">style</span><span class="p">;</span> +<a id="line-321" name="line-321"></a> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">style</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_style_context</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-323" name="line-323"></a> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_get_app_paintable</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">))</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="p">{</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">cairo_set_operator</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">CAIRO_OPERATOR_SOURCE</span><span class="p">);</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">cairo_set_source_rgba</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">cairo_paint</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-329" name="line-329"></a> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">gtk_style_context_save</span><span class="w"> </span><span class="p">(</span><span class="n">style</span><span class="p">);</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">gtk_style_context_add_class</span><span class="w"> </span><span class="p">(</span><span class="n">style</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_STYLE_CLASS_RUBBERBAND</span><span class="p">);</span> +<a id="line-332" name="line-332"></a> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="n">gtk_render_background</span><span class="w"> </span><span class="p">(</span><span class="n">style</span><span class="p">,</span><span class="w"> </span><span class="n">cr</span><span class="p">,</span> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="n">gtk_widget_get_allocated_width</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="n">gtk_widget_get_allocated_height</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="n">gtk_render_frame</span><span class="w"> </span><span class="p">(</span><span class="n">style</span><span class="p">,</span><span class="w"> </span><span class="n">cr</span><span class="p">,</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">gtk_widget_get_allocated_width</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">gtk_widget_get_allocated_height</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">));</span> +<a id="line-341" name="line-341"></a> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">gtk_style_context_restore</span><span class="w"> </span><span class="p">(</span><span class="n">style</span><span class="p">);</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="p">}</span> +<a id="line-344" name="line-344"></a> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-346" name="line-346"></a><span class="p">}</span> +<a id="line-347" name="line-347"></a> +<a id="line-348" name="line-348"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-349" name="line-349"></a><span class="nf">create_select_window</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-350" name="line-350"></a><span class="p">{</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">GdkScreen</span><span class="w"> </span><span class="o">*</span><span class="n">screen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_screen_get_default</span><span class="w"> </span><span class="p">();</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_window_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW_POPUP</span><span class="p">);</span> +<a id="line-353" name="line-353"></a> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">GdkVisual</span><span class="w"> </span><span class="o">*</span><span class="n">visual</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_screen_get_rgba_visual</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">);</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_screen_is_composited</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">visual</span><span class="p">)</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="p">{</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="n">gtk_widget_set_visual</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">visual</span><span class="p">);</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">gtk_widget_set_app_paintable</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="p">}</span> +<a id="line-360" name="line-360"></a> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"draw"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">draw</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-362" name="line-362"></a> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">gtk_window_move</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="mi">-100</span><span class="p">,</span><span class="w"> </span><span class="mi">-100</span><span class="p">);</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">gtk_window_resize</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">window</span><span class="p">;</span> +<a id="line-367" name="line-367"></a><span class="p">}</span> +<a id="line-368" name="line-368"></a> +<a id="line-369" name="line-369"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">rectangle</span><span class="p">;</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">SelectAreaCallback</span><span class="w"> </span><span class="n">callback</span><span class="p">;</span> +<a id="line-372" name="line-372"></a><span class="p">}</span><span class="w"> </span><span class="n">CallbackData</span><span class="p">;</span> +<a id="line-373" name="line-373"></a> +<a id="line-374" name="line-374"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-375" name="line-375"></a><span class="nf">emit_select_callback_in_idle</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-376" name="line-376"></a><span class="p">{</span> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">CallbackData</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-378" name="line-378"></a> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">callback</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">data</span><span class="o">-></span><span class="n">rectangle</span><span class="p">);</span> +<a id="line-380" name="line-380"></a> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">CallbackData</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-382" name="line-382"></a> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-384" name="line-384"></a><span class="p">}</span> +<a id="line-385" name="line-385"></a> +<a id="line-386" name="line-386"></a><span class="kt">void</span> +<a id="line-387" name="line-387"></a><span class="nf">screenshot_select_area_async</span><span class="w"> </span><span class="p">(</span><span class="n">SelectAreaCallback</span><span class="w"> </span><span class="n">callback</span><span class="p">)</span> +<a id="line-388" name="line-388"></a><span class="p">{</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">GdkCursor</span><span class="w"> </span><span class="o">*</span><span class="n">cursor</span><span class="p">;</span> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="n">GdkSeat</span><span class="w"> </span><span class="o">*</span><span class="n">seat</span><span class="p">;</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">GdkGrabStatus</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">select_area_filter_data</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">CallbackData</span><span class="w"> </span><span class="o">*</span><span class="n">cb_data</span><span class="p">;</span> +<a id="line-395" name="line-395"></a> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">button_pressed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">create_select_window</span><span class="p">();</span> +<a id="line-402" name="line-402"></a> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">cb_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">CallbackData</span><span class="p">);</span> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">cb_data</span><span class="o">-></span><span class="n">callback</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">callback</span><span class="p">;</span> +<a id="line-405" name="line-405"></a> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"key-press-event"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">select_area_key_press</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">data</span><span class="p">);</span> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"button-press-event"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">select_area_button_press</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">data</span><span class="p">);</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"button-release-event"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">select_area_button_release</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">data</span><span class="p">);</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="s">"motion-notify-event"</span><span class="p">,</span><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">select_area_motion_notify</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">data</span><span class="p">);</span> +<a id="line-410" name="line-410"></a> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_default</span><span class="w"> </span><span class="p">();</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_CROSSHAIR</span><span class="p">);</span> +<a id="line-413" name="line-413"></a> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="n">seat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_default_seat</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-415" name="line-415"></a> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_seat_grab</span><span class="w"> </span><span class="p">(</span><span class="n">seat</span><span class="p">,</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">window</span><span class="p">),</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="n">GDK_SEAT_CAPABILITY_ALL</span><span class="p">,</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="n">cursor</span><span class="p">,</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-424" name="line-424"></a> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">res</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">GDK_GRAB_SUCCESS</span><span class="p">)</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="p">{</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">cursor</span><span class="p">);</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="p">}</span> +<a id="line-430" name="line-430"></a> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">gtk_main</span><span class="w"> </span><span class="p">();</span> +<a id="line-432" name="line-432"></a> +<a id="line-433" name="line-433"></a><span class="w"> </span><span class="n">gdk_seat_ungrab</span><span class="w"> </span><span class="p">(</span><span class="n">seat</span><span class="p">);</span> +<a id="line-434" name="line-434"></a> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">window</span><span class="p">);</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">cursor</span><span class="p">);</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">gdk_display_flush</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-438" name="line-438"></a> +<a id="line-439" name="line-439"></a><span class="nl">out</span><span class="p">:</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">cb_data</span><span class="o">-></span><span class="n">rectangle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">rect</span><span class="p">;</span> +<a id="line-441" name="line-441"></a> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="cm">/* FIXME: we should actually be emitting the callback When</span> +<a id="line-443" name="line-443"></a><span class="cm"> * the compositor has finished re-drawing, but there seems to be no easy</span> +<a id="line-444" name="line-444"></a><span class="cm"> * way to know that.</span> +<a id="line-445" name="line-445"></a><span class="cm"> */</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="n">g_timeout_add</span><span class="w"> </span><span class="p">(</span><span class="mi">200</span><span class="p">,</span><span class="w"> </span><span class="n">emit_select_callback_in_idle</span><span class="p">,</span><span class="w"> </span><span class="n">cb_data</span><span class="p">);</span> +<a id="line-447" name="line-447"></a><span class="p">}</span> +<a id="line-448" name="line-448"></a> +<a id="line-449" name="line-449"></a><span class="k">static</span><span class="w"> </span><span class="n">Window</span> +<a id="line-450" name="line-450"></a><span class="nf">find_wm_window</span><span class="w"> </span><span class="p">(</span><span class="n">Window</span><span class="w"> </span><span class="n">xid</span><span class="p">)</span> +<a id="line-451" name="line-451"></a><span class="p">{</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">Window</span><span class="w"> </span><span class="n">root</span><span class="p">,</span><span class="w"> </span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">children</span><span class="p">;</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">nchildren</span><span class="p">;</span> +<a id="line-454" name="line-454"></a> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="k">do</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="p">{</span> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">XQueryTree</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_DISPLAY_XDISPLAY</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_display_get_default</span><span class="w"> </span><span class="p">()),</span><span class="w"> </span><span class="n">xid</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">root</span><span class="p">,</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="o">&</span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">children</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">nchildren</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="p">{</span> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Couldn't find window manager window"</span><span class="p">);</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">None</span><span class="p">;</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="p">}</span> +<a id="line-463" name="line-463"></a> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">root</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">parent</span><span class="p">)</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">xid</span><span class="p">;</span> +<a id="line-466" name="line-466"></a> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="n">xid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">parent</span><span class="p">;</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="p">}</span> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-470" name="line-470"></a><span class="p">}</span> +<a id="line-471" name="line-471"></a> +<a id="line-472" name="line-472"></a><span class="k">static</span><span class="w"> </span><span class="n">cairo_region_t</span><span class="w"> </span><span class="o">*</span> +<a id="line-473" name="line-473"></a><span class="nf">make_region_with_monitors</span><span class="w"> </span><span class="p">(</span><span class="n">GdkScreen</span><span class="w"> </span><span class="o">*</span><span class="n">screen</span><span class="p">)</span> +<a id="line-474" name="line-474"></a><span class="p">{</span> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="n">cairo_region_t</span><span class="w"> </span><span class="o">*</span><span class="n">region</span><span class="p">;</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">num_monitors</span><span class="p">;</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-479" name="line-479"></a> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_screen_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">);</span> +<a id="line-481" name="line-481"></a><span class="w"> </span><span class="n">num_monitors</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_n_monitors</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-482" name="line-482"></a> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="n">region</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cairo_region_create</span><span class="w"> </span><span class="p">();</span> +<a id="line-484" name="line-484"></a> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">num_monitors</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="p">{</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">rect</span><span class="p">;</span> +<a id="line-488" name="line-488"></a> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="n">gdk_monitor_get_geometry</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_display_get_monitor</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">rect</span><span class="p">);</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">cairo_region_union_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">region</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rect</span><span class="p">);</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="p">}</span> +<a id="line-492" name="line-492"></a> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">region</span><span class="p">;</span> +<a id="line-494" name="line-494"></a><span class="p">}</span> +<a id="line-495" name="line-495"></a> +<a id="line-496" name="line-496"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-497" name="line-497"></a><span class="nf">blank_rectangle_in_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="o">*</span><span class="n">rect</span><span class="p">)</span> +<a id="line-498" name="line-498"></a><span class="p">{</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">;</span> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">x2</span><span class="p">,</span><span class="w"> </span><span class="n">y2</span><span class="p">;</span> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="o">*</span><span class="n">pixels</span><span class="p">;</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">rowstride</span><span class="p">;</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">n_channels</span><span class="p">;</span> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="o">*</span><span class="n">row</span><span class="p">;</span> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">has_alpha</span><span class="p">;</span> +<a id="line-506" name="line-506"></a> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_pixbuf_get_colorspace</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GDK_COLORSPACE_RGB</span><span class="p">);</span> +<a id="line-508" name="line-508"></a> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="n">x2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="p">;</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="n">y2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="p">;</span> +<a id="line-511" name="line-511"></a> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="n">pixels</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_pixels</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">);</span> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="n">rowstride</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_rowstride</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">);</span> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">has_alpha</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_has_alpha</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">);</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="n">n_channels</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_n_channels</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">);</span> +<a id="line-516" name="line-516"></a> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="p">;</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">y2</span><span class="p">;</span><span class="w"> </span><span class="n">y</span><span class="o">++</span><span class="p">)</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="p">{</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="p">;</span> +<a id="line-520" name="line-520"></a> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">row</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pixels</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">rowstride</span><span class="p">;</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">row</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">n_channels</span><span class="p">;</span> +<a id="line-523" name="line-523"></a> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="p">;</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">x2</span><span class="p">;</span><span class="w"> </span><span class="n">x</span><span class="o">++</span><span class="p">)</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="p">{</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="o">++</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="o">++</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="o">++</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-529" name="line-529"></a> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">has_alpha</span><span class="p">)</span> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="o">++</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">255</span><span class="p">;</span><span class="w"> </span><span class="cm">/* opaque black */</span> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="p">}</span> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="p">}</span> +<a id="line-534" name="line-534"></a><span class="p">}</span> +<a id="line-535" name="line-535"></a> +<a id="line-536" name="line-536"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-537" name="line-537"></a><span class="nf">blank_region_in_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">cairo_region_t</span><span class="w"> </span><span class="o">*</span><span class="n">region</span><span class="p">)</span> +<a id="line-538" name="line-538"></a><span class="p">{</span> +<a id="line-539" name="line-539"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">n_rects</span><span class="p">;</span> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-541" name="line-541"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="n">cairo_rectangle_int_t</span><span class="w"> </span><span class="n">pixbuf_rect</span><span class="p">;</span> +<a id="line-543" name="line-543"></a> +<a id="line-544" name="line-544"></a><span class="w"> </span><span class="n">n_rects</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cairo_region_num_rectangles</span><span class="w"> </span><span class="p">(</span><span class="n">region</span><span class="p">);</span> +<a id="line-545" name="line-545"></a> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_width</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">);</span> +<a id="line-547" name="line-547"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_height</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">);</span> +<a id="line-548" name="line-548"></a> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="n">pixbuf_rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="n">pixbuf_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="n">pixbuf_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">width</span><span class="p">;</span> +<a id="line-552" name="line-552"></a><span class="w"> </span><span class="n">pixbuf_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-553" name="line-553"></a> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">n_rects</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="p">{</span> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="n">cairo_rectangle_int_t</span><span class="w"> </span><span class="n">rect</span><span class="p">,</span><span class="w"> </span><span class="n">dest</span><span class="p">;</span> +<a id="line-557" name="line-557"></a> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="n">cairo_region_get_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">region</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rect</span><span class="p">);</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_rectangle_intersect</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">rect</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">pixbuf_rect</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">dest</span><span class="p">))</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="n">blank_rectangle_in_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">dest</span><span class="p">);</span> +<a id="line-561" name="line-561"></a> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="p">}</span> +<a id="line-563" name="line-563"></a><span class="p">}</span> +<a id="line-564" name="line-564"></a> +<a id="line-565" name="line-565"></a><span class="cm">/* When there are multiple monitors with different resolutions, the visible area</span> +<a id="line-566" name="line-566"></a><span class="cm"> * within the root window may not be rectangular (it may have an L-shape, for</span> +<a id="line-567" name="line-567"></a><span class="cm"> * example). In that case, mask out the areas of the root window which would</span> +<a id="line-568" name="line-568"></a><span class="cm"> * not be visible in the monitors, so that screenshot do not end up with content</span> +<a id="line-569" name="line-569"></a><span class="cm"> * that the user won't ever see.</span> +<a id="line-570" name="line-570"></a><span class="cm"> */</span> +<a id="line-571" name="line-571"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-572" name="line-572"></a><span class="nf">mask_monitors</span><span class="w"> </span><span class="p">(</span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">root_window</span><span class="p">)</span> +<a id="line-573" name="line-573"></a><span class="p">{</span> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="n">GdkScreen</span><span class="w"> </span><span class="o">*</span><span class="n">screen</span><span class="p">;</span> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="n">cairo_region_t</span><span class="w"> </span><span class="o">*</span><span class="n">region_with_monitors</span><span class="p">;</span> +<a id="line-576" name="line-576"></a><span class="w"> </span><span class="n">cairo_region_t</span><span class="w"> </span><span class="o">*</span><span class="n">invisible_region</span><span class="p">;</span> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="n">cairo_rectangle_int_t</span><span class="w"> </span><span class="n">rect</span><span class="p">;</span> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-579" name="line-579"></a> +<a id="line-580" name="line-580"></a><span class="w"> </span><span class="n">screen</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_screen</span><span class="w"> </span><span class="p">(</span><span class="n">root_window</span><span class="p">);</span> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="n">scale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_scale_factor</span><span class="w"> </span><span class="p">(</span><span class="n">root_window</span><span class="p">);</span> +<a id="line-582" name="line-582"></a> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="n">region_with_monitors</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">make_region_with_monitors</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">);</span> +<a id="line-584" name="line-584"></a> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-587" name="line-587"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">WidthOfScreen</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_x11_screen_get_xscreen</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">))</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">HeightOfScreen</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_x11_screen_get_xscreen</span><span class="w"> </span><span class="p">(</span><span class="n">screen</span><span class="p">))</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-589" name="line-589"></a> +<a id="line-590" name="line-590"></a><span class="w"> </span><span class="n">invisible_region</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cairo_region_create_rectangle</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">rect</span><span class="p">);</span> +<a id="line-591" name="line-591"></a><span class="w"> </span><span class="n">cairo_region_subtract</span><span class="w"> </span><span class="p">(</span><span class="n">invisible_region</span><span class="p">,</span><span class="w"> </span><span class="n">region_with_monitors</span><span class="p">);</span> +<a id="line-592" name="line-592"></a> +<a id="line-593" name="line-593"></a><span class="w"> </span><span class="n">blank_region_in_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">invisible_region</span><span class="p">);</span> +<a id="line-594" name="line-594"></a> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="n">cairo_region_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">region_with_monitors</span><span class="p">);</span> +<a id="line-596" name="line-596"></a><span class="w"> </span><span class="n">cairo_region_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">invisible_region</span><span class="p">);</span> +<a id="line-597" name="line-597"></a><span class="p">}</span> +<a id="line-598" name="line-598"></a> +<a id="line-599" name="line-599"></a><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span> +<a id="line-600" name="line-600"></a><span class="nf">screenshot_get_pixbuf</span><span class="w"> </span><span class="p">(</span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">,</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="o">*</span><span class="n">rectangle</span><span class="p">,</span> +<a id="line-602" name="line-602"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">include_pointer</span><span class="p">,</span> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">include_border</span><span class="p">,</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">include_mask</span><span class="p">)</span> +<a id="line-605" name="line-605"></a><span class="p">{</span> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">root</span><span class="p">;</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">screenshot</span><span class="p">;</span> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">x_real_orig</span><span class="p">,</span><span class="w"> </span><span class="n">y_real_orig</span><span class="p">,</span><span class="w"> </span><span class="n">x_orig</span><span class="p">,</span><span class="w"> </span><span class="n">y_orig</span><span class="p">;</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">real_width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">,</span><span class="w"> </span><span class="n">real_height</span><span class="p">;</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">screen_width</span><span class="p">,</span><span class="w"> </span><span class="n">screen_height</span><span class="p">,</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-611" name="line-611"></a> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="cm">/* If the screenshot should include the border, we look for the WM window. */</span> +<a id="line-613" name="line-613"></a> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">include_border</span><span class="p">)</span> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="p">{</span> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="n">Window</span><span class="w"> </span><span class="n">xid</span><span class="p">,</span><span class="w"> </span><span class="n">wm</span><span class="p">;</span> +<a id="line-617" name="line-617"></a> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="n">xid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GDK_WINDOW_XID</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="n">wm</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">find_wm_window</span><span class="w"> </span><span class="p">(</span><span class="n">xid</span><span class="p">);</span> +<a id="line-620" name="line-620"></a> +<a id="line-621" name="line-621"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">wm</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">None</span><span class="p">)</span> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_x11_window_foreign_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_display_get_default</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">wm</span><span class="p">);</span> +<a id="line-623" name="line-623"></a> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="cm">/* fallback to no border if we can't find the WM window. */</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="p">}</span> +<a id="line-626" name="line-626"></a> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_get_default_root_window</span><span class="w"> </span><span class="p">();</span> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="n">scale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_scale_factor</span><span class="w"> </span><span class="p">(</span><span class="n">root</span><span class="p">);</span> +<a id="line-629" name="line-629"></a> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="n">real_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_width</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="n">real_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_height</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-632" name="line-632"></a> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="n">screen_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">WidthOfScreen</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_x11_screen_get_xscreen</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_screen_get_default</span><span class="w"> </span><span class="p">()))</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="n">screen_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">HeightOfScreen</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_x11_screen_get_xscreen</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_screen_get_default</span><span class="w"> </span><span class="p">()))</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-635" name="line-635"></a> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="n">gdk_window_get_origin</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">x_real_orig</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">y_real_orig</span><span class="p">);</span> +<a id="line-637" name="line-637"></a> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="n">x_orig</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x_real_orig</span><span class="p">;</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="n">y_orig</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">y_real_orig</span><span class="p">;</span> +<a id="line-640" name="line-640"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">real_width</span><span class="p">;</span> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">real_height</span><span class="p">;</span> +<a id="line-642" name="line-642"></a> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">x_orig</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="p">{</span> +<a id="line-645" name="line-645"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">x_orig</span><span class="p">;</span> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="n">x_orig</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="p">}</span> +<a id="line-648" name="line-648"></a> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">y_orig</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-650" name="line-650"></a><span class="w"> </span><span class="p">{</span> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">y_orig</span><span class="p">;</span> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="n">y_orig</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="p">}</span> +<a id="line-654" name="line-654"></a> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">x_orig</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">screen_width</span><span class="p">)</span> +<a id="line-656" name="line-656"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">screen_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">x_orig</span><span class="p">;</span> +<a id="line-657" name="line-657"></a> +<a id="line-658" name="line-658"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">y_orig</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">screen_height</span><span class="p">)</span> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">screen_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">y_orig</span><span class="p">;</span> +<a id="line-660" name="line-660"></a> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">rectangle</span><span class="p">)</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="p">{</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="n">x_orig</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rectangle</span><span class="o">-></span><span class="n">x</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">x_orig</span><span class="p">;</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="n">y_orig</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rectangle</span><span class="o">-></span><span class="n">y</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">y_orig</span><span class="p">;</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rectangle</span><span class="o">-></span><span class="n">width</span><span class="p">;</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rectangle</span><span class="o">-></span><span class="n">height</span><span class="p">;</span> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="p">}</span> +<a id="line-668" name="line-668"></a> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="n">screenshot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_from_window</span><span class="w"> </span><span class="p">(</span><span class="n">root</span><span class="p">,</span> +<a id="line-670" name="line-670"></a><span class="w"> </span><span class="n">x_orig</span><span class="p">,</span><span class="w"> </span><span class="n">y_orig</span><span class="p">,</span> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">);</span> +<a id="line-672" name="line-672"></a> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="cm">/*</span> +<a id="line-674" name="line-674"></a><span class="cm"> * Masking currently only works properly with full-screen shots</span> +<a id="line-675" name="line-675"></a><span class="cm"> */</span> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">include_mask</span><span class="p">)</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="n">mask_monitors</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">);</span> +<a id="line-678" name="line-678"></a> +<a id="line-679" name="line-679"></a><span class="cp">#ifdef HAVE_X11_EXTENSIONS_SHAPE_H</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">include_border</span><span class="p">)</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="p">{</span> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="n">XRectangle</span><span class="w"> </span><span class="o">*</span><span class="n">rectangles</span><span class="p">;</span> +<a id="line-683" name="line-683"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">tmp</span><span class="p">;</span> +<a id="line-684" name="line-684"></a><span class="hll"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">rectangle_count</span><span class="p">,</span><span class="w"> </span><span class="n">rectangle_order</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'i' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-685" name="line-685"></a> +<a id="line-686" name="line-686"></a><span class="w"> </span><span class="cm">/* we must use XShape to avoid showing what's under the rounder corners</span> +<a id="line-687" name="line-687"></a><span class="cm"> * of the WM decoration.</span> +<a id="line-688" name="line-688"></a><span class="cm"> */</span> +<a id="line-689" name="line-689"></a> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="n">rectangles</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">XShapeGetRectangles</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_DISPLAY_XDISPLAY</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_display_get_default</span><span class="w"> </span><span class="p">()),</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="n">GDK_WINDOW_XID</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">),</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="n">ShapeBounding</span><span class="p">,</span> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="o">&</span><span class="n">rectangle_count</span><span class="p">,</span> +<a id="line-694" name="line-694"></a><span class="w"> </span><span class="o">&</span><span class="n">rectangle_order</span><span class="p">);</span> +<a id="line-695" name="line-695"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">rectangles</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">rectangle_count</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">root</span><span class="p">)</span> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="p">{</span> +<a id="line-697" name="line-697"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">has_alpha</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_has_alpha</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot</span><span class="p">);</span> +<a id="line-698" name="line-698"></a> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">scale</span><span class="p">)</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="p">{</span> +<a id="line-701" name="line-701"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">*=</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">*=</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-703" name="line-703"></a><span class="w"> </span><span class="p">}</span> +<a id="line-704" name="line-704"></a> +<a id="line-705" name="line-705"></a><span class="w"> </span><span class="n">tmp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_new</span><span class="w"> </span><span class="p">(</span><span class="n">GDK_COLORSPACE_RGB</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">);</span> +<a id="line-706" name="line-706"></a><span class="w"> </span><span class="n">gdk_pixbuf_fill</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-707" name="line-707"></a> +<a id="line-708" name="line-708"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">rectangle_count</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span> +<a id="line-709" name="line-709"></a><span class="w"> </span><span class="p">{</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">rec_x</span><span class="p">,</span><span class="w"> </span><span class="n">rec_y</span><span class="p">;</span> +<a id="line-711" name="line-711"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">rec_width</span><span class="p">,</span><span class="w"> </span><span class="n">rec_height</span><span class="p">;</span> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">y</span><span class="p">;</span> +<a id="line-713" name="line-713"></a> +<a id="line-714" name="line-714"></a><span class="w"> </span><span class="n">rec_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rectangles</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">x</span><span class="p">;</span> +<a id="line-715" name="line-715"></a><span class="w"> </span><span class="n">rec_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rectangles</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">y</span><span class="p">;</span> +<a id="line-716" name="line-716"></a><span class="w"> </span><span class="n">rec_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rectangles</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">width</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-717" name="line-717"></a><span class="w"> </span><span class="n">rec_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rectangles</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">height</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-718" name="line-718"></a> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">x_real_orig</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-720" name="line-720"></a><span class="w"> </span><span class="p">{</span> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="n">rec_x</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">x_real_orig</span><span class="p">;</span> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="n">rec_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="p">(</span><span class="n">rec_x</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-723" name="line-723"></a><span class="w"> </span><span class="n">rec_width</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">x_real_orig</span><span class="p">;</span> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="p">}</span> +<a id="line-725" name="line-725"></a> +<a id="line-726" name="line-726"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">y_real_orig</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-727" name="line-727"></a><span class="w"> </span><span class="p">{</span> +<a id="line-728" name="line-728"></a><span class="w"> </span><span class="n">rec_y</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">y_real_orig</span><span class="p">;</span> +<a id="line-729" name="line-729"></a><span class="w"> </span><span class="n">rec_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="p">(</span><span class="n">rec_y</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-730" name="line-730"></a><span class="w"> </span><span class="n">rec_height</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">y_real_orig</span><span class="p">;</span> +<a id="line-731" name="line-731"></a><span class="w"> </span><span class="p">}</span> +<a id="line-732" name="line-732"></a> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">x_orig</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rec_x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rec_width</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">screen_width</span><span class="p">)</span> +<a id="line-734" name="line-734"></a><span class="w"> </span><span class="n">rec_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">screen_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">x_orig</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">rec_x</span><span class="p">;</span> +<a id="line-735" name="line-735"></a> +<a id="line-736" name="line-736"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">y_orig</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rec_y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rec_height</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">screen_height</span><span class="p">)</span> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="n">rec_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">screen_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">y_orig</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">rec_y</span><span class="p">;</span> +<a id="line-738" name="line-738"></a> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">scale</span><span class="p">)</span> +<a id="line-740" name="line-740"></a><span class="w"> </span><span class="p">{</span> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">rec_width</span><span class="w"> </span><span class="o">*=</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-742" name="line-742"></a><span class="w"> </span><span class="n">rec_height</span><span class="w"> </span><span class="o">*=</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="p">}</span> +<a id="line-744" name="line-744"></a> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rec_y</span><span class="p">;</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">rec_y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rec_height</span><span class="p">;</span><span class="w"> </span><span class="n">y</span><span class="o">++</span><span class="p">)</span> +<a id="line-746" name="line-746"></a><span class="w"> </span><span class="p">{</span> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="n">guchar</span><span class="w"> </span><span class="o">*</span><span class="n">src_pixels</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">dest_pixels</span><span class="p">;</span> +<a id="line-748" name="line-748"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">x</span><span class="p">;</span> +<a id="line-749" name="line-749"></a> +<a id="line-750" name="line-750"></a><span class="w"> </span><span class="n">src_pixels</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_pixels</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot</span><span class="p">)</span> +<a id="line-751" name="line-751"></a><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gdk_pixbuf_get_rowstride</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot</span><span class="p">)</span> +<a id="line-752" name="line-752"></a><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rec_x</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">has_alpha</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="mi">4</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">dest_pixels</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_pixels</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">)</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">gdk_pixbuf_get_rowstride</span><span class="w"> </span><span class="p">(</span><span class="n">tmp</span><span class="p">)</span> +<a id="line-755" name="line-755"></a><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rec_x</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">4</span><span class="p">;</span> +<a id="line-756" name="line-756"></a> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">rec_width</span><span class="p">;</span><span class="w"> </span><span class="n">x</span><span class="o">++</span><span class="p">)</span> +<a id="line-758" name="line-758"></a><span class="w"> </span><span class="p">{</span> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="o">*</span><span class="n">dest_pixels</span><span class="o">++</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">src_pixels</span><span class="o">++</span><span class="p">;</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="o">*</span><span class="n">dest_pixels</span><span class="o">++</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">src_pixels</span><span class="o">++</span><span class="p">;</span> +<a id="line-761" name="line-761"></a><span class="w"> </span><span class="o">*</span><span class="n">dest_pixels</span><span class="o">++</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">src_pixels</span><span class="o">++</span><span class="p">;</span> +<a id="line-762" name="line-762"></a> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">has_alpha</span><span class="p">)</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="o">*</span><span class="n">dest_pixels</span><span class="o">++</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="n">src_pixels</span><span class="o">++</span><span class="p">;</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="k">else</span> +<a id="line-766" name="line-766"></a><span class="w"> </span><span class="o">*</span><span class="n">dest_pixels</span><span class="o">++</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">255</span><span class="p">;</span> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="p">}</span> +<a id="line-768" name="line-768"></a><span class="w"> </span><span class="p">}</span> +<a id="line-769" name="line-769"></a><span class="w"> </span><span class="p">}</span> +<a id="line-770" name="line-770"></a> +<a id="line-771" name="line-771"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">screenshot</span><span class="p">);</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="n">screenshot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tmp</span><span class="p">;</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="p">}</span> +<a id="line-774" name="line-774"></a><span class="w"> </span><span class="p">}</span> +<a id="line-775" name="line-775"></a><span class="cp">#endif </span><span class="cm">/* HAVE_X11_EXTENSIONS_SHAPE_H */</span> +<a id="line-776" name="line-776"></a> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="cm">/* if we have a selected area, there were by definition no cursor in the</span> +<a id="line-778" name="line-778"></a><span class="cm"> * screenshot */</span> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">include_pointer</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="n">rectangle</span><span class="p">)</span> +<a id="line-780" name="line-780"></a><span class="w"> </span><span class="p">{</span> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="n">GdkCursor</span><span class="w"> </span><span class="o">*</span><span class="n">cursor</span><span class="p">;</span> +<a id="line-782" name="line-782"></a><span class="w"> </span><span class="n">GdkPixbuf</span><span class="w"> </span><span class="o">*</span><span class="n">cursor_pixbuf</span><span class="p">;</span> +<a id="line-783" name="line-783"></a> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="n">cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_display_get_default</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">GDK_LEFT_PTR</span><span class="p">);</span> +<a id="line-785" name="line-785"></a><span class="w"> </span><span class="n">cursor_pixbuf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_get_image</span><span class="w"> </span><span class="p">(</span><span class="n">cursor</span><span class="p">);</span> +<a id="line-786" name="line-786"></a> +<a id="line-787" name="line-787"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">cursor_pixbuf</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-788" name="line-788"></a><span class="w"> </span><span class="p">{</span> +<a id="line-789" name="line-789"></a><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span> +<a id="line-790" name="line-790"></a><span class="w"> </span><span class="n">GdkSeat</span><span class="w"> </span><span class="o">*</span><span class="n">seat</span><span class="p">;</span> +<a id="line-791" name="line-791"></a><span class="w"> </span><span class="n">GdkDevice</span><span class="w"> </span><span class="o">*</span><span class="n">device</span><span class="p">;</span> +<a id="line-792" name="line-792"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">r1</span><span class="p">,</span><span class="w"> </span><span class="n">r2</span><span class="p">;</span> +<a id="line-793" name="line-793"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">cx</span><span class="p">,</span><span class="w"> </span><span class="n">cy</span><span class="p">,</span><span class="w"> </span><span class="n">xhot</span><span class="p">,</span><span class="w"> </span><span class="n">yhot</span><span class="p">;</span> +<a id="line-794" name="line-794"></a> +<a id="line-795" name="line-795"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_window_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">);</span> +<a id="line-796" name="line-796"></a><span class="w"> </span><span class="n">seat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_display_get_default_seat</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">);</span> +<a id="line-797" name="line-797"></a><span class="w"> </span><span class="n">device</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_seat_get_pointer</span><span class="w"> </span><span class="p">(</span><span class="n">seat</span><span class="p">);</span> +<a id="line-798" name="line-798"></a> +<a id="line-799" name="line-799"></a><span class="w"> </span><span class="n">gdk_window_get_device_position</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">device</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">cx</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">cy</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="n">sscanf</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_pixbuf_get_option</span><span class="w"> </span><span class="p">(</span><span class="n">cursor_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="s">"x_hot"</span><span class="p">),</span><span class="w"> </span><span class="s">"%d"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">xhot</span><span class="p">);</span> +<a id="line-801" name="line-801"></a><span class="w"> </span><span class="n">sscanf</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_pixbuf_get_option</span><span class="w"> </span><span class="p">(</span><span class="n">cursor_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="s">"y_hot"</span><span class="p">),</span><span class="w"> </span><span class="s">"%d"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">yhot</span><span class="p">);</span> +<a id="line-802" name="line-802"></a> +<a id="line-803" name="line-803"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">scale</span><span class="p">)</span> +<a id="line-804" name="line-804"></a><span class="w"> </span><span class="p">{</span> +<a id="line-805" name="line-805"></a><span class="w"> </span><span class="n">cx</span><span class="w"> </span><span class="o">*=</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-806" name="line-806"></a><span class="w"> </span><span class="n">cy</span><span class="w"> </span><span class="o">*=</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="p">}</span> +<a id="line-808" name="line-808"></a> +<a id="line-809" name="line-809"></a><span class="w"> </span><span class="cm">/* in r1 we have the window coordinates */</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="n">r1</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x_real_orig</span><span class="p">;</span> +<a id="line-811" name="line-811"></a><span class="w"> </span><span class="n">r1</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">y_real_orig</span><span class="p">;</span> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="n">r1</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">real_width</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-813" name="line-813"></a><span class="w"> </span><span class="n">r1</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">real_height</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">scale</span><span class="p">;</span> +<a id="line-814" name="line-814"></a> +<a id="line-815" name="line-815"></a><span class="w"> </span><span class="cm">/* in r2 we have the cursor window coordinates */</span> +<a id="line-816" name="line-816"></a><span class="w"> </span><span class="n">r2</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cx</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">x_real_orig</span><span class="p">;</span> +<a id="line-817" name="line-817"></a><span class="w"> </span><span class="n">r2</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cy</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">y_real_orig</span><span class="p">;</span> +<a id="line-818" name="line-818"></a><span class="w"> </span><span class="n">r2</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_width</span><span class="w"> </span><span class="p">(</span><span class="n">cursor_pixbuf</span><span class="p">);</span> +<a id="line-819" name="line-819"></a><span class="w"> </span><span class="n">r2</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_pixbuf_get_height</span><span class="w"> </span><span class="p">(</span><span class="n">cursor_pixbuf</span><span class="p">);</span> +<a id="line-820" name="line-820"></a> +<a id="line-821" name="line-821"></a><span class="w"> </span><span class="cm">/* see if the pointer is inside the window */</span> +<a id="line-822" name="line-822"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gdk_rectangle_intersect</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">r1</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">r2</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">r2</span><span class="p">))</span> +<a id="line-823" name="line-823"></a><span class="w"> </span><span class="p">{</span> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="n">gdk_pixbuf_composite</span><span class="w"> </span><span class="p">(</span><span class="n">cursor_pixbuf</span><span class="p">,</span><span class="w"> </span><span class="n">screenshot</span><span class="p">,</span> +<a id="line-825" name="line-825"></a><span class="w"> </span><span class="n">cx</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">xhot</span><span class="p">,</span><span class="w"> </span><span class="n">cy</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">yhot</span><span class="p">,</span> +<a id="line-826" name="line-826"></a><span class="w"> </span><span class="n">r2</span><span class="p">.</span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">r2</span><span class="p">.</span><span class="n">height</span><span class="p">,</span> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="n">cx</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">xhot</span><span class="p">,</span><span class="w"> </span><span class="n">cy</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">yhot</span><span class="p">,</span> +<a id="line-828" name="line-828"></a><span class="w"> </span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="mf">1.0</span><span class="p">,</span> +<a id="line-829" name="line-829"></a><span class="w"> </span><span class="n">GDK_INTERP_BILINEAR</span><span class="p">,</span> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="mi">255</span><span class="p">);</span> +<a id="line-831" name="line-831"></a><span class="w"> </span><span class="p">}</span> +<a id="line-832" name="line-832"></a> +<a id="line-833" name="line-833"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">cursor_pixbuf</span><span class="p">);</span> +<a id="line-834" name="line-834"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">cursor</span><span class="p">);</span> +<a id="line-835" name="line-835"></a><span class="w"> </span><span class="p">}</span> +<a id="line-836" name="line-836"></a><span class="w"> </span><span class="p">}</span> +<a id="line-837" name="line-837"></a> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">screenshot</span><span class="p">;</span> +<a id="line-839" name="line-839"></a><span class="p">}</span> +<a id="line-840" name="line-840"></a> +<a id="line-841" name="line-841"></a><span class="kt">void</span> +<a id="line-842" name="line-842"></a><span class="nf">screenshot_show_error_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">,</span> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">,</span> +<a id="line-844" name="line-844"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">detail</span><span class="p">)</span> +<a id="line-845" name="line-845"></a><span class="p">{</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-847" name="line-847"></a> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">((</span><span class="n">parent</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">)));</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-850" name="line-850"></a> +<a id="line-851" name="line-851"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> +<a id="line-852" name="line-852"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-853" name="line-853"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-854" name="line-854"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span> +<a id="line-855" name="line-855"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">);</span> +<a id="line-856" name="line-856"></a><span class="w"> </span><span class="n">gtk_window_set_title</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="s">""</span><span class="p">);</span> +<a id="line-857" name="line-857"></a> +<a id="line-858" name="line-858"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">detail</span><span class="p">)</span> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-860" name="line-860"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">detail</span><span class="p">);</span> +<a id="line-861" name="line-861"></a> +<a id="line-862" name="line-862"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">gtk_window_get_group</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">))</span> +<a id="line-863" name="line-863"></a><span class="w"> </span><span class="n">gtk_window_group_add_window</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_window_get_group</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-864" name="line-864"></a> +<a id="line-865" name="line-865"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-866" name="line-866"></a> +<a id="line-867" name="line-867"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-868" name="line-868"></a><span class="p">}</span> +<a id="line-869" name="line-869"></a> +<a id="line-870" name="line-870"></a><span class="kt">void</span> +<a id="line-871" name="line-871"></a><span class="nf">screenshot_show_gerror_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">,</span> +<a id="line-872" name="line-872"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">message</span><span class="p">,</span> +<a id="line-873" name="line-873"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">)</span> +<a id="line-874" name="line-874"></a><span class="p">{</span> +<a id="line-875" name="line-875"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">GTK_IS_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">));</span> +<a id="line-876" name="line-876"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">message</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-878" name="line-878"></a> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="n">screenshot_show_error_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-880" name="line-880"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/39.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/39.html new file mode 100644 index 00000000..dac54fb5 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/39.html @@ -0,0 +1,1027 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: mate-screenshot/src/screenshot-xfer.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> screenshot-xfer.c</p> +<a href="39.html#line-34"> unusedStructMember 34</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2001-2006 Jonathan Blandford <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2008 Cosimo Cecchi <[email protected]></span> +<a id="line-3" name="line-3"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-4" name="line-4"></a><span class="cm"> *</span> +<a id="line-5" name="line-5"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-6" name="line-6"></a><span class="cm"> *</span> +<a id="line-7" name="line-7"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-8" name="line-8"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-9" name="line-9"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-10" name="line-10"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-11" name="line-11"></a><span class="cm"> *</span> +<a id="line-12" name="line-12"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-13" name="line-13"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-14" name="line-14"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-15" name="line-15"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-16" name="line-16"></a><span class="cm"> *</span> +<a id="line-17" name="line-17"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-18" name="line-18"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-19" name="line-19"></a><span class="cm"> */</span> +<a id="line-20" name="line-20"></a> +<a id="line-21" name="line-21"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-22" name="line-22"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-23" name="line-23"></a><span class="cp">#endif</span> +<a id="line-24" name="line-24"></a> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"screenshot-xfer.h"</span> +<a id="line-26" name="line-26"></a> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><time.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-29" name="line-29"></a> +<a id="line-30" name="line-30"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span> +<a id="line-31" name="line-31"></a><span class="p">{</span> +<a id="line-32" name="line-32"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-33" name="line-33"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">progress_bar</span><span class="p">;</span> +<a id="line-34" name="line-34"></a><span class="hll"><span class="w"> </span><span class="n">GCancellable</span><span class="w"> </span><span class="o">*</span><span class="n">cancellable</span><span class="p">;</span><span class="error2"><--- struct member 'TransferDialog::cancellable' is never used.</span> +</span><a id="line-35" name="line-35"></a><span class="p">}</span><span class="w"> </span><span class="n">TransferDialog</span><span class="p">;</span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span> +<a id="line-38" name="line-38"></a><span class="p">{</span> +<a id="line-39" name="line-39"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">source</span><span class="p">;</span> +<a id="line-40" name="line-40"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">dest</span><span class="p">;</span> +<a id="line-41" name="line-41"></a><span class="w"> </span><span class="n">GFileCopyFlags</span><span class="w"> </span><span class="n">flags</span><span class="p">;</span> +<a id="line-42" name="line-42"></a><span class="w"> </span><span class="n">TransferCallback</span><span class="w"> </span><span class="n">callback</span><span class="p">;</span> +<a id="line-43" name="line-43"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">callback_data</span><span class="p">;</span> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="n">GCancellable</span><span class="w"> </span><span class="o">*</span><span class="n">cancellable</span><span class="p">;</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">;</span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="n">TransferDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-47" name="line-47"></a><span class="w"> </span><span class="n">TransferResult</span><span class="w"> </span><span class="n">result</span><span class="p">;</span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="n">GIOSchedulerJob</span><span class="w"> </span><span class="o">*</span><span class="n">io_job</span><span class="p">;</span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">;</span> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">dialog_timeout_id</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="w"> </span><span class="n">goffset</span><span class="w"> </span><span class="n">total_bytes</span><span class="p">;</span> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="n">goffset</span><span class="w"> </span><span class="n">current_bytes</span><span class="p">;</span> +<a id="line-53" name="line-53"></a><span class="p">}</span><span class="w"> </span><span class="n">TransferJob</span><span class="p">;</span> +<a id="line-54" name="line-54"></a> +<a id="line-55" name="line-55"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span> +<a id="line-56" name="line-56"></a><span class="p">{</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">resp</span><span class="p">;</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">;</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">basename</span><span class="p">;</span> +<a id="line-60" name="line-60"></a><span class="p">}</span><span class="w"> </span><span class="n">ErrorDialogData</span><span class="p">;</span> +<a id="line-61" name="line-61"></a> +<a id="line-62" name="line-62"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-63" name="line-63"></a><span class="nf">do_run_overwrite_confirm_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">_data</span><span class="p">)</span> +<a id="line-64" name="line-64"></a><span class="p">{</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">ErrorDialogData</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">_data</span><span class="p">;</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-68" name="line-68"></a> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="cm">/* we need to ask the user if they want to overwrite this file */</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">parent</span><span class="p">),</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">GTK_MESSAGE_QUESTION</span><span class="p">,</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">GTK_BUTTONS_NONE</span><span class="p">,</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"File already exists"</span><span class="p">));</span> +<a id="line-75" name="line-75"></a> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"The file </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> already exists. "</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="s">"Would you like to replace it?"</span><span class="p">),</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">basename</span><span class="p">);</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">gtk_dialog_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="s">"gtk-cancel"</span><span class="p">,</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">);</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">gtk_dialog_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Replace"</span><span class="p">),</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-86" name="line-86"></a> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-89" name="line-89"></a> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">resp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-91" name="line-91"></a> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-93" name="line-93"></a><span class="p">}</span> +<a id="line-94" name="line-94"></a> +<a id="line-95" name="line-95"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-96" name="line-96"></a><span class="nf">transfer_dialog_response_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkDialog</span><span class="w"> </span><span class="o">*</span><span class="n">d</span><span class="p">,</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">,</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">GCancellable</span><span class="w"> </span><span class="o">*</span><span class="n">cancellable</span><span class="p">)</span> +<a id="line-99" name="line-99"></a><span class="p">{</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">)</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="p">{</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_cancellable_is_cancelled</span><span class="w"> </span><span class="p">(</span><span class="n">cancellable</span><span class="p">))</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="p">{</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">g_cancellable_cancel</span><span class="w"> </span><span class="p">(</span><span class="n">cancellable</span><span class="p">);</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="p">}</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="p">}</span> +<a id="line-107" name="line-107"></a><span class="p">}</span> +<a id="line-108" name="line-108"></a> +<a id="line-109" name="line-109"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-110" name="line-110"></a><span class="nf">transfer_progress_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">TransferJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="p">)</span> +<a id="line-111" name="line-111"></a><span class="p">{</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">TransferDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">gdialog</span><span class="p">;</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">;</span> +<a id="line-115" name="line-115"></a> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new0</span><span class="w"> </span><span class="p">(</span><span class="n">TransferDialog</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-117" name="line-117"></a> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">gdialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">parent</span><span class="p">),</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">GTK_MESSAGE_OTHER</span><span class="p">,</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CANCEL</span><span class="p">,</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Saving file..."</span><span class="p">));</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_progress_bar_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">gtk_box_pack_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_message_dialog_get_message_area</span><span class="w"> </span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">gdialog</span><span class="p">)),</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">progress_bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">widget</span><span class="p">;</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">dialog</span><span class="o">-></span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdialog</span><span class="p">;</span> +<a id="line-129" name="line-129"></a> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">gdialog</span><span class="p">,</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">transfer_dialog_response_cb</span><span class="p">),</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">cancellable</span><span class="p">);</span> +<a id="line-134" name="line-134"></a> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dialog</span><span class="p">;</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">gdialog</span><span class="p">);</span> +<a id="line-137" name="line-137"></a> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-139" name="line-139"></a><span class="p">}</span> +<a id="line-140" name="line-140"></a> +<a id="line-141" name="line-141"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-142" name="line-142"></a><span class="nf">transfer_progress_dialog_start</span><span class="w"> </span><span class="p">(</span><span class="n">TransferJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="p">)</span> +<a id="line-143" name="line-143"></a><span class="p">{</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="cm">/* sends to the mainloop and schedules show */</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">dialog_timeout_id</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">dialog_timeout_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add_seconds</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="p">(</span><span class="n">GSourceFunc</span><span class="p">)</span><span class="w"> </span><span class="n">transfer_progress_dialog_new</span><span class="p">,</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">job</span><span class="p">);</span> +<a id="line-149" name="line-149"></a><span class="p">}</span> +<a id="line-150" name="line-150"></a> +<a id="line-151" name="line-151"></a><span class="k">static</span><span class="w"> </span><span class="kt">int</span> +<a id="line-152" name="line-152"></a><span class="nf">run_overwrite_confirm_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">TransferJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="p">)</span> +<a id="line-153" name="line-153"></a><span class="p">{</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">ErrorDialogData</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">;</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">need_timeout</span><span class="p">;</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">basename</span><span class="p">;</span> +<a id="line-158" name="line-158"></a> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">basename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_basename</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">dest</span><span class="p">);</span> +<a id="line-160" name="line-160"></a> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">ErrorDialogData</span><span class="p">);</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">parent</span><span class="p">;</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">basename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">basename</span><span class="p">;</span> +<a id="line-164" name="line-164"></a> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">need_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">dialog_timeout_id</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-166" name="line-166"></a> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">need_timeout</span><span class="p">)</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="p">{</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">dialog_timeout_id</span><span class="p">);</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">dialog_timeout_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="p">}</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">g_io_scheduler_job_send_to_mainloop</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">io_job</span><span class="p">,</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">do_run_overwrite_confirm_dialog</span><span class="p">,</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">data</span><span class="p">,</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">resp</span><span class="p">;</span> +<a id="line-178" name="line-178"></a> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">need_timeout</span><span class="p">)</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">transfer_progress_dialog_start</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="p">);</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">basename</span><span class="p">);</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">ErrorDialogData</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">);</span> +<a id="line-184" name="line-184"></a> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-186" name="line-186"></a><span class="p">}</span> +<a id="line-187" name="line-187"></a> +<a id="line-188" name="line-188"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-189" name="line-189"></a><span class="nf">transfer_progress_dialog_update</span><span class="w"> </span><span class="p">(</span><span class="n">TransferJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="p">)</span> +<a id="line-190" name="line-190"></a><span class="p">{</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">TransferDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">dialog</span><span class="p">;</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">fraction</span><span class="p">;</span> +<a id="line-193" name="line-193"></a> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">fraction</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">((</span><span class="kt">double</span><span class="p">)</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">current_bytes</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">((</span><span class="kt">double</span><span class="p">)</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">total_bytes</span><span class="p">);</span> +<a id="line-195" name="line-195"></a> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="n">gtk_progress_bar_set_fraction</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_PROGRESS_BAR</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">progress_bar</span><span class="p">),</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">fraction</span><span class="p">);</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-200" name="line-200"></a><span class="p">}</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-203" name="line-203"></a><span class="nf">transfer_job_done</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-204" name="line-204"></a><span class="p">{</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">TransferJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">TransferDialog</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-207" name="line-207"></a> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">dialog</span><span class="p">;</span> +<a id="line-209" name="line-209"></a> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">dialog_timeout_id</span><span class="p">)</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="p">{</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">dialog_timeout_id</span><span class="p">);</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">dialog_timeout_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="p">}</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">)</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="o">-></span><span class="n">dialog</span><span class="p">);</span> +<a id="line-217" name="line-217"></a> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">callback</span><span class="p">)</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="p">{</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">callback</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">result</span><span class="p">,</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">error</span><span class="p">,</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">callback_data</span><span class="p">);</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="p">}</span> +<a id="line-224" name="line-224"></a> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">source</span><span class="p">);</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">dest</span><span class="p">);</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">cancellable</span><span class="p">);</span> +<a id="line-228" name="line-228"></a> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">error</span><span class="p">);</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">g_slice_free</span><span class="w"> </span><span class="p">(</span><span class="n">TransferJob</span><span class="p">,</span><span class="w"> </span><span class="n">job</span><span class="p">);</span> +<a id="line-232" name="line-232"></a> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-234" name="line-234"></a><span class="p">}</span> +<a id="line-235" name="line-235"></a> +<a id="line-236" name="line-236"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-237" name="line-237"></a><span class="nf">transfer_progress_cb</span><span class="w"> </span><span class="p">(</span><span class="n">goffset</span><span class="w"> </span><span class="n">current_num_bytes</span><span class="p">,</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">goffset</span><span class="w"> </span><span class="n">total_num_bytes</span><span class="p">,</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">TransferJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="p">)</span> +<a id="line-240" name="line-240"></a><span class="p">{</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">current_bytes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">current_num_bytes</span><span class="p">;</span> +<a id="line-242" name="line-242"></a> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">job</span><span class="o">-></span><span class="n">dialog</span><span class="p">)</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-245" name="line-245"></a> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">g_io_scheduler_job_send_to_mainloop_async</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">io_job</span><span class="p">,</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="p">(</span><span class="n">GSourceFunc</span><span class="p">)</span><span class="w"> </span><span class="n">transfer_progress_dialog_update</span><span class="p">,</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">job</span><span class="p">,</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-250" name="line-250"></a><span class="p">}</span> +<a id="line-251" name="line-251"></a> +<a id="line-252" name="line-252"></a><span class="k">static</span><span class="w"> </span><span class="n">goffset</span> +<a id="line-253" name="line-253"></a><span class="nf">get_file_size</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-254" name="line-254"></a><span class="p">{</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">file_info</span><span class="p">;</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">goffset</span><span class="w"> </span><span class="n">size</span><span class="p">;</span> +<a id="line-257" name="line-257"></a> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">file_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_info</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_SIZE</span><span class="p">,</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="p">{</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_size</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">);</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file_info</span><span class="p">);</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="p">}</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="k">else</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="p">{</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="cm">/* this should never fail as the source file is always local and in /tmp,</span> +<a id="line-269" name="line-269"></a><span class="cm"> * but you never know.</span> +<a id="line-270" name="line-270"></a><span class="cm"> */</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="p">}</span> +<a id="line-273" name="line-273"></a> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">size</span><span class="p">;</span> +<a id="line-275" name="line-275"></a><span class="p">}</span> +<a id="line-276" name="line-276"></a> +<a id="line-277" name="line-277"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-278" name="line-278"></a><span class="nf">transfer_file</span><span class="w"> </span><span class="p">(</span><span class="n">GIOSchedulerJob</span><span class="w"> </span><span class="o">*</span><span class="n">io_job</span><span class="p">,</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">GCancellable</span><span class="w"> </span><span class="o">*</span><span class="n">cancellable</span><span class="p">,</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-281" name="line-281"></a><span class="p">{</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">TransferJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">user_data</span><span class="p">;</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="p">;</span> +<a id="line-284" name="line-284"></a> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">io_job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">io_job</span><span class="p">;</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">total_bytes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_file_size</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">source</span><span class="p">);</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">total_bytes</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="p">{</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="cm">/* we can't access the source file, abort early */</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRANSFER_ERROR</span><span class="p">;</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Can't access source file"</span><span class="p">));</span> +<a id="line-293" name="line-293"></a> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="p">}</span> +<a id="line-296" name="line-296"></a> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="n">transfer_progress_dialog_start</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="p">);</span> +<a id="line-298" name="line-298"></a> +<a id="line-299" name="line-299"></a><span class="nl">retry</span><span class="p">:</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_file_copy</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">source</span><span class="p">,</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">dest</span><span class="p">,</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">flags</span><span class="p">,</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">cancellable</span><span class="p">,</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="p">(</span><span class="n">GFileProgressCallback</span><span class="p">)</span><span class="w"> </span><span class="n">transfer_progress_cb</span><span class="p">,</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">job</span><span class="p">,</span> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">))</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="p">{</span> +<a id="line-309" name="line-309"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="o">-></span><span class="n">code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_ERROR_EXISTS</span><span class="p">)</span> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="p">{</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="cm">/* ask the user if he wants to overwrite, otherwise</span> +<a id="line-313" name="line-313"></a><span class="cm"> * return and report what happened.</span> +<a id="line-314" name="line-314"></a><span class="cm"> */</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">run_overwrite_confirm_dialog</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="p">);</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">)</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="p">{</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">flags</span><span class="w"> </span><span class="o">|=</span><span class="w"> </span><span class="n">G_FILE_COPY_OVERWRITE</span><span class="p">;</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-320" name="line-320"></a> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">retry</span><span class="p">;</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="p">}</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="k">else</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="p">{</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">g_cancellable_cancel</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">cancellable</span><span class="p">);</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRANSFER_OVERWRITE</span><span class="p">;</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="p">}</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="p">}</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="o">-></span><span class="n">code</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_IO_ERROR_CANCELLED</span><span class="p">)</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="p">{</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRANSFER_CANCELLED</span><span class="p">;</span> +<a id="line-333" name="line-333"></a> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="p">}</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="k">else</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="p">{</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="cm">/* other vfs error, abort the transfer and report</span> +<a id="line-339" name="line-339"></a><span class="cm"> * the error.</span> +<a id="line-340" name="line-340"></a><span class="cm"> */</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">g_cancellable_cancel</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="o">-></span><span class="n">cancellable</span><span class="p">);</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRANSFER_ERROR</span><span class="p">;</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-344" name="line-344"></a> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="p">}</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="p">}</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="k">else</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="p">{</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="cm">/* success */</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRANSFER_OK</span><span class="p">;</span> +<a id="line-352" name="line-352"></a> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">out</span><span class="p">;</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="p">}</span> +<a id="line-355" name="line-355"></a> +<a id="line-356" name="line-356"></a><span class="nl">out</span><span class="p">:</span> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-359" name="line-359"></a> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="n">g_io_scheduler_job_send_to_mainloop_async</span><span class="w"> </span><span class="p">(</span><span class="n">io_job</span><span class="p">,</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">transfer_job_done</span><span class="p">,</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">job</span><span class="p">,</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-365" name="line-365"></a><span class="p">}</span> +<a id="line-366" name="line-366"></a> +<a id="line-367" name="line-367"></a><span class="kt">void</span> +<a id="line-368" name="line-368"></a><span class="nf">screenshot_xfer_uri</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">source_file</span><span class="p">,</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">target_file</span><span class="p">,</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">,</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">TransferCallback</span><span class="w"> </span><span class="n">done_callback</span><span class="p">,</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">done_callback_data</span><span class="p">)</span> +<a id="line-373" name="line-373"></a><span class="p">{</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">TransferJob</span><span class="w"> </span><span class="o">*</span><span class="n">job</span><span class="p">;</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">GCancellable</span><span class="w"> </span><span class="o">*</span><span class="n">cancellable</span><span class="p">;</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="n">cancellable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_cancellable_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-378" name="line-378"></a> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slice_new0</span><span class="w"> </span><span class="p">(</span><span class="n">TransferJob</span><span class="p">);</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">parent</span><span class="p">;</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">source</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">source_file</span><span class="p">);</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">dest</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">target_file</span><span class="p">);</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">callback</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">done_callback</span><span class="p">;</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">callback_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">done_callback_data</span><span class="p">;</span> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">cancellable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cancellable</span><span class="p">;</span> +<a id="line-389" name="line-389"></a> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">g_io_scheduler_push_job</span><span class="w"> </span><span class="p">(</span><span class="n">transfer_file</span><span class="p">,</span> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="n">job</span><span class="p">,</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">job</span><span class="o">-></span><span class="n">cancellable</span><span class="p">);</span> +<a id="line-394" name="line-394"></a><span class="p">}</span> +<a id="line-395" name="line-395"></a> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/4.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/4.html new file mode 100644 index 00000000..5e3fb275 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/4.html @@ -0,0 +1,1593 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: baobab/src/baobab-ringschart.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> baobab-ringschart.c</p> +<a href="4.html#line-421"> variableScope 421</a><a href="4.html#line-433"> variableScope 433</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span> +<span class="normal">533</span> +<span class="normal">534</span> +<span class="normal">535</span> +<span class="normal">536</span> +<span class="normal">537</span> +<span class="normal">538</span> +<span class="normal">539</span> +<span class="normal">540</span> +<span class="normal">541</span> +<span class="normal">542</span> +<span class="normal">543</span> +<span class="normal">544</span> +<span class="normal">545</span> +<span class="normal">546</span> +<span class="normal">547</span> +<span class="normal">548</span> +<span class="normal">549</span> +<span class="normal">550</span> +<span class="normal">551</span> +<span class="normal">552</span> +<span class="normal">553</span> +<span class="normal">554</span> +<span class="normal">555</span> +<span class="normal">556</span> +<span class="normal">557</span> +<span class="normal">558</span> +<span class="normal">559</span> +<span class="normal">560</span> +<span class="normal">561</span> +<span class="normal">562</span> +<span class="normal">563</span> +<span class="normal">564</span> +<span class="normal">565</span> +<span class="normal">566</span> +<span class="normal">567</span> +<span class="normal">568</span> +<span class="normal">569</span> +<span class="normal">570</span> +<span class="normal">571</span> +<span class="normal">572</span> +<span class="normal">573</span> +<span class="normal">574</span> +<span class="normal">575</span> +<span class="normal">576</span> +<span class="normal">577</span> +<span class="normal">578</span> +<span class="normal">579</span> +<span class="normal">580</span> +<span class="normal">581</span> +<span class="normal">582</span> +<span class="normal">583</span> +<span class="normal">584</span> +<span class="normal">585</span> +<span class="normal">586</span> +<span class="normal">587</span> +<span class="normal">588</span> +<span class="normal">589</span> +<span class="normal">590</span> +<span class="normal">591</span> +<span class="normal">592</span> +<span class="normal">593</span> +<span class="normal">594</span> +<span class="normal">595</span> +<span class="normal">596</span> +<span class="normal">597</span> +<span class="normal">598</span> +<span class="normal">599</span> +<span class="normal">600</span> +<span class="normal">601</span> +<span class="normal">602</span> +<span class="normal">603</span> +<span class="normal">604</span> +<span class="normal">605</span> +<span class="normal">606</span> +<span class="normal">607</span> +<span class="normal">608</span> +<span class="normal">609</span> +<span class="normal">610</span> +<span class="normal">611</span> +<span class="normal">612</span> +<span class="normal">613</span> +<span class="normal">614</span> +<span class="normal">615</span> +<span class="normal">616</span> +<span class="normal">617</span> +<span class="normal">618</span> +<span class="normal">619</span> +<span class="normal">620</span> +<span class="normal">621</span> +<span class="normal">622</span> +<span class="normal">623</span> +<span class="normal">624</span> +<span class="normal">625</span> +<span class="normal">626</span> +<span class="normal">627</span> +<span class="normal">628</span> +<span class="normal">629</span> +<span class="normal">630</span> +<span class="normal">631</span> +<span class="normal">632</span> +<span class="normal">633</span> +<span class="normal">634</span> +<span class="normal">635</span> +<span class="normal">636</span> +<span class="normal">637</span> +<span class="normal">638</span> +<span class="normal">639</span> +<span class="normal">640</span> +<span class="normal">641</span> +<span class="normal">642</span> +<span class="normal">643</span> +<span class="normal">644</span> +<span class="normal">645</span> +<span class="normal">646</span> +<span class="normal">647</span> +<span class="normal">648</span> +<span class="normal">649</span> +<span class="normal">650</span> +<span class="normal">651</span> +<span class="normal">652</span> +<span class="normal">653</span> +<span class="normal">654</span> +<span class="normal">655</span> +<span class="normal">656</span> +<span class="normal">657</span> +<span class="normal">658</span> +<span class="normal">659</span> +<span class="normal">660</span> +<span class="normal">661</span> +<span class="normal">662</span> +<span class="normal">663</span> +<span class="normal">664</span> +<span class="normal">665</span> +<span class="normal">666</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2008 Igalia</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> *</span> +<a id="line-19" name="line-19"></a><span class="cm"> * Authors:</span> +<a id="line-20" name="line-20"></a><span class="cm"> * Felipe Erias <[email protected]></span> +<a id="line-21" name="line-21"></a><span class="cm"> * Pablo Santamaria <[email protected]></span> +<a id="line-22" name="line-22"></a><span class="cm"> * Jacobo Aragunde <[email protected]></span> +<a id="line-23" name="line-23"></a><span class="cm"> * Eduardo Lima <[email protected]></span> +<a id="line-24" name="line-24"></a><span class="cm"> * Mario Sanchez <[email protected]></span> +<a id="line-25" name="line-25"></a><span class="cm"> * Miguel Gomez <[email protected]></span> +<a id="line-26" name="line-26"></a><span class="cm"> * Henrique Ferreiro <[email protected]></span> +<a id="line-27" name="line-27"></a><span class="cm"> * Alejandro Pinheiro <[email protected]></span> +<a id="line-28" name="line-28"></a><span class="cm"> * Carlos Sanmartin <[email protected]></span> +<a id="line-29" name="line-29"></a><span class="cm"> * Alejandro Garcia <[email protected]></span> +<a id="line-30" name="line-30"></a><span class="cm"> */</span> +<a id="line-31" name="line-31"></a> +<a id="line-32" name="line-32"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#endif</span> +<a id="line-35" name="line-35"></a> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><math.h></span> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-38" name="line-38"></a> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-40" name="line-40"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><pango/pangocairo.h></span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-chart.h"</span> +<a id="line-43" name="line-43"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-ringschart.h"</span> +<a id="line-44" name="line-44"></a> +<a id="line-45" name="line-45"></a><span class="cp">#define ITEM_BORDER_WIDTH 1</span> +<a id="line-46" name="line-46"></a><span class="cp">#define CHART_PADDING 13</span> +<a id="line-47" name="line-47"></a><span class="cp">#define ITEM_MIN_ANGLE 0.03</span> +<a id="line-48" name="line-48"></a><span class="cp">#define EDGE_ANGLE 0.004</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="cp">#define SUBFOLDER_TIP_PADDING 3</span> +<a id="line-51" name="line-51"></a> +<a id="line-52" name="line-52"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">_BaobabRingschartItem</span><span class="w"> </span><span class="n">BaobabRingschartItem</span><span class="p">;</span> +<a id="line-53" name="line-53"></a> +<a id="line-54" name="line-54"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_BaobabRingschartItem</span> +<a id="line-55" name="line-55"></a><span class="p">{</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">min_radius</span><span class="p">;</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">max_radius</span><span class="p">;</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">start_angle</span><span class="p">;</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">angle</span><span class="p">;</span> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">continued</span><span class="p">;</span> +<a id="line-61" name="line-61"></a><span class="p">};</span> +<a id="line-62" name="line-62"></a> +<a id="line-63" name="line-63"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_BaobabRingschartPrivate</span> +<a id="line-64" name="line-64"></a><span class="p">{</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">subfoldertips_enabled</span><span class="p">;</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">highlighted_item</span><span class="p">;</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">tips_timeout_event</span><span class="p">;</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">subtip_items</span><span class="p">;</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">drawing_subtips</span><span class="p">;</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">subtip_timeout</span><span class="p">;</span> +<a id="line-71" name="line-71"></a><span class="p">};</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRingschart</span><span class="p">,</span><span class="w"> </span><span class="n">baobab_ringschart</span><span class="p">,</span><span class="w"> </span><span class="n">BAOBAB_CHART_TYPE</span><span class="p">);</span> +<a id="line-74" name="line-74"></a> +<a id="line-75" name="line-75"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_ringschart_draw_sector</span><span class="w"> </span><span class="p">(</span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">center_x</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">center_y</span><span class="p">,</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">radius</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">thickness</span><span class="p">,</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">init_angle</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">final_angle</span><span class="p">,</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">fill_color</span><span class="p">,</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">continued</span><span class="p">,</span><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">border</span><span class="p">);</span> +<a id="line-81" name="line-81"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_ringschart_draw_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">highlighted</span><span class="p">);</span> +<a id="line-85" name="line-85"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_ringschart_calculate_item_geometry</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">);</span> +<a id="line-87" name="line-87"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">baobab_ringschart_is_point_over_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">x</span><span class="p">,</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">y</span><span class="p">);</span> +<a id="line-91" name="line-91"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_ringschart_get_point_min_rect</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="w"> </span><span class="n">cx</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">cy</span><span class="p">,</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">radius</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">angle</span><span class="p">,</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="o">*</span><span class="n">rect</span><span class="p">);</span> +<a id="line-94" name="line-94"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_ringschart_get_item_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">);</span> +<a id="line-96" name="line-96"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_ringschart_pre_draw</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">);</span> +<a id="line-97" name="line-97"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_ringschart_post_draw</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">);</span> +<a id="line-98" name="line-98"></a> +<a id="line-99" name="line-99"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-100" name="line-100"></a><span class="nf">baobab_ringschart_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRingschartClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">)</span> +<a id="line-101" name="line-101"></a><span class="p">{</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="n">BaobabChartClass</span><span class="w"> </span><span class="o">*</span><span class="n">chart_class</span><span class="p">;</span> +<a id="line-103" name="line-103"></a> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">chart_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="p">);</span> +<a id="line-105" name="line-105"></a> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="cm">/* BaobabChart abstract methods */</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">draw_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_draw_item</span><span class="p">;</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">calculate_item_geometry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_calculate_item_geometry</span><span class="p">;</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">is_point_over_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_is_point_over_item</span><span class="p">;</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">get_item_rectangle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_get_item_rectangle</span><span class="p">;</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">pre_draw</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_pre_draw</span><span class="p">;</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">post_draw</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_post_draw</span><span class="p">;</span> +<a id="line-113" name="line-113"></a><span class="p">}</span> +<a id="line-114" name="line-114"></a> +<a id="line-115" name="line-115"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-116" name="line-116"></a><span class="nf">baobab_ringschart_init</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRingschart</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-117" name="line-117"></a><span class="p">{</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">BaobabRingschartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">GtkSettings</span><span class="o">*</span><span class="w"> </span><span class="n">settings</span><span class="p">;</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">timeout</span><span class="p">;</span> +<a id="line-121" name="line-121"></a> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subfoldertips_enabled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">tips_timeout_event</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">drawing_subtips</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-129" name="line-129"></a> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_settings_get_default</span><span class="w"> </span><span class="p">();</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">g_object_get</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">),</span><span class="w"> </span><span class="s">"gtk-tooltip-timeout"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">timeout</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">guint</span><span class="p">)</span><span class="n">timeout</span><span class="p">;</span> +<a id="line-133" name="line-133"></a><span class="p">}</span> +<a id="line-134" name="line-134"></a> +<a id="line-135" name="line-135"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-136" name="line-136"></a><span class="nf">baobab_ringschart_draw_sector</span><span class="w"> </span><span class="p">(</span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">center_x</span><span class="p">,</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">center_y</span><span class="p">,</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">radius</span><span class="p">,</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">thickness</span><span class="p">,</span> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">init_angle</span><span class="p">,</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">final_angle</span><span class="p">,</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">fill_color</span><span class="p">,</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">continued</span><span class="p">,</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">border</span><span class="p">)</span> +<a id="line-146" name="line-146"></a><span class="p">{</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="n">cairo_set_line_width</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">border</span><span class="p">);</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">radius</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">cairo_arc</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">center_x</span><span class="p">,</span><span class="w"> </span><span class="n">center_y</span><span class="p">,</span><span class="w"> </span><span class="n">radius</span><span class="p">,</span><span class="w"> </span><span class="n">init_angle</span><span class="p">,</span><span class="w"> </span><span class="n">final_angle</span><span class="p">);</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">cairo_arc_negative</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">center_x</span><span class="p">,</span><span class="w"> </span><span class="n">center_y</span><span class="p">,</span><span class="w"> </span><span class="n">radius</span><span class="o">+</span><span class="n">thickness</span><span class="p">,</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">final_angle</span><span class="p">,</span><span class="w"> </span><span class="n">init_angle</span><span class="p">);</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">cairo_close_path</span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-153" name="line-153"></a> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">fill_color</span><span class="p">.</span><span class="n">red</span><span class="p">,</span><span class="w"> </span><span class="n">fill_color</span><span class="p">.</span><span class="n">green</span><span class="p">,</span><span class="w"> </span><span class="n">fill_color</span><span class="p">.</span><span class="n">blue</span><span class="p">);</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">cairo_fill_preserve</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">cairo_stroke</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-158" name="line-158"></a> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">continued</span><span class="p">)</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="p">{</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">cairo_set_line_width</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">cairo_arc</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">center_x</span><span class="p">,</span><span class="w"> </span><span class="n">center_y</span><span class="p">,</span><span class="w"> </span><span class="n">radius</span><span class="o">+</span><span class="n">thickness</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">init_angle</span><span class="o">+</span><span class="n">EDGE_ANGLE</span><span class="p">,</span><span class="w"> </span><span class="n">final_angle</span><span class="o">-</span><span class="n">EDGE_ANGLE</span><span class="p">);</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="n">cairo_stroke</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="p">}</span> +<a id="line-166" name="line-166"></a><span class="p">}</span> +<a id="line-167" name="line-167"></a> +<a id="line-168" name="line-168"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-169" name="line-169"></a><span class="nf">baobab_ringschart_draw_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">highlighted</span><span class="p">)</span> +<a id="line-173" name="line-173"></a><span class="p">{</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">BaobabRingschartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">;</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">fill_color</span><span class="p">;</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-178" name="line-178"></a> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_RINGSCHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-180" name="line-180"></a> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-182" name="line-182"></a> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">drawing_subtips</span><span class="p">)</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">parent</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="p">(((</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">parent</span><span class="o">-></span><span class="n">data</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="p">)</span><span class="w"> </span><span class="p">)</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="p">{</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">node</span><span class="p">;</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new0</span><span class="w"> </span><span class="p">(</span><span class="n">GList</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="p">;</span> +<a id="line-190" name="line-190"></a> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">next</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="p">;</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="p">)</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="o">-></span><span class="n">prev</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="p">;</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="p">;</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="p">}</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">baobab_chart_get_item_color</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">fill_color</span><span class="p">,</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">start_angle</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">M_PI</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">99</span><span class="p">,</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="p">,</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="n">highlighted</span><span class="p">);</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">baobab_ringschart_draw_sector</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">min_radius</span><span class="p">,</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">max_radius</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">min_radius</span><span class="p">,</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">start_angle</span><span class="p">,</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">start_angle</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">angle</span><span class="p">,</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">fill_color</span><span class="p">,</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">continued</span><span class="p">,</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">ITEM_BORDER_WIDTH</span><span class="p">);</span> +<a id="line-213" name="line-213"></a><span class="p">}</span> +<a id="line-214" name="line-214"></a> +<a id="line-215" name="line-215"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-216" name="line-216"></a><span class="nf">baobab_ringschart_calculate_item_geometry</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">)</span> +<a id="line-218" name="line-218"></a><span class="p">{</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">;</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="n">p_data</span><span class="p">;</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-223" name="line-223"></a> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">max_radius</span><span class="p">;</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">thickness</span><span class="p">;</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">max_depth</span><span class="p">;</span> +<a id="line-227" name="line-227"></a> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">max_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_get_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-229" name="line-229"></a> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRingschartItem</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-232" name="line-232"></a> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-234" name="line-234"></a> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">continued</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-237" name="line-237"></a> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">max_radius</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">CHART_PADDING</span><span class="p">;</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">thickness</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">max_radius</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="n">max_depth</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">parent</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="p">{</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">min_radius</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">max_radius</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">thickness</span><span class="p">;</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">start_angle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">angle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">M_PI</span><span class="p">;</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="p">}</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="k">else</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="p">{</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">parent</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">g_memmove</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">p_data</span><span class="p">,</span><span class="w"> </span><span class="n">parent</span><span class="o">-></span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRingschartItem</span><span class="p">));</span> +<a id="line-253" name="line-253"></a> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">min_radius</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">thickness</span><span class="p">;</span> +<a id="line-255" name="line-255"></a> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">min_radius</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">thickness</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">max_radius</span><span class="p">)</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="k">else</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">max_radius</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">min_radius</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">thickness</span><span class="p">;</span> +<a id="line-260" name="line-260"></a> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">angle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p_data</span><span class="p">.</span><span class="n">angle</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rel_size</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">100</span><span class="p">;</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">angle</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">ITEM_MIN_ANGLE</span><span class="p">)</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-264" name="line-264"></a> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">start_angle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p_data</span><span class="p">.</span><span class="n">start_angle</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">p_data</span><span class="p">.</span><span class="n">angle</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rel_start</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">100</span><span class="p">;</span> +<a id="line-266" name="line-266"></a> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">continued</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">has_any_child</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">max_depth</span><span class="p">);</span> +<a id="line-268" name="line-268"></a> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">parent</span><span class="o">-></span><span class="n">has_visible_children</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="p">}</span> +<a id="line-271" name="line-271"></a> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">baobab_ringschart_get_item_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="p">);</span> +<a id="line-274" name="line-274"></a><span class="p">}</span> +<a id="line-275" name="line-275"></a> +<a id="line-276" name="line-276"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-277" name="line-277"></a><span class="nf">baobab_ringschart_is_point_over_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">x</span><span class="p">,</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">y</span><span class="p">)</span> +<a id="line-281" name="line-281"></a><span class="p">{</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">;</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">radius</span><span class="p">,</span><span class="w"> </span><span class="n">angle</span><span class="p">;</span> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-285" name="line-285"></a> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-290" name="line-290"></a> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">radius</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sqrt</span><span class="w"> </span><span class="p">(</span><span class="n">x</span><span class="o">*</span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">y</span><span class="o">*</span><span class="n">y</span><span class="p">);</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">angle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">atan2</span><span class="w"> </span><span class="p">(</span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">);</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">angle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">angle</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">angle</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">angle</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">2</span><span class="o">*</span><span class="n">G_PI</span><span class="p">;</span> +<a id="line-294" name="line-294"></a> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">radius</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">min_radius</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="p">(</span><span class="n">radius</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">max_radius</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="p">(</span><span class="n">angle</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">start_angle</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="p">(</span><span class="n">angle</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">start_angle</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">angle</span><span class="p">);</span> +<a id="line-299" name="line-299"></a><span class="p">}</span> +<a id="line-300" name="line-300"></a> +<a id="line-301" name="line-301"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-302" name="line-302"></a><span class="nf">baobab_ringschart_get_point_min_rect</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="w"> </span><span class="n">cx</span><span class="p">,</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">cy</span><span class="p">,</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">radius</span><span class="p">,</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">angle</span><span class="p">,</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="o">*</span><span class="n">rect</span><span class="p">)</span> +<a id="line-307" name="line-307"></a><span class="p">{</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">;</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">cx</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">cos</span><span class="w"> </span><span class="p">(</span><span class="n">angle</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">radius</span><span class="p">);</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">cy</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">sin</span><span class="w"> </span><span class="p">(</span><span class="n">angle</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">radius</span><span class="p">);</span> +<a id="line-312" name="line-312"></a> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">);</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">);</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">);</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">);</span> +<a id="line-317" name="line-317"></a><span class="p">}</span> +<a id="line-318" name="line-318"></a> +<a id="line-319" name="line-319"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-320" name="line-320"></a><span class="nf">baobab_ringschart_get_item_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">)</span> +<a id="line-322" name="line-322"></a><span class="p">{</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">;</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">rect</span><span class="p">;</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">cx</span><span class="p">,</span><span class="w"> </span><span class="n">cy</span><span class="p">,</span><span class="w"> </span><span class="n">r1</span><span class="p">,</span><span class="w"> </span><span class="n">r2</span><span class="p">,</span><span class="w"> </span><span class="n">a1</span><span class="p">,</span><span class="w"> </span><span class="n">a2</span><span class="p">;</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-327" name="line-327"></a> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-329" name="line-329"></a> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">cx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">cy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="n">r1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">min_radius</span><span class="p">;</span> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="n">r2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">max_radius</span><span class="p">;</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="n">a1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">start_angle</span><span class="p">;</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="n">a2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">start_angle</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">angle</span><span class="p">;</span> +<a id="line-337" name="line-337"></a> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="p">;</span> +<a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="p">;</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-342" name="line-342"></a> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">baobab_ringschart_get_point_min_rect</span><span class="w"> </span><span class="p">(</span><span class="n">cx</span><span class="p">,</span><span class="w"> </span><span class="n">cy</span><span class="p">,</span><span class="w"> </span><span class="n">r1</span><span class="p">,</span><span class="w"> </span><span class="n">a1</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rect</span><span class="p">);</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">baobab_ringschart_get_point_min_rect</span><span class="w"> </span><span class="p">(</span><span class="n">cx</span><span class="p">,</span><span class="w"> </span><span class="n">cy</span><span class="p">,</span><span class="w"> </span><span class="n">r2</span><span class="p">,</span><span class="w"> </span><span class="n">a1</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rect</span><span class="p">);</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">baobab_ringschart_get_point_min_rect</span><span class="w"> </span><span class="p">(</span><span class="n">cx</span><span class="p">,</span><span class="w"> </span><span class="n">cy</span><span class="p">,</span><span class="w"> </span><span class="n">r1</span><span class="p">,</span><span class="w"> </span><span class="n">a2</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rect</span><span class="p">);</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">baobab_ringschart_get_point_min_rect</span><span class="w"> </span><span class="p">(</span><span class="n">cx</span><span class="p">,</span><span class="w"> </span><span class="n">cy</span><span class="p">,</span><span class="w"> </span><span class="n">r2</span><span class="p">,</span><span class="w"> </span><span class="n">a2</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rect</span><span class="p">);</span> +<a id="line-347" name="line-347"></a> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="n">a1</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">M_PI</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">a2</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">M_PI</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="p">)</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">cy</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">sin</span><span class="w"> </span><span class="p">(</span><span class="n">M_PI</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">r2</span><span class="p">));</span> +<a id="line-350" name="line-350"></a> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="n">a1</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">M_PI</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">a2</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">M_PI</span><span class="p">)</span><span class="w"> </span><span class="p">)</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">cx</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">cos</span><span class="w"> </span><span class="p">(</span><span class="n">M_PI</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">r2</span><span class="p">));</span> +<a id="line-353" name="line-353"></a> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="n">a1</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">M_PI</span><span class="o">*</span><span class="mf">1.5</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">a2</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">M_PI</span><span class="o">*</span><span class="mf">1.5</span><span class="p">)</span><span class="w"> </span><span class="p">)</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MIN</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">cy</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">sin</span><span class="w"> </span><span class="p">(</span><span class="n">M_PI</span><span class="o">*</span><span class="mf">1.5</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">r2</span><span class="p">));</span> +<a id="line-356" name="line-356"></a> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="n">a1</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">M_PI</span><span class="o">*</span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">a2</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">M_PI</span><span class="o">*</span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="p">)</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">cx</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">cos</span><span class="w"> </span><span class="p">(</span><span class="n">M_PI</span><span class="o">*</span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">r2</span><span class="p">));</span> +<a id="line-359" name="line-359"></a> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="p">;</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="p">;</span> +<a id="line-362" name="line-362"></a> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rect</span><span class="p">;</span> +<a id="line-364" name="line-364"></a><span class="p">}</span> +<a id="line-365" name="line-365"></a> +<a id="line-366" name="line-366"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-367" name="line-367"></a><span class="nf">baobab_ringschart_subfolder_tips_timeout</span><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-368" name="line-368"></a><span class="p">{</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="n">BaobabRingschartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-370" name="line-370"></a> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_RINGSCHART</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">));</span> +<a id="line-372" name="line-372"></a> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">drawing_subtips</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-374" name="line-374"></a> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">gtk_widget_queue_draw</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">));</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-378" name="line-378"></a><span class="p">}</span> +<a id="line-379" name="line-379"></a> +<a id="line-380" name="line-380"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-381" name="line-381"></a><span class="nf">baobab_ringschart_clean_subforlder_tips_state</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-382" name="line-382"></a><span class="p">{</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">BaobabRingschartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">node</span><span class="p">;</span> +<a id="line-385" name="line-385"></a> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_RINGSCHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-387" name="line-387"></a> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">drawing_subtips</span><span class="p">)</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">gtk_widget_queue_draw</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-390" name="line-390"></a> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">drawing_subtips</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-392" name="line-392"></a> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-395" name="line-395"></a> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">tips_timeout_event</span><span class="p">)</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="p">{</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">g_source_remove</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">tips_timeout_event</span><span class="p">);</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">tips_timeout_event</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="p">}</span> +<a id="line-401" name="line-401"></a> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-403" name="line-403"></a> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="cm">/* Free subtip_items GList */</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="p">;</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="p">{</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">next</span><span class="p">;</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="p">);</span> +<a id="line-410" name="line-410"></a> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="p">;</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="p">}</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-414" name="line-414"></a><span class="p">}</span> +<a id="line-415" name="line-415"></a> +<a id="line-416" name="line-416"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-417" name="line-417"></a><span class="nf">baobab_ringschart_draw_subfolder_tips</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">)</span> +<a id="line-418" name="line-418"></a><span class="p">{</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">BaobabRingschartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">node</span><span class="p">;</span> +<a id="line-421" name="line-421"></a><span class="hll"><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'item' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'item' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-422" name="line-422"></a><span class="w"> </span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">;</span> +<a id="line-423" name="line-423"></a> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">q_angle</span><span class="p">,</span><span class="w"> </span><span class="n">q_width</span><span class="p">,</span><span class="w"> </span><span class="n">q_height</span><span class="p">;</span> +<a id="line-425" name="line-425"></a> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">tip_x</span><span class="p">,</span><span class="w"> </span><span class="n">tip_y</span><span class="p">;</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">middle_angle</span><span class="p">,</span><span class="w"> </span><span class="n">middle_angle_n</span><span class="p">,</span><span class="w"> </span><span class="n">middle_radius</span><span class="p">;</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">sector_center_x</span><span class="p">,</span><span class="w"> </span><span class="n">sector_center_y</span><span class="p">;</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">a</span><span class="p">;</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-432" name="line-432"></a> +<a id="line-433" name="line-433"></a><span class="hll"><span class="w"> </span><span class="n">PangoLayout</span><span class="w"> </span><span class="o">*</span><span class="n">layout</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'layout' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'layout' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-434" name="line-434"></a><span class="w"> </span><span class="n">PangoRectangle</span><span class="w"> </span><span class="n">layout_rect</span><span class="p">;</span> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">markup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-436" name="line-436"></a> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">cairo_rectangle_t</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">;</span> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="n">_rect</span><span class="p">,</span><span class="w"> </span><span class="n">last_rect</span><span class="p">;</span> +<a id="line-439" name="line-439"></a> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_RINGSCHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-441" name="line-441"></a> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="n">q_width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="n">q_height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="n">q_angle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">atan2</span><span class="w"> </span><span class="p">(</span><span class="n">q_height</span><span class="p">,</span><span class="w"> </span><span class="n">q_width</span><span class="p">);</span> +<a id="line-446" name="line-446"></a> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="n">memset</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">last_rect</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">GdkRectangle</span><span class="p">));</span> +<a id="line-448" name="line-448"></a> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="n">cairo_save</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-450" name="line-450"></a> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="p">;</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">node</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="p">{</span> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabRingschartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-456" name="line-456"></a> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="cm">/* get the middle angle */</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">middle_angle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">start_angle</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">angle</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="cm">/* normalize the middle angle (take it to the first quadrant) */</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="n">middle_angle_n</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">middle_angle</span><span class="p">;</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">middle_angle_n</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">M_PI</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="n">middle_angle_n</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">M_PI</span><span class="p">;</span> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="n">middle_angle_n</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ABS</span><span class="w"> </span><span class="p">(</span><span class="n">middle_angle_n</span><span class="p">);</span> +<a id="line-465" name="line-465"></a> +<a id="line-466" name="line-466"></a><span class="w"> </span><span class="cm">/* get the pango layout and its enclosing rectangle */</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="n">layout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_create_pango_layout</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="n">markup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strconcat</span><span class="w"> </span><span class="p">(</span><span class="s">"<span size=</span><span class="se">\"</span><span class="s">small</span><span class="se">\"</span><span class="s">>"</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="s">"</span>"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-469" name="line-469"></a><span class="w"> </span><span class="n">pango_layout_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">layout</span><span class="p">,</span><span class="w"> </span><span class="n">markup</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">markup</span><span class="p">);</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="n">pango_layout_set_indent</span><span class="w"> </span><span class="p">(</span><span class="n">layout</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="n">pango_layout_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">layout</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="n">pango_layout_get_pixel_extents</span><span class="w"> </span><span class="p">(</span><span class="n">layout</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">layout_rect</span><span class="p">);</span> +<a id="line-474" name="line-474"></a> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="cm">/* get the center point of the tooltip rectangle */</span> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">middle_angle_n</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">q_angle</span><span class="p">)</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="p">{</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">tip_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">q_width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">layout_rect</span><span class="p">.</span><span class="n">width</span><span class="o">/</span><span class="mi">2</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">SUBFOLDER_TIP_PADDING</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">tip_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tan</span><span class="w"> </span><span class="p">(</span><span class="n">middle_angle_n</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">tip_x</span><span class="p">;</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="p">}</span> +<a id="line-481" name="line-481"></a><span class="w"> </span><span class="k">else</span> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="p">{</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="n">tip_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">q_height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">layout_rect</span><span class="p">.</span><span class="n">height</span><span class="o">/</span><span class="mi">2</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">SUBFOLDER_TIP_PADDING</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">tip_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tip_y</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">tan</span><span class="w"> </span><span class="p">(</span><span class="n">middle_angle_n</span><span class="p">);</span> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="p">}</span> +<a id="line-486" name="line-486"></a> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="cm">/* get the tooltip rectangle */</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">q_width</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">tip_x</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">layout_rect</span><span class="p">.</span><span class="n">width</span><span class="o">/</span><span class="mi">2</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">SUBFOLDER_TIP_PADDING</span><span class="p">;</span> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">q_height</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">tip_y</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">layout_rect</span><span class="p">.</span><span class="n">height</span><span class="o">/</span><span class="mi">2</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">SUBFOLDER_TIP_PADDING</span><span class="p">;</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">layout_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">SUBFOLDER_TIP_PADDING</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">layout_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">SUBFOLDER_TIP_PADDING</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-492" name="line-492"></a> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="cm">/* Check tooltip's width is not greater than half of the widget */</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">q_width</span><span class="p">)</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="p">{</span> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">layout</span><span class="p">);</span> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">next</span><span class="p">;</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="p">}</span> +<a id="line-500" name="line-500"></a> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="cm">/* translate tooltip rectangle and edge angles to the original quadrant */</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">middle_angle</span><span class="p">;</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">a</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">M_PI</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="p">{</span> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">x</span> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">width</span><span class="p">;</span> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="k">else</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">y</span> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">height</span><span class="p">;</span> +<a id="line-512" name="line-512"></a> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">-=</span><span class="w"> </span><span class="n">M_PI</span><span class="o">/</span><span class="mi">2</span><span class="p">;</span> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="p">}</span> +<a id="line-516" name="line-516"></a> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="cm">/* get the GdkRectangle of the tooltip (with a little padding) */</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="n">_rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mf">1.0</span><span class="p">);</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="n">_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mf">1.0</span><span class="p">);</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="n">_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mf">2.0</span><span class="p">);</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="n">_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mf">2.0</span><span class="p">);</span> +<a id="line-522" name="line-522"></a> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="cm">/* Check if tooltip overlaps */</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="w"> </span><span class="n">gdk_rectangle_intersect</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">_rect</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">last_rect</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="p">{</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="n">g_memmove</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">last_rect</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">_rect</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">GdkRectangle</span><span class="p">));</span> +<a id="line-527" name="line-527"></a> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="cm">/* Finally draw the tooltip to cairo! */</span> +<a id="line-529" name="line-529"></a> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="cm">/* TODO: Do not hardcode colors */</span> +<a id="line-531" name="line-531"></a> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="cm">/* avoid blurred lines */</span> +<a id="line-533" name="line-533"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">floor</span><span class="w"> </span><span class="p">(</span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">x</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mf">0.5</span><span class="p">;</span> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">floor</span><span class="w"> </span><span class="p">(</span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">y</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mf">0.5</span><span class="p">;</span> +<a id="line-535" name="line-535"></a> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="n">middle_radius</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">min_radius</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">max_radius</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">min_radius</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-537" name="line-537"></a><span class="w"> </span><span class="n">sector_center_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">q_width</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">middle_radius</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">cos</span><span class="w"> </span><span class="p">(</span><span class="n">middle_angle</span><span class="p">);</span> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="n">sector_center_y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">q_height</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">middle_radius</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">sin</span><span class="w"> </span><span class="p">(</span><span class="n">middle_angle</span><span class="p">);</span> +<a id="line-539" name="line-539"></a> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="cm">/* draw line from sector center to tooltip center */</span> +<a id="line-541" name="line-541"></a><span class="w"> </span><span class="n">cairo_set_line_width</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="n">cairo_move_to</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">sector_center_x</span><span class="p">,</span><span class="w"> </span><span class="n">sector_center_y</span><span class="p">);</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mf">0.8275</span><span class="p">,</span><span class="w"> </span><span class="mf">0.8431</span><span class="p">,</span><span class="w"> </span><span class="mf">0.8118</span><span class="p">);</span><span class="w"> </span><span class="cm">/* tango: #d3d7cf */</span> +<a id="line-544" name="line-544"></a><span class="w"> </span><span class="n">cairo_line_to</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span> +<a id="line-545" name="line-545"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="n">cairo_stroke</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-547" name="line-547"></a> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="cm">/* draw a tiny circle in sector center */</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="n">cairo_set_source_rgba</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="mf">0.6666</span><span class="w"> </span><span class="p">);</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="n">cairo_arc</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">sector_center_x</span><span class="p">,</span><span class="w"> </span><span class="n">sector_center_y</span><span class="p">,</span><span class="w"> </span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">G_PI</span><span class="w"> </span><span class="p">);</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="n">cairo_stroke</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-552" name="line-552"></a> +<a id="line-553" name="line-553"></a><span class="w"> </span><span class="cm">/* draw tooltip box */</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="n">cairo_set_line_width</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mf">0.5</span><span class="p">);</span> +<a id="line-555" name="line-555"></a><span class="w"> </span><span class="n">cairo_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">y</span><span class="p">,</span> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">height</span><span class="p">);</span> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mf">0.8275</span><span class="p">,</span><span class="w"> </span><span class="mf">0.8431</span><span class="p">,</span><span class="w"> </span><span class="mf">0.8118</span><span class="p">);</span><span class="w"> </span><span class="cm">/* tango: #d3d7cf */</span> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="n">cairo_fill_preserve</span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mf">0.5333</span><span class="p">,</span><span class="w"> </span><span class="mf">0.5412</span><span class="p">,</span><span class="w"> </span><span class="mf">0.5216</span><span class="p">);</span><span class="w"> </span><span class="cm">/* tango: #888a85 */</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="n">cairo_stroke</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-561" name="line-561"></a> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="cm">/* draw the text inside the box */</span> +<a id="line-563" name="line-563"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="n">cairo_move_to</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">SUBFOLDER_TIP_PADDING</span><span class="p">,</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="n">tooltip_rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">SUBFOLDER_TIP_PADDING</span><span class="p">);</span> +<a id="line-566" name="line-566"></a><span class="w"> </span><span class="n">pango_cairo_show_layout</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">layout</span><span class="p">);</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="n">cairo_set_line_width</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-568" name="line-568"></a><span class="w"> </span><span class="n">cairo_stroke</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-569" name="line-569"></a><span class="w"> </span><span class="p">}</span> +<a id="line-570" name="line-570"></a> +<a id="line-571" name="line-571"></a><span class="w"> </span><span class="cm">/* Free stuff */</span> +<a id="line-572" name="line-572"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">layout</span><span class="p">);</span> +<a id="line-573" name="line-573"></a> +<a id="line-574" name="line-574"></a><span class="w"> </span><span class="n">node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">node</span><span class="o">-></span><span class="n">next</span><span class="p">;</span> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="p">}</span> +<a id="line-576" name="line-576"></a> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="n">cairo_restore</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-578" name="line-578"></a><span class="p">}</span> +<a id="line-579" name="line-579"></a> +<a id="line-580" name="line-580"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-581" name="line-581"></a><span class="nf">baobab_ringschart_pre_draw</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">)</span> +<a id="line-582" name="line-582"></a><span class="p">{</span> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="n">BaobabRingschartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-584" name="line-584"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">hl_item</span><span class="p">;</span> +<a id="line-585" name="line-585"></a> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_RINGSCHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-587" name="line-587"></a> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="n">hl_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_get_highlighted_item</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-589" name="line-589"></a> +<a id="line-590" name="line-590"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="n">hl_item</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="w"> </span><span class="n">hl_item</span><span class="o">-></span><span class="n">has_visible_children</span><span class="p">)</span><span class="w"> </span><span class="p">)</span> +<a id="line-591" name="line-591"></a><span class="w"> </span><span class="p">{</span> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="n">baobab_ringschart_clean_subforlder_tips_state</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-593" name="line-593"></a> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="p">}</span> +<a id="line-596" name="line-596"></a> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">hl_item</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="p">)</span> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="p">{</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="n">baobab_ringschart_clean_subforlder_tips_state</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-600" name="line-600"></a> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">highlighted_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hl_item</span><span class="p">;</span> +<a id="line-602" name="line-602"></a> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="cm">/* Launch timer to show subfolder tooltips */</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">tips_timeout_event</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_timeout_add</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_timeout</span><span class="p">,</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="p">(</span><span class="n">GSourceFunc</span><span class="p">)</span><span class="w"> </span><span class="n">baobab_ringschart_subfolder_tips_timeout</span><span class="p">,</span> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="p">(</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="p">}</span> +<a id="line-608" name="line-608"></a><span class="p">}</span> +<a id="line-609" name="line-609"></a> +<a id="line-610" name="line-610"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-611" name="line-611"></a><span class="nf">baobab_ringschart_post_draw</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">)</span> +<a id="line-612" name="line-612"></a><span class="p">{</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="n">BaobabRingschartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-614" name="line-614"></a> +<a id="line-615" name="line-615"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_RINGSCHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-616" name="line-616"></a> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">subfoldertips_enabled</span><span class="p">)</span> +<a id="line-618" name="line-618"></a><span class="w"> </span><span class="p">{</span> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="cm">/* Reverse the glist, which was created from the tail */</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_reverse</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">subtip_items</span><span class="p">);</span> +<a id="line-621" name="line-621"></a> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="n">baobab_ringschart_draw_subfolder_tips</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">cr</span><span class="p">);</span> +<a id="line-623" name="line-623"></a><span class="w"> </span><span class="p">}</span> +<a id="line-624" name="line-624"></a><span class="p">}</span> +<a id="line-625" name="line-625"></a> +<a id="line-626" name="line-626"></a><span class="cm">/* Public functions start here */</span> +<a id="line-627" name="line-627"></a> +<a id="line-628" name="line-628"></a><span class="cm">/**</span> +<a id="line-629" name="line-629"></a><span class="cm"> * baobab_ringschart_new:</span> +<a id="line-630" name="line-630"></a><span class="cm"> *</span> +<a id="line-631" name="line-631"></a><span class="cm"> * Constructor for the baobab_ringschart class</span> +<a id="line-632" name="line-632"></a><span class="cm"> *</span> +<a id="line-633" name="line-633"></a><span class="cm"> * Returns: a new #BaobabRingschart object</span> +<a id="line-634" name="line-634"></a><span class="cm"> *</span> +<a id="line-635" name="line-635"></a><span class="cm"> **/</span> +<a id="line-636" name="line-636"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-637" name="line-637"></a><span class="nf">baobab_ringschart_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-638" name="line-638"></a><span class="p">{</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_RINGSCHART_TYPE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-640" name="line-640"></a><span class="p">}</span> +<a id="line-641" name="line-641"></a> +<a id="line-642" name="line-642"></a><span class="cm">/**</span> +<a id="line-643" name="line-643"></a><span class="cm"> * baobab_ringschart_set_subfoldertips_enabled:</span> +<a id="line-644" name="line-644"></a><span class="cm"> * @chart: the #BaobabRingschart to set the</span> +<a id="line-645" name="line-645"></a><span class="cm"> * @enabled: boolean to determine whether to show sub-folder tips.</span> +<a id="line-646" name="line-646"></a><span class="cm"> *</span> +<a id="line-647" name="line-647"></a><span class="cm"> * Enables/disables drawing tooltips of sub-forlders of the highlighted sector.</span> +<a id="line-648" name="line-648"></a><span class="cm"> *</span> +<a id="line-649" name="line-649"></a><span class="cm"> * Fails if @chart is not a #BaobabRingschart.</span> +<a id="line-650" name="line-650"></a><span class="cm"> *</span> +<a id="line-651" name="line-651"></a><span class="cm"> **/</span> +<a id="line-652" name="line-652"></a><span class="kt">void</span> +<a id="line-653" name="line-653"></a><span class="nf">baobab_ringschart_set_subfoldertips_enabled</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">enabled</span><span class="p">)</span> +<a id="line-654" name="line-654"></a><span class="p">{</span> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="n">BaobabRingschartPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-656" name="line-656"></a> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_ringschart_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_RINGSCHART</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">));</span> +<a id="line-658" name="line-658"></a> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">subfoldertips_enabled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">enabled</span><span class="p">;</span> +<a id="line-660" name="line-660"></a> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="w"> </span><span class="n">enabled</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">drawing_subtips</span><span class="p">)</span><span class="w"> </span><span class="p">)</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="p">{</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="cm">/* Turn off currently drawn tips */</span> +<a id="line-664" name="line-664"></a><span class="w"> </span><span class="n">baobab_ringschart_clean_subforlder_tips_state</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="p">}</span> +<a id="line-666" name="line-666"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/5.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/5.html new file mode 100644 index 00000000..c04202b5 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/5.html @@ -0,0 +1,1021 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: baobab/src/baobab-scan.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> baobab-scan.c</p> +<a href="5.html#line-342"> variableScope 342</a><a href="5.html#line-346"> variableScope 346</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-22" name="line-22"></a><span class="cp">#endif</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-25" name="line-25"></a> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-29" name="line-29"></a> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab.h"</span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-utils.h"</span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-scan.h"</span> +<a id="line-33" name="line-33"></a> +<a id="line-34" name="line-34"></a><span class="cm">/*</span> +<a id="line-35" name="line-35"></a><span class="cm"> Hardlinks handling.</span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="cm"> As long as we're optimistic about hardlinks count</span> +<a id="line-38" name="line-38"></a><span class="cm"> over the whole system (250 files with st_nlink > 1 here),</span> +<a id="line-39" name="line-39"></a><span class="cm"> we keep linear search. If it turns out to be an bottleneck</span> +<a id="line-40" name="line-40"></a><span class="cm"> we can switch to an hash table or tree.</span> +<a id="line-41" name="line-41"></a> +<a id="line-42" name="line-42"></a><span class="cm"> TODO: get real timings about this code. find out the average</span> +<a id="line-43" name="line-43"></a><span class="cm"> number of files with st_nlink > 1 on average computer.</span> +<a id="line-44" name="line-44"></a> +<a id="line-45" name="line-45"></a><span class="cm"> To save memory, we store only { inode, dev } instead of full</span> +<a id="line-46" name="line-46"></a><span class="cm"> GFileInfo.</span> +<a id="line-47" name="line-47"></a> +<a id="line-48" name="line-48"></a><span class="cm"> EDIT: /me stupid. I realize that this code was not called that often</span> +<a id="line-49" name="line-49"></a><span class="cm"> 1 call per file with st_nlink > 1. BUT, i'm using pdumpfs to backup</span> +<a id="line-50" name="line-50"></a><span class="cm"> my /etc. pdumpfs massively uses hard links. So there are more than</span> +<a id="line-51" name="line-51"></a><span class="cm"> 5000 files with st_nlink > 1. I believe this is the worst case.</span> +<a id="line-52" name="line-52"></a><span class="cm">*/</span> +<a id="line-53" name="line-53"></a> +<a id="line-54" name="line-54"></a><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="p">{</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">guint64</span><span class="w"> </span><span class="n">inode</span><span class="p">;</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="kt">dev_t</span><span class="w"> </span><span class="n">device</span><span class="p">;</span> +<a id="line-57" name="line-57"></a><span class="p">}</span><span class="w"> </span><span class="n">BaobabHardLink</span><span class="p">;</span> +<a id="line-58" name="line-58"></a> +<a id="line-59" name="line-59"></a><span class="k">typedef</span><span class="w"> </span><span class="n">GArray</span><span class="w"> </span><span class="n">BaobabHardLinkArray</span><span class="p">;</span> +<a id="line-60" name="line-60"></a> +<a id="line-61" name="line-61"></a><span class="k">static</span><span class="w"> </span><span class="n">BaobabHardLinkArray</span><span class="w"> </span><span class="o">*</span> +<a id="line-62" name="line-62"></a><span class="nf">baobab_hardlinks_array_create</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-63" name="line-63"></a><span class="p">{</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_array_new</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="n">BaobabHardLink</span><span class="p">));</span> +<a id="line-65" name="line-65"></a><span class="p">}</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-68" name="line-68"></a><span class="nf">baobab_hardlinks_array_has</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabHardLinkArray</span><span class="w"> </span><span class="o">*</span><span class="n">a</span><span class="p">,</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">BaobabHardLink</span><span class="w"> </span><span class="o">*</span><span class="n">s</span><span class="p">)</span> +<a id="line-70" name="line-70"></a><span class="p">{</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">a</span><span class="o">-></span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="n">BaobabHardLink</span><span class="w"> </span><span class="o">*</span><span class="n">cur</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&</span><span class="n">g_array_index</span><span class="w"> </span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">BaobabHardLink</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span> +<a id="line-75" name="line-75"></a> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="cm">/*</span> +<a id="line-77" name="line-77"></a><span class="cm"> * cur->st_dev == s->st_dev is the common case and may be more</span> +<a id="line-78" name="line-78"></a><span class="cm"> * expansive than cur->st_ino == s->st_ino</span> +<a id="line-79" name="line-79"></a><span class="cm"> * so keep this order */</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">cur</span><span class="o">-></span><span class="n">inode</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">s</span><span class="o">-></span><span class="n">inode</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">cur</span><span class="o">-></span><span class="n">device</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">s</span><span class="o">-></span><span class="n">device</span><span class="p">)</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="p">}</span> +<a id="line-83" name="line-83"></a> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-85" name="line-85"></a><span class="p">}</span> +<a id="line-86" name="line-86"></a> +<a id="line-87" name="line-87"></a><span class="cm">/* return FALSE if the element was already in the array */</span> +<a id="line-88" name="line-88"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-89" name="line-89"></a><span class="nf">baobab_hardlinks_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabHardLinkArray</span><span class="w"> </span><span class="o">*</span><span class="n">a</span><span class="p">,</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">s</span><span class="p">)</span> +<a id="line-91" name="line-91"></a><span class="p">{</span> +<a id="line-92" name="line-92"></a> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_has_attribute</span><span class="w"> </span><span class="p">(</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_INODE</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">g_file_info_has_attribute</span><span class="w"> </span><span class="p">(</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_DEVICE</span><span class="p">))</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="p">{</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">BaobabHardLink</span><span class="w"> </span><span class="n">hl</span><span class="p">;</span> +<a id="line-97" name="line-97"></a> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">hl</span><span class="p">.</span><span class="n">inode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_attribute_uint64</span><span class="w"> </span><span class="p">(</span><span class="n">s</span><span class="p">,</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_INODE</span><span class="p">);</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">hl</span><span class="p">.</span><span class="n">device</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_attribute_uint32</span><span class="w"> </span><span class="p">(</span><span class="n">s</span><span class="p">,</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_DEVICE</span><span class="p">);</span> +<a id="line-102" name="line-102"></a> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_hardlinks_array_has</span><span class="w"> </span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">hl</span><span class="p">))</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-105" name="line-105"></a> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">g_array_append_val</span><span class="w"> </span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">hl</span><span class="p">);</span> +<a id="line-107" name="line-107"></a> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="p">}</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="k">else</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="p">{</span> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"Could not obtain inode and device for hardlink"</span><span class="p">);</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="p">}</span> +<a id="line-114" name="line-114"></a> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-116" name="line-116"></a><span class="p">}</span> +<a id="line-117" name="line-117"></a> +<a id="line-118" name="line-118"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-119" name="line-119"></a><span class="nf">baobab_hardlinks_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabHardLinkArray</span><span class="w"> </span><span class="o">*</span><span class="n">a</span><span class="p">)</span> +<a id="line-120" name="line-120"></a><span class="p">{</span> +<a id="line-121" name="line-121"></a><span class="cm">/* g_print ("HL len was %d\n", a->len); */</span> +<a id="line-122" name="line-122"></a> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">g_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-124" name="line-124"></a><span class="p">}</span> +<a id="line-125" name="line-125"></a> +<a id="line-126" name="line-126"></a><span class="cp">#define BLOCK_SIZE 512UL</span> +<a id="line-127" name="line-127"></a> +<a id="line-128" name="line-128"></a><span class="k">struct</span><span class="w"> </span><span class="nc">allsizes</span><span class="w"> </span><span class="p">{</span> +<a id="line-129" name="line-129"></a><span class="w"> </span><span class="n">guint64</span><span class="w"> </span><span class="n">size</span><span class="p">;</span> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">guint64</span><span class="w"> </span><span class="n">alloc_size</span><span class="p">;</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">depth</span><span class="p">;</span> +<a id="line-132" name="line-132"></a><span class="p">};</span> +<a id="line-133" name="line-133"></a> +<a id="line-134" name="line-134"></a><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">dir_attributes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>\ +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_NAME</span><span class="w"> </span><span class="s">","</span><span class="w"> </span>\ +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</span><span class="w"> </span><span class="s">","</span><span class="w"> </span>\ +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_TYPE</span><span class="w"> </span><span class="s">","</span><span class="w"> </span>\ +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_SIZE</span><span class="w"> </span><span class="s">","</span><span class="w"> </span>\ +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_BLOCKS</span><span class="w"> </span><span class="s">","</span><span class="w"> </span>\ +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_NLINK</span><span class="w"> </span><span class="s">","</span><span class="w"> </span>\ +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_INODE</span><span class="w"> </span><span class="s">","</span><span class="w"> </span>\ +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_DEVICE</span><span class="w"> </span><span class="s">","</span><span class="w"> </span>\ +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_ACCESS_CAN_READ</span><span class="p">;</span> +<a id="line-144" name="line-144"></a> +<a id="line-145" name="line-145"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-146" name="line-146"></a><span class="nf">is_in_dot_gvfs</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-147" name="line-147"></a><span class="p">{</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">dot_gvfs_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">;</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-151" name="line-151"></a> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dot_gvfs_dir</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="p">{</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">dot_gvfs</span><span class="p">;</span> +<a id="line-155" name="line-155"></a> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="n">dot_gvfs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_build_filename</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_home_dir</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="s">".gvfs"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-157" name="line-157"></a> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">dot_gvfs_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">dot_gvfs</span><span class="p">);</span> +<a id="line-159" name="line-159"></a> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dot_gvfs</span><span class="p">);</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="p">}</span> +<a id="line-162" name="line-162"></a> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_parent</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-164" name="line-164"></a> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="p">{</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_equal</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="n">dot_gvfs_dir</span><span class="p">);</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">);</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="p">}</span> +<a id="line-170" name="line-170"></a> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">res</span><span class="p">;</span> +<a id="line-172" name="line-172"></a><span class="p">}</span> +<a id="line-173" name="line-173"></a> +<a id="line-174" name="line-174"></a><span class="k">static</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">allsizes</span> +<a id="line-175" name="line-175"></a><span class="n">loopdir</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">,</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">info</span><span class="p">,</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">count</span><span class="p">,</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">BaobabHardLinkArray</span><span class="w"> </span><span class="o">*</span><span class="n">hla</span><span class="p">,</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">current_depth</span><span class="p">)</span> +<a id="line-180" name="line-180"></a><span class="p">{</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">guint64</span><span class="w"> </span><span class="n">tempHLsize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">elements</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">chan_data</span><span class="w"> </span><span class="n">data</span><span class="p">;</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">allsizes</span><span class="w"> </span><span class="n">retloop</span><span class="p">,</span><span class="w"> </span><span class="n">temp</span><span class="p">;</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">temp_info</span><span class="p">;</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">GFileEnumerator</span><span class="w"> </span><span class="o">*</span><span class="n">file_enum</span><span class="p">;</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">dir_uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">display_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">parse_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">count</span><span class="o">++</span><span class="p">;</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">alloc_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="cm">/* Skip the user excluded folders */</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_is_excluded_location</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">))</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">exit</span><span class="p">;</span> +<a id="line-200" name="line-200"></a> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="cm">/* Skip the virtual file systems */</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">is_virtual_filesystem</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">))</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">exit</span><span class="p">;</span> +<a id="line-204" name="line-204"></a> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="cm">/* FIXME: skip dirs in ~/.gvfs. It would be better to have a way</span> +<a id="line-206" name="line-206"></a><span class="cm"> * to check if a file is a FUSE mountpoint instead of just</span> +<a id="line-207" name="line-207"></a><span class="cm"> * hardcoding .gvfs */</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">is_in_dot_gvfs</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">))</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">exit</span><span class="p">;</span> +<a id="line-210" name="line-210"></a> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="n">parse_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_parse_name</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_has_attribute</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_SIZE</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">goffset</span><span class="w"> </span><span class="n">file_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_size</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">guint64</span><span class="p">)</span><span class="w"> </span><span class="n">file_size</span><span class="p">;</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="p">}</span> +<a id="line-217" name="line-217"></a> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_has_attribute</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_BLOCKS</span><span class="p">))</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">alloc_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BLOCK_SIZE</span><span class="w"> </span><span class="o">*</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">g_file_info_get_attribute_uint64</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_BLOCKS</span><span class="p">);</span> +<a id="line-222" name="line-222"></a> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_has_attribute</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</span><span class="p">))</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">display_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_get_display_name</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">));</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="k">else</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="cm">/* paranoid fallback */</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">display_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_filename_display_basename</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">));</span> +<a id="line-228" name="line-228"></a> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="cm">/* load up the file enumerator */</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">file_enum</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_enumerate_children</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">dir_attributes</span><span class="p">,</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</span><span class="p">,</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-235" name="line-235"></a> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file_enum</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_error_matches</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_ERROR</span><span class="p">,</span><span class="w"> </span><span class="n">G_IO_ERROR_PERMISSION_DENIED</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"couldn't get dir enum for dir %s: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">parse_name</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="p">}</span> +<a id="line-241" name="line-241"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">exit</span><span class="p">;</span> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="p">}</span> +<a id="line-243" name="line-243"></a> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="cm">/* All skipped folders (i.e. bad type, excluded, /proc) must be</span> +<a id="line-245" name="line-245"></a><span class="cm"> skept *before* this point. Everything passes the prefill-model</span> +<a id="line-246" name="line-246"></a><span class="cm"> will be part of the GUI. */</span> +<a id="line-247" name="line-247"></a> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="cm">/* prefill the model */</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1UL</span><span class="p">;</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">alloc_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1UL</span><span class="p">;</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">elements</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">display_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">display_name</span><span class="p">;</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">parse_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">parse_name</span><span class="p">;</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">tempHLsize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tempHLsize</span><span class="p">;</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">baobab_fill_model</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">data</span><span class="p">);</span> +<a id="line-257" name="line-257"></a> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">g_clear_error</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="n">temp_info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_enumerator_next_file</span><span class="w"> </span><span class="p">(</span><span class="n">file_enum</span><span class="p">,</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">))</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">GFileType</span><span class="w"> </span><span class="n">temp_type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_file_type</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">);</span> +<a id="line-263" name="line-263"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">STOP_SCANNING</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">);</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file_enum</span><span class="p">);</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">exit</span><span class="p">;</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="p">}</span> +<a id="line-268" name="line-268"></a> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="cm">/* is a directory? */</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">temp_type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_FILE_TYPE_DIRECTORY</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-271" name="line-271"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">child_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_child</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">g_file_info_get_name</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">));</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="n">temp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">loopdir</span><span class="w"> </span><span class="p">(</span><span class="n">child_dir</span><span class="p">,</span><span class="w"> </span><span class="n">temp_info</span><span class="p">,</span><span class="w"> </span><span class="n">count</span><span class="p">,</span><span class="w"> </span><span class="n">hla</span><span class="p">,</span><span class="w"> </span><span class="n">current_depth</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">size</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">temp</span><span class="p">.</span><span class="n">size</span><span class="p">;</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">alloc_size</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">temp</span><span class="p">.</span><span class="n">alloc_size</span><span class="p">;</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">((</span><span class="n">temp</span><span class="p">.</span><span class="n">depth</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">depth</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">temp</span><span class="p">.</span><span class="n">depth</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">depth</span><span class="p">;</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">elements</span><span class="o">++</span><span class="p">;</span> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">child_dir</span><span class="p">);</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="p">}</span> +<a id="line-280" name="line-280"></a> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="cm">/* is it a regular file? */</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">temp_type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_FILE_TYPE_REGULAR</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-283" name="line-283"></a> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="cm">/* check for hard links only on local files */</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_has_attribute</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">,</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_NLINK</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="n">g_file_info_get_attribute_uint32</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">,</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_NLINK</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-289" name="line-289"></a> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">baobab_hardlinks_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">hla</span><span class="p">,</span><span class="w"> </span><span class="n">temp_info</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="cm">/* we already acconted for it */</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">goffset</span><span class="w"> </span><span class="n">file_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_size</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">);</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">tempHLsize</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="p">(</span><span class="n">guint64</span><span class="p">)</span><span class="w"> </span><span class="n">file_size</span><span class="p">;</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">);</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="k">continue</span><span class="p">;</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="p">}</span> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="p">}</span> +<a id="line-298" name="line-298"></a> +<a id="line-299" name="line-299"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_has_attribute</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_BLOCKS</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">alloc_size</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">BLOCK_SIZE</span><span class="w"> </span><span class="o">*</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">g_file_info_get_attribute_uint64</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">,</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_UNIX_BLOCKS</span><span class="p">);</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="p">}</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">size</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">g_file_info_get_size</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">);</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">elements</span><span class="o">++</span><span class="p">;</span> +<a id="line-306" name="line-306"></a><span class="w"> </span><span class="p">}</span> +<a id="line-307" name="line-307"></a> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="cm">/* ignore other types (symlinks, sockets, devices, etc) */</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">temp_info</span><span class="p">);</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="p">}</span> +<a id="line-312" name="line-312"></a> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="cm">/* won't be an error if we've finished normally */</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"error in dir %s: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="n">parse_name</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="p">}</span> +<a id="line-318" name="line-318"></a> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">display_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">display_name</span><span class="p">;</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">parse_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">parse_name</span><span class="p">;</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">size</span><span class="p">;</span> +<a id="line-322" name="line-322"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">alloc_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">retloop</span><span class="p">.</span><span class="n">alloc_size</span><span class="p">;</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">elements</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">elements</span><span class="p">;</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">data</span><span class="p">.</span><span class="n">tempHLsize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tempHLsize</span><span class="p">;</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">baobab_fill_model</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">data</span><span class="p">);</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file_enum</span><span class="p">);</span> +<a id="line-328" name="line-328"></a> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="nl">exit</span><span class="p">:</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">dir_uri</span><span class="p">);</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">display_name</span><span class="p">);</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">parse_name</span><span class="p">);</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">)</span> +<a id="line-334" name="line-334"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">);</span> +<a id="line-335" name="line-335"></a> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">retloop</span><span class="p">;</span> +<a id="line-337" name="line-337"></a><span class="p">}</span> +<a id="line-338" name="line-338"></a> +<a id="line-339" name="line-339"></a><span class="kt">void</span> +<a id="line-340" name="line-340"></a><span class="n">baobab_scan_execute</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">location</span><span class="p">)</span> +<a id="line-341" name="line-341"></a><span class="p">{</span> +<a id="line-342" name="line-342"></a><span class="hll"><span class="w"> </span><span class="n">BaobabHardLinkArray</span><span class="w"> </span><span class="o">*</span><span class="n">hla</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'hla' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'hla' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">info</span><span class="p">;</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">GFileType</span><span class="w"> </span><span class="n">ftype</span><span class="p">;</span> +<a id="line-346" name="line-346"></a><span class="hll"><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">allsizes</span><span class="w"> </span><span class="n">sizes</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'sizes' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'sizes' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-347" name="line-347"></a> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">location</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-349" name="line-349"></a> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="cm">/* NOTE: for the root of the scan we follow symlinks */</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_info</span><span class="w"> </span><span class="p">(</span><span class="n">location</span><span class="p">,</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">dir_attributes</span><span class="p">,</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="n">G_FILE_QUERY_INFO_NONE</span><span class="p">,</span> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="o">&</span><span class="n">err</span><span class="p">);</span> +<a id="line-356" name="line-356"></a> +<a id="line-357" name="line-357"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">parse_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_parse_name</span><span class="w"> </span><span class="p">(</span><span class="n">location</span><span class="p">);</span> +<a id="line-359" name="line-359"></a><span class="w"> </span><span class="n">g_warning</span><span class="w"> </span><span class="p">(</span><span class="s">"couldn't get info for dir %s: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="n">parse_name</span><span class="p">,</span><span class="w"> </span><span class="n">err</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">parse_name</span><span class="p">);</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">err</span><span class="p">);</span> +<a id="line-363" name="line-363"></a> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="p">}</span> +<a id="line-366" name="line-366"></a> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">ftype</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_file_type</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-368" name="line-368"></a> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ftype</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">G_FILE_TYPE_DIRECTORY</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">hla</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_hardlinks_array_create</span><span class="w"> </span><span class="p">();</span> +<a id="line-371" name="line-371"></a> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="n">sizes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">loopdir</span><span class="w"> </span><span class="p">(</span><span class="n">location</span><span class="p">,</span><span class="w"> </span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">hla</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">model_max_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sizes</span><span class="p">.</span><span class="n">depth</span><span class="p">;</span> +<a id="line-374" name="line-374"></a> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">baobab_hardlinks_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">hla</span><span class="p">);</span> +<a id="line-376" name="line-376"></a><span class="w"> </span><span class="p">}</span> +<a id="line-377" name="line-377"></a> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-379" name="line-379"></a><span class="p">}</span> +<a id="line-380" name="line-380"></a> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/6.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/6.html new file mode 100644 index 00000000..13e8ec8a --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/6.html @@ -0,0 +1,917 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: baobab/src/baobab-treemap.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> baobab-treemap.c</p> +<a href="6.html#line-111"> variableScope 111</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2008 Igalia</span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> *</span> +<a id="line-19" name="line-19"></a><span class="cm"> * Authors:</span> +<a id="line-20" name="line-20"></a><span class="cm"> * Fabio Marzocca <[email protected]></span> +<a id="line-21" name="line-21"></a><span class="cm"> * Paolo Borelli <[email protected]></span> +<a id="line-22" name="line-22"></a><span class="cm"> * Miguel Gomez <[email protected]></span> +<a id="line-23" name="line-23"></a><span class="cm"> * Eduardo Lima Mitev <[email protected]></span> +<a id="line-24" name="line-24"></a><span class="cm"> */</span> +<a id="line-25" name="line-25"></a> +<a id="line-26" name="line-26"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#endif</span> +<a id="line-29" name="line-29"></a> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><math.h></span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-33" name="line-33"></a> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-chart.h"</span> +<a id="line-35" name="line-35"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-treemap.h"</span> +<a id="line-36" name="line-36"></a> +<a id="line-37" name="line-37"></a><span class="cp">#define ITEM_TEXT_PADDING 3</span> +<a id="line-38" name="line-38"></a><span class="cp">#define ITEM_BORDER_WIDTH 1</span> +<a id="line-39" name="line-39"></a><span class="cp">#define ITEM_PADDING 6</span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="cp">#define ITEM_MIN_WIDTH 3</span> +<a id="line-42" name="line-42"></a><span class="cp">#define ITEM_MIN_HEIGHT 3</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="cp">#define ITEM_SHOW_LABEL TRUE</span> +<a id="line-45" name="line-45"></a> +<a id="line-46" name="line-46"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_BaobabTreemapPrivate</span> +<a id="line-47" name="line-47"></a><span class="p">{</span> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">max_visible_depth</span><span class="p">;</span> +<a id="line-49" name="line-49"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">more_visible_childs</span><span class="p">;</span> +<a id="line-50" name="line-50"></a><span class="p">};</span> +<a id="line-51" name="line-51"></a> +<a id="line-52" name="line-52"></a><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabTreemap</span><span class="p">,</span><span class="w"> </span><span class="n">baobab_treemap</span><span class="p">,</span><span class="w"> </span><span class="n">BAOBAB_CHART_TYPE</span><span class="p">);</span> +<a id="line-53" name="line-53"></a> +<a id="line-54" name="line-54"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_treemap_draw_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">height</span><span class="p">,</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">fill_color</span><span class="p">,</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">,</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">show_text</span><span class="p">);</span> +<a id="line-60" name="line-60"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_treemap_draw_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">highlighted</span><span class="p">);</span> +<a id="line-64" name="line-64"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_treemap_calculate_item_geometry</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">);</span> +<a id="line-66" name="line-66"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="nf">baobab_treemap_is_point_over_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">x</span><span class="p">,</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">y</span><span class="p">);</span> +<a id="line-70" name="line-70"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">baobab_treemap_get_item_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">);</span> +<a id="line-72" name="line-72"></a><span class="n">guint</span><span class="w"> </span><span class="nf">baobab_treemap_can_zoom_in</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">);</span> +<a id="line-73" name="line-73"></a><span class="n">guint</span><span class="w"> </span><span class="nf">baobab_treemap_can_zoom_out</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">);</span> +<a id="line-74" name="line-74"></a> +<a id="line-75" name="line-75"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-76" name="line-76"></a><span class="nf">baobab_treemap_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabTreemapClass</span><span class="w"> </span><span class="o">*</span><span class="n">class</span><span class="p">)</span> +<a id="line-77" name="line-77"></a><span class="p">{</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="n">BaobabChartClass</span><span class="w"> </span><span class="o">*</span><span class="n">chart_class</span><span class="p">;</span> +<a id="line-79" name="line-79"></a> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">chart_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_CHART_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">class</span><span class="p">);</span> +<a id="line-81" name="line-81"></a> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="cm">/* BaobabChart abstract methods */</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">draw_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_treemap_draw_item</span><span class="p">;</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">calculate_item_geometry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_treemap_calculate_item_geometry</span><span class="p">;</span> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">is_point_over_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_treemap_is_point_over_item</span><span class="p">;</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">get_item_rectangle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_treemap_get_item_rectangle</span><span class="p">;</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">can_zoom_in</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_treemap_can_zoom_in</span><span class="p">;</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">chart_class</span><span class="o">-></span><span class="n">can_zoom_out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_treemap_can_zoom_out</span><span class="p">;</span> +<a id="line-89" name="line-89"></a><span class="p">}</span> +<a id="line-90" name="line-90"></a> +<a id="line-91" name="line-91"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-92" name="line-92"></a><span class="nf">baobab_treemap_init</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabTreemap</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-93" name="line-93"></a><span class="p">{</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">BaobabTreemapPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-95" name="line-95"></a> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_treemap_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-97" name="line-97"></a> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">chart</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="p">;</span> +<a id="line-99" name="line-99"></a><span class="p">}</span> +<a id="line-100" name="line-100"></a> +<a id="line-101" name="line-101"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-102" name="line-102"></a><span class="nf">baobab_treemap_draw_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">height</span><span class="p">,</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">fill_color</span><span class="p">,</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">,</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">show_text</span><span class="p">)</span> +<a id="line-108" name="line-108"></a><span class="p">{</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">border</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ITEM_BORDER_WIDTH</span><span class="p">;</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">PangoRectangle</span><span class="w"> </span><span class="n">rect</span><span class="p">;</span> +<a id="line-111" name="line-111"></a><span class="hll"><span class="w"> </span><span class="n">PangoLayout</span><span class="w"> </span><span class="o">*</span><span class="n">layout</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'layout' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'layout' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-112" name="line-112"></a> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">cairo_stroke</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-114" name="line-114"></a> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="n">cairo_set_line_width</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">border</span><span class="p">);</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="n">cairo_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">border</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">border</span><span class="p">,</span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">border</span><span class="o">*</span><span class="mi">2</span><span class="p">,</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">border</span><span class="o">*</span><span class="mi">2</span><span class="p">);</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">fill_color</span><span class="p">.</span><span class="n">red</span><span class="p">,</span><span class="w"> </span><span class="n">fill_color</span><span class="p">.</span><span class="n">green</span><span class="p">,</span><span class="w"> </span><span class="n">fill_color</span><span class="p">.</span><span class="n">blue</span><span class="p">);</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">cairo_fill_preserve</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">cairo_set_source_rgb</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">cairo_stroke</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">);</span> +<a id="line-123" name="line-123"></a> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">show_text</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">ITEM_SHOW_LABEL</span><span class="p">))</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="p">{</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">layout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_create_pango_layout</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">pango_layout_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">layout</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">pango_layout_get_pixel_extents</span><span class="w"> </span><span class="p">(</span><span class="n">layout</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">rect</span><span class="p">);</span> +<a id="line-129" name="line-129"></a> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ITEM_TEXT_PADDING</span><span class="o">*</span><span class="mi">2</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">width</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ITEM_TEXT_PADDING</span><span class="o">*</span><span class="mi">2</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">height</span><span class="p">))</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="p">{</span> +<a id="line-133" name="line-133"></a><span class="w"> </span><span class="n">cairo_move_to</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">width</span><span class="o">/</span><span class="mi">2</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="o">/</span><span class="mi">2</span><span class="p">,</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">height</span><span class="o">/</span><span class="mi">2</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="o">/</span><span class="mi">2</span><span class="p">);</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">pango_cairo_show_layout</span><span class="w"> </span><span class="p">(</span><span class="n">cr</span><span class="p">,</span><span class="w"> </span><span class="n">layout</span><span class="p">);</span> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="p">}</span> +<a id="line-137" name="line-137"></a> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">layout</span><span class="p">);</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="p">}</span> +<a id="line-140" name="line-140"></a><span class="p">}</span> +<a id="line-141" name="line-141"></a> +<a id="line-142" name="line-142"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-143" name="line-143"></a><span class="nf">baobab_treemap_draw_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">cairo_t</span><span class="w"> </span><span class="o">*</span><span class="n">cr</span><span class="p">,</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">highlighted</span><span class="p">)</span> +<a id="line-147" name="line-147"></a><span class="p">{</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">cairo_rectangle_t</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">rect</span><span class="p">;</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">BaobabChartColor</span><span class="w"> </span><span class="n">fill_color</span><span class="p">;</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-152" name="line-152"></a> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">rect</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">cairo_rectangle_t</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-154" name="line-154"></a> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="p">{</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">baobab_chart_get_item_color</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">fill_color</span><span class="p">,</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="o">/</span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="o">*</span><span class="mi">200</span><span class="p">,</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="p">,</span><span class="w"> </span><span class="n">highlighted</span><span class="p">);</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="p">;</span> +<a id="line-163" name="line-163"></a><span class="w"> </span><span class="p">}</span> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="k">else</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="p">{</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="n">baobab_chart_get_item_color</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">fill_color</span><span class="p">,</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="o">/</span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="o">*</span><span class="mi">200</span><span class="p">,</span> +<a id="line-167" name="line-167"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="p">,</span><span class="w"> </span><span class="n">highlighted</span><span class="p">);</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="p">;</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="p">}</span> +<a id="line-171" name="line-171"></a> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="n">baobab_treemap_draw_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="n">cr</span><span class="p">,</span> +<a id="line-174" name="line-174"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="p">,</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="p">,</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">width</span><span class="p">,</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">height</span><span class="p">,</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">fill_color</span><span class="p">,</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">name</span><span class="p">,</span> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">has_visible_children</span><span class="p">)</span><span class="w"> </span><span class="p">);</span> +<a id="line-181" name="line-181"></a><span class="p">}</span> +<a id="line-182" name="line-182"></a> +<a id="line-183" name="line-183"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-184" name="line-184"></a><span class="nf">baobab_treemap_calculate_item_geometry</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">)</span> +<a id="line-186" name="line-186"></a><span class="p">{</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">BaobabTreemapPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">cairo_rectangle_t</span><span class="w"> </span><span class="n">p_area</span><span class="p">;</span> +<a id="line-189" name="line-189"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">cairo_rectangle_t</span><span class="w"> </span><span class="o">*</span><span class="n">rect</span><span class="p">;</span> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">width</span><span class="p">,</span><span class="w"> </span><span class="n">height</span><span class="p">;</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">GtkAllocation</span><span class="w"> </span><span class="n">allocation</span><span class="p">;</span> +<a id="line-193" name="line-193"></a> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_TREEMAP</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-195" name="line-195"></a> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="p">{</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">max_visible_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">more_visible_childs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="p">}</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">parent</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-205" name="line-205"></a><span class="w"> </span><span class="p">{</span> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">gtk_widget_get_allocation</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">allocation</span><span class="p">);</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="o">/</span><span class="mi">2</span><span class="p">;</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="o">/</span><span class="mi">2</span><span class="p">;</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocation</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="p">}</span> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="k">else</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="p">{</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">parent</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">g_memmove</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">p_area</span><span class="p">,</span><span class="w"> </span><span class="n">parent</span><span class="o">-></span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="p">(</span><span class="n">cairo_rectangle_t</span><span class="p">));</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="p">}</span> +<a id="line-217" name="line-217"></a> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new</span><span class="w"> </span><span class="p">(</span><span class="n">cairo_rectangle_t</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-220" name="line-220"></a> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">rect</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">cairo_rectangle_t</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-222" name="line-222"></a> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="p">{</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-226" name="line-226"></a> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">rel_start</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">width</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rel_size</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">100</span><span class="p">;</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="p">}</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="k">else</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="p">{</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-235" name="line-235"></a> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">rel_start</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p_area</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">height</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rel_size</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">100</span><span class="p">;</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="p">}</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">ITEM_MIN_WIDTH</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">ITEM_MIN_HEIGHT</span><span class="p">))</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-245" name="line-245"></a> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">floor</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mf">0.5</span><span class="p">;</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">floor</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mf">0.5</span><span class="p">;</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">floor</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="p">);</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">floor</span><span class="w"> </span><span class="p">(</span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="p">);</span> +<a id="line-250" name="line-250"></a> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-252" name="line-252"></a> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">parent</span><span class="o">-></span><span class="n">has_visible_children</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-255" name="line-255"></a> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">baobab_treemap_get_item_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="p">);</span> +<a id="line-257" name="line-257"></a> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">baobab_chart_get_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">more_visible_childs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="k">else</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">max_visible_depth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">max_visible_depth</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="p">);</span> +<a id="line-262" name="line-262"></a><span class="p">}</span> +<a id="line-263" name="line-263"></a> +<a id="line-264" name="line-264"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-265" name="line-265"></a><span class="nf">baobab_treemap_is_point_over_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">x</span><span class="p">,</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">y</span><span class="p">)</span> +<a id="line-269" name="line-269"></a><span class="p">{</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">GdkRectangle</span><span class="w"> </span><span class="o">*</span><span class="n">rect</span><span class="p">;</span> +<a id="line-271" name="line-271"></a> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="n">rect</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&</span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="p">;</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">((</span><span class="n">x</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">width</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-274" name="line-274"></a><span class="w"> </span><span class="p">(</span><span class="n">y</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="p">(</span><span class="n">y</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">y</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">rect</span><span class="o">-></span><span class="n">height</span><span class="p">));</span> +<a id="line-275" name="line-275"></a><span class="p">}</span> +<a id="line-276" name="line-276"></a> +<a id="line-277" name="line-277"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-278" name="line-278"></a><span class="nf">baobab_treemap_get_item_rectangle</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">BaobabChartItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">)</span> +<a id="line-280" name="line-280"></a><span class="p">{</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="n">cairo_rectangle_t</span><span class="w"> </span><span class="o">*</span><span class="n">_rect</span><span class="p">;</span> +<a id="line-282" name="line-282"></a> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="n">_rect</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">cairo_rectangle_t</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">data</span><span class="p">;</span> +<a id="line-284" name="line-284"></a> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="n">_rect</span><span class="o">-></span><span class="n">x</span><span class="p">;</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="n">_rect</span><span class="o">-></span><span class="n">y</span><span class="p">;</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="p">{</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="n">_rect</span><span class="o">-></span><span class="n">width</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="n">_rect</span><span class="o">-></span><span class="n">height</span><span class="p">;</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="p">}</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="k">else</span> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="p">{</span> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">width</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="n">_rect</span><span class="o">-></span><span class="n">width</span><span class="p">;</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="n">item</span><span class="o">-></span><span class="n">rect</span><span class="p">.</span><span class="n">height</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="w"> </span><span class="n">_rect</span><span class="o">-></span><span class="n">height</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">ITEM_PADDING</span><span class="p">;</span> +<a id="line-296" name="line-296"></a><span class="w"> </span><span class="p">}</span> +<a id="line-297" name="line-297"></a> +<a id="line-298" name="line-298"></a><span class="p">}</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="n">guint</span> +<a id="line-301" name="line-301"></a><span class="nf">baobab_treemap_can_zoom_in</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-302" name="line-302"></a><span class="p">{</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">BaobabTreemapPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-304" name="line-304"></a> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_TREEMAP</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-306" name="line-306"></a> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">MAX</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">max_visible_depth</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">));</span> +<a id="line-308" name="line-308"></a><span class="p">}</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="n">guint</span> +<a id="line-311" name="line-311"></a><span class="nf">baobab_treemap_can_zoom_out</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-312" name="line-312"></a><span class="p">{</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="n">BaobabTreemapPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-314" name="line-314"></a> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">BAOBAB_TREEMAP</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-316" name="line-316"></a> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">more_visible_childs</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-318" name="line-318"></a><span class="p">}</span> +<a id="line-319" name="line-319"></a> +<a id="line-320" name="line-320"></a><span class="cm">/* Public functions start here */</span> +<a id="line-321" name="line-321"></a> +<a id="line-322" name="line-322"></a><span class="cm">/**</span> +<a id="line-323" name="line-323"></a><span class="cm"> * baobab_treemap_new:</span> +<a id="line-324" name="line-324"></a><span class="cm"> *</span> +<a id="line-325" name="line-325"></a><span class="cm"> * Constructor for the baobab_treemap class</span> +<a id="line-326" name="line-326"></a><span class="cm"> *</span> +<a id="line-327" name="line-327"></a><span class="cm"> * Returns: a new #BaobabTreemap object</span> +<a id="line-328" name="line-328"></a><span class="cm"> *</span> +<a id="line-329" name="line-329"></a><span class="cm"> **/</span> +<a id="line-330" name="line-330"></a><span class="n">GtkWidget</span><span class="o">*</span> +<a id="line-331" name="line-331"></a><span class="nf">baobab_treemap_new</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-332" name="line-332"></a><span class="p">{</span> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_object_new</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_TREEMAP_TYPE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-334" name="line-334"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/7.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/7.html new file mode 100644 index 00000000..573d6c76 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/7.html @@ -0,0 +1,1323 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: baobab/src/baobab-utils.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> baobab-utils.c</p> +<a href="7.html#line-102"> variableScope 102</a><a href="7.html#line-363"> variableScope 363</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-22" name="line-22"></a><span class="cp">#endif</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gstdio.h></span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdlib.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><sys/stat.h></span> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gprintf.h></span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glibtop/mountlist.h></span> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glibtop/fsusage.h></span> +<a id="line-35" name="line-35"></a> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab.h"</span> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-treeview.h"</span> +<a id="line-38" name="line-38"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-utils.h"</span> +<a id="line-39" name="line-39"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"callbacks.h"</span> +<a id="line-40" name="line-40"></a> +<a id="line-41" name="line-41"></a><span class="kt">void</span> +<a id="line-42" name="line-42"></a><span class="nf">baobab_get_filesystem</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabFS</span><span class="w"> </span><span class="o">*</span><span class="n">fs</span><span class="p">)</span> +<a id="line-43" name="line-43"></a><span class="p">{</span> +<a id="line-44" name="line-44"></a><span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="n">glibtop_mountlist</span><span class="w"> </span><span class="n">mountlist</span><span class="p">;</span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="n">glibtop_mountentry</span><span class="w"> </span><span class="o">*</span><span class="n">mountentries</span><span class="p">;</span> +<a id="line-47" name="line-47"></a> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="n">memset</span><span class="w"> </span><span class="p">(</span><span class="n">fs</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="w"> </span><span class="o">*</span><span class="n">fs</span><span class="p">);</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">mountentries</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">glibtop_get_mountlist</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">mountlist</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-51" name="line-51"></a> +<a id="line-52" name="line-52"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">mountlist</span><span class="p">.</span><span class="n">number</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-53" name="line-53"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-54" name="line-54"></a><span class="w"> </span><span class="n">glibtop_fsusage</span><span class="w"> </span><span class="n">fsusage</span><span class="p">;</span> +<a id="line-55" name="line-55"></a> +<a id="line-56" name="line-56"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">mountentries</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">mountdir</span><span class="p">);</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">baobab_is_excluded_location</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-59" name="line-59"></a> +<a id="line-60" name="line-60"></a><span class="w"> </span><span class="n">glibtop_get_fsusage</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">fsusage</span><span class="p">,</span><span class="w"> </span><span class="n">mountentries</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">mountdir</span><span class="p">);</span> +<a id="line-61" name="line-61"></a> +<a id="line-62" name="line-62"></a><span class="w"> </span><span class="n">fs</span><span class="o">-></span><span class="n">total</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">fsusage</span><span class="p">.</span><span class="n">blocks</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">fsusage</span><span class="p">.</span><span class="n">block_size</span><span class="p">;</span> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">fs</span><span class="o">-></span><span class="n">avail</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">fsusage</span><span class="p">.</span><span class="n">bfree</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">fsusage</span><span class="p">.</span><span class="n">block_size</span><span class="p">;</span> +<a id="line-64" name="line-64"></a><span class="w"> </span><span class="n">fs</span><span class="o">-></span><span class="n">used</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="p">(</span><span class="n">fsusage</span><span class="p">.</span><span class="n">blocks</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">fsusage</span><span class="p">.</span><span class="n">bfree</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">fsusage</span><span class="p">.</span><span class="n">block_size</span><span class="p">;</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="p">}</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="p">}</span> +<a id="line-69" name="line-69"></a> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">mountentries</span><span class="p">);</span> +<a id="line-71" name="line-71"></a><span class="p">}</span> +<a id="line-72" name="line-72"></a> +<a id="line-73" name="line-73"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-74" name="line-74"></a><span class="nf">filechooser_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chooser</span><span class="p">,</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">,</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-77" name="line-77"></a><span class="p">{</span> +<a id="line-78" name="line-78"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">response</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-79" name="line-79"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">filename</span><span class="p">;</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-81" name="line-81"></a> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">filename</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">));</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">);</span> +<a id="line-84" name="line-84"></a> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_uri</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">);</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">baobab_scan_location</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">filename</span><span class="p">);</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="p">}</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">chooser</span><span class="p">);</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="p">}</span> +<a id="line-93" name="line-93"></a><span class="p">}</span> +<a id="line-94" name="line-94"></a> +<a id="line-95" name="line-95"></a><span class="cm">/*</span> +<a id="line-96" name="line-96"></a><span class="cm"> * GtkFileChooser to select a directory to scan</span> +<a id="line-97" name="line-97"></a><span class="cm"> */</span> +<a id="line-98" name="line-98"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-99" name="line-99"></a><span class="nf">dir_select</span><span class="w"> </span><span class="p">(</span><span class="n">gboolean</span><span class="w"> </span><span class="n">SEARCH</span><span class="p">,</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">)</span> +<a id="line-100" name="line-100"></a><span class="p">{</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">file_chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-102" name="line-102"></a><span class="hll"><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">toggle</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'toggle' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'toggle' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-103" name="line-103"></a> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-105" name="line-105"></a><span class="w"> </span><span class="n">file_chooser</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_file_chooser_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Select Folder"</span><span class="p">),</span> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">),</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</span><span class="p">,</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="s">"gtk-cancel"</span><span class="p">,</span> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">GTK_RESPONSE_CANCEL</span><span class="p">,</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="s">"gtk-open"</span><span class="p">,</span> +<a id="line-111" name="line-111"></a><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-112" name="line-112"></a> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_show_hidden</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_current_folder</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">),</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="n">g_get_home_dir</span><span class="w"> </span><span class="p">());</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="cm">/* add extra widget */</span> +<a id="line-117" name="line-117"></a><span class="w"> </span><span class="n">toggle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_check_button_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"_Show hidden folders"</span><span class="p">));</span> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">toggle</span><span class="p">);</span> +<a id="line-119" name="line-119"></a><span class="w"> </span><span class="n">gtk_toggle_button_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOGGLE_BUTTON</span><span class="w"> </span><span class="p">(</span><span class="n">toggle</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">((</span><span class="n">gpointer</span><span class="p">)</span><span class="w"> </span><span class="n">toggle</span><span class="p">,</span><span class="w"> </span><span class="s">"toggled"</span><span class="p">,</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_toggled</span><span class="p">),</span><span class="w"> </span><span class="n">file_chooser</span><span class="p">);</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_extra_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">),</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">toggle</span><span class="p">);</span> +<a id="line-124" name="line-124"></a> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">filechooser_cb</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">,</span><span class="w"> </span><span class="s">"destroy"</span><span class="p">,</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroyed</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">file_chooser</span><span class="p">);</span> +<a id="line-129" name="line-129"></a> +<a id="line-130" name="line-130"></a><span class="w"> </span><span class="n">gtk_window_set_modal</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-131" name="line-131"></a><span class="w"> </span><span class="n">gtk_window_set_position</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIN_POS_CENTER_ON_PARENT</span><span class="p">);</span> +<a id="line-132" name="line-132"></a><span class="w"> </span><span class="p">}</span> +<a id="line-133" name="line-133"></a> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">file_chooser</span><span class="p">));</span> +<a id="line-135" name="line-135"></a> +<a id="line-136" name="line-136"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-137" name="line-137"></a><span class="p">}</span> +<a id="line-138" name="line-138"></a> +<a id="line-139" name="line-139"></a><span class="kt">void</span> +<a id="line-140" name="line-140"></a><span class="nf">on_toggled</span><span class="w"> </span><span class="p">(</span><span class="n">GtkToggleButton</span><span class="w"> </span><span class="o">*</span><span class="n">togglebutton</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">dialog</span><span class="p">)</span> +<a id="line-141" name="line-141"></a><span class="p">{</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">gtk_file_chooser_set_show_hidden</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="o">!</span><span class="n">gtk_file_chooser_get_show_hidden</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="p">(</span><span class="n">GTK_FILE_CHOOSER</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">)));</span> +<a id="line-145" name="line-145"></a><span class="p">}</span> +<a id="line-146" name="line-146"></a> +<a id="line-147" name="line-147"></a><span class="n">gboolean</span> +<a id="line-148" name="line-148"></a><span class="nf">show_bars</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">mdl</span><span class="p">,</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-152" name="line-152"></a><span class="p">{</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">parent</span><span class="p">;</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">perc</span><span class="p">;</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">readelements</span><span class="p">,</span><span class="w"> </span><span class="n">size_col</span><span class="p">;</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="n">guint64</span><span class="w"> </span><span class="n">refsize</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">;</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">sizecstr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-158" name="line-158"></a> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">show_allocated</span><span class="p">)</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">size_col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="n">COL_H_ALLOCSIZE</span><span class="p">;</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="k">else</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">size_col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">gint</span><span class="p">)</span><span class="w"> </span><span class="n">COL_H_SIZE</span><span class="p">;</span> +<a id="line-163" name="line-163"></a> +<a id="line-164" name="line-164"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_model_iter_parent</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-165" name="line-165"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">COL_H_ELEMENTS</span><span class="p">,</span> +<a id="line-166" name="line-166"></a><span class="w"> </span><span class="o">&</span><span class="n">readelements</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-167" name="line-167"></a> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">readelements</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span><span class="w"> </span><span class="s">"--"</span><span class="p">,</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">COL_ELEMENTS</span><span class="p">,</span><span class="w"> </span><span class="s">"--"</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-172" name="line-172"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="p">}</span> +<a id="line-174" name="line-174"></a> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="n">COL_H_ELEMENTS</span><span class="p">,</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="o">&</span><span class="n">readelements</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-177" name="line-177"></a> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">size_col</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-179" name="line-179"></a> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">sizecstr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">size</span><span class="p">);</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">readelements</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-183" name="line-183"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">sizecstr</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-185" name="line-185"></a> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">sizecstr</span><span class="p">);</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="p">}</span> +<a id="line-189" name="line-189"></a> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">parent</span><span class="p">,</span><span class="w"> </span><span class="n">size_col</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">refsize</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">perc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">refsize</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="p">((</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="n">refsize</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="mf">0.0</span><span class="p">;</span> +<a id="line-192" name="line-192"></a> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">sizecstr</span><span class="p">,</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">COL_H_PERC</span><span class="p">,</span><span class="w"> </span><span class="n">perc</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-196" name="line-196"></a> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">sizecstr</span><span class="p">);</span> +<a id="line-198" name="line-198"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">COL_H_ELEMENTS</span><span class="p">,</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="o">&</span><span class="n">readelements</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-201" name="line-201"></a> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">readelements</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-203" name="line-203"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">size_col</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">size</span><span class="p">,</span> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-205" name="line-205"></a> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">sizecstr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">size</span><span class="p">);</span> +<a id="line-207" name="line-207"></a> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-209" name="line-209"></a><span class="w"> </span><span class="n">COL_H_PERC</span><span class="p">,</span><span class="w"> </span><span class="mf">100.0</span><span class="p">,</span> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">sizecstr</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-211" name="line-211"></a> +<a id="line-212" name="line-212"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">sizecstr</span><span class="p">);</span> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="p">}</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-215" name="line-215"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">mdl</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span><span class="w"> </span><span class="s">"--"</span><span class="p">,</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">COL_ELEMENTS</span><span class="p">,</span><span class="w"> </span><span class="s">"--"</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="p">}</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="p">}</span> +<a id="line-220" name="line-220"></a> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-222" name="line-222"></a><span class="p">}</span> +<a id="line-223" name="line-223"></a> +<a id="line-224" name="line-224"></a><span class="kt">void</span> +<a id="line-225" name="line-225"></a><span class="nf">message</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">primary_msg</span><span class="p">,</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">secondary_msg</span><span class="p">,</span> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">GtkMessageType</span><span class="w"> </span><span class="n">type</span><span class="p">,</span> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">)</span> +<a id="line-229" name="line-229"></a><span class="p">{</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">),</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">type</span><span class="p">,</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">GTK_BUTTONS_OK</span><span class="p">,</span><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">primary_msg</span><span class="p">);</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">secondary_msg</span><span class="p">);</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-239" name="line-239"></a><span class="p">}</span> +<a id="line-240" name="line-240"></a> +<a id="line-241" name="line-241"></a><span class="n">gint</span> +<a id="line-242" name="line-242"></a><span class="nf">messageyesno</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">primary_msg</span><span class="p">,</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">secondary_msg</span><span class="p">,</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">GtkMessageType</span><span class="w"> </span><span class="n">type</span><span class="p">,</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">ok_button</span><span class="p">,</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">)</span> +<a id="line-247" name="line-247"></a><span class="p">{</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="p">;</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-251" name="line-251"></a> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">),</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">type</span><span class="p">,</span> +<a id="line-255" name="line-255"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CANCEL</span><span class="p">,</span> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">primary_msg</span><span class="p">);</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">secondary_msg</span><span class="p">);</span> +<a id="line-259" name="line-259"></a> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">ok_button</span><span class="p">);</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">gtk_widget_set_can_default</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-262" name="line-262"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">);</span> +<a id="line-263" name="line-263"></a> +<a id="line-264" name="line-264"></a><span class="w"> </span><span class="n">gtk_dialog_add_action_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">button</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-265" name="line-265"></a><span class="w"> </span><span class="n">gtk_dialog_set_default_response</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-267" name="line-267"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-268" name="line-268"></a> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">response</span><span class="p">;</span> +<a id="line-270" name="line-270"></a><span class="p">}</span> +<a id="line-271" name="line-271"></a> +<a id="line-272" name="line-272"></a><span class="n">gboolean</span> +<a id="line-273" name="line-273"></a><span class="nf">baobab_check_dir</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-274" name="line-274"></a><span class="p">{</span> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">info</span><span class="p">;</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-278" name="line-278"></a> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_is_excluded_location</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">message</span><span class="p">(</span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Cannot check an excluded folder!"</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_MESSAGE_INFO</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">window</span><span class="p">);</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="p">}</span> +<a id="line-283" name="line-283"></a> +<a id="line-284" name="line-284"></a><span class="w"> </span><span class="n">info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_info</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_TYPE</span><span class="p">,</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">G_FILE_QUERY_INFO_NONE</span><span class="p">,</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-289" name="line-289"></a> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">info</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">message</span><span class="p">(</span><span class="s">""</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_MESSAGE_INFO</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">window</span><span class="p">);</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-293" name="line-293"></a> +<a id="line-294" name="line-294"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="p">}</span> +<a id="line-296" name="line-296"></a> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">g_file_info_get_file_type</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">G_FILE_TYPE_DIRECTORY</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">is_virtual_filesystem</span><span class="p">(</span><span class="n">file</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">error_msg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-302" name="line-302"></a> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_parse_name</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">error_msg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"</span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> is not a valid folder"</span><span class="p">),</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">name</span><span class="p">);</span> +<a id="line-306" name="line-306"></a> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="p">(</span><span class="n">error_msg</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Could not analyze disk usage."</span><span class="p">),</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">window</span><span class="p">);</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">error_msg</span><span class="p">);</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="p">}</span> +<a id="line-314" name="line-314"></a> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-316" name="line-316"></a> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-318" name="line-318"></a><span class="p">}</span> +<a id="line-319" name="line-319"></a> +<a id="line-320" name="line-320"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-321" name="line-321"></a><span class="nf">add_popupmenu_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkMenu</span><span class="w"> </span><span class="o">*</span><span class="n">pmenu</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">icon_name</span><span class="p">,</span><span class="w"> </span><span class="n">GCallback</span><span class="w"> </span><span class="n">item_cb</span><span class="p">)</span> +<a id="line-322" name="line-322"></a><span class="p">{</span> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">image</span><span class="p">;</span> +<a id="line-325" name="line-325"></a> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_menu_item_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">image</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="n">icon_name</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">gtk_image_menu_item_set_image</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IMAGE_MENU_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">),</span><span class="w"> </span><span class="n">image</span><span class="p">);</span> +<a id="line-329" name="line-329"></a> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span><span class="w"> </span><span class="n">item_cb</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-331" name="line-331"></a> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">pmenu</span><span class="p">),</span><span class="w"> </span><span class="n">item</span><span class="p">);</span> +<a id="line-333" name="line-333"></a><span class="p">}</span> +<a id="line-334" name="line-334"></a> +<a id="line-335" name="line-335"></a><span class="kt">void</span> +<a id="line-336" name="line-336"></a><span class="nf">popupmenu_list</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">can_trash</span><span class="p">)</span> +<a id="line-337" name="line-337"></a><span class="p">{</span> +<a id="line-338" name="line-338"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">pmenu</span><span class="p">;</span> +<a id="line-339" name="line-339"></a> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">pmenu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-341" name="line-341"></a> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">add_popupmenu_item</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">pmenu</span><span class="p">),</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_Open Folder"</span><span class="p">),</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="s">"document-open"</span><span class="p">,</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">open_file_cb</span><span class="p">));</span> +<a id="line-346" name="line-346"></a> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">is_local</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">can_trash</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="n">add_popupmenu_item</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">pmenu</span><span class="p">),</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Mo_ve to Trash"</span><span class="p">),</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="s">"edit-delete"</span><span class="p">,</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">trash_dir_cb</span><span class="p">));</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="p">}</span> +<a id="line-353" name="line-353"></a> +<a id="line-354" name="line-354"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">pmenu</span><span class="p">);</span> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">gtk_menu_popup_at_pointer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">pmenu</span><span class="p">),</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">GdkEvent</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">event</span><span class="p">);</span> +<a id="line-357" name="line-357"></a><span class="p">}</span> +<a id="line-358" name="line-358"></a> +<a id="line-359" name="line-359"></a><span class="kt">void</span> +<a id="line-360" name="line-360"></a><span class="nf">open_file_with_application</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-361" name="line-361"></a><span class="p">{</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">GAppInfo</span><span class="w"> </span><span class="o">*</span><span class="n">application</span><span class="p">;</span> +<a id="line-363" name="line-363"></a><span class="hll"><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">primary</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'primary' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'primary' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">info</span><span class="p">;</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">content</span><span class="p">;</span> +<a id="line-366" name="line-366"></a> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_info</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span> +<a id="line-368" name="line-368"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</span><span class="p">,</span> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="n">G_FILE_QUERY_INFO_NONE</span><span class="p">,</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-371" name="line-371"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">info</span><span class="p">)</span><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-373" name="line-373"></a> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="n">content</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_content_type</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">application</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_app_info_get_default_for_type</span><span class="w"> </span><span class="p">(</span><span class="n">content</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">application</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-378" name="line-378"></a><span class="w"> </span><span class="n">primary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not open folder </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s">"</span><span class="p">),</span> +<a id="line-379" name="line-379"></a><span class="w"> </span><span class="n">g_file_get_basename</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">));</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">,</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"There is no installed viewer capable "</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="s">"of displaying the folder."</span><span class="p">),</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">window</span><span class="p">);</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">primary</span><span class="p">);</span> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="p">}</span> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">uris</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">uri</span><span class="p">;</span> +<a id="line-390" name="line-390"></a> +<a id="line-391" name="line-391"></a><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">uris</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_list_append</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">g_app_info_launch_uris</span><span class="w"> </span><span class="p">(</span><span class="n">application</span><span class="p">,</span><span class="w"> </span><span class="n">uris</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-394" name="line-394"></a> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">);</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">uri</span><span class="p">);</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="p">}</span> +<a id="line-398" name="line-398"></a> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">application</span><span class="p">)</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">application</span><span class="p">);</span> +<a id="line-401" name="line-401"></a> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-403" name="line-403"></a><span class="p">}</span> +<a id="line-404" name="line-404"></a> +<a id="line-405" name="line-405"></a><span class="n">gboolean</span> +<a id="line-406" name="line-406"></a><span class="nf">can_trash_file</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-407" name="line-407"></a><span class="p">{</span> +<a id="line-408" name="line-408"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">info</span><span class="p">;</span> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">can_trash</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-410" name="line-410"></a> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_info</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</span><span class="p">,</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">G_FILE_QUERY_INFO_NONE</span><span class="p">,</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-416" name="line-416"></a> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_info_has_attribute</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">can_trash</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_attribute_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">,</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</span><span class="p">);</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="p">}</span> +<a id="line-422" name="line-422"></a> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="p">}</span> +<a id="line-425" name="line-425"></a> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">can_trash</span><span class="p">;</span> +<a id="line-427" name="line-427"></a><span class="p">}</span> +<a id="line-428" name="line-428"></a> +<a id="line-429" name="line-429"></a><span class="n">gboolean</span> +<a id="line-430" name="line-430"></a><span class="nf">trash_file</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-431" name="line-431"></a><span class="p">{</span> +<a id="line-432" name="line-432"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-433" name="line-433"></a> +<a id="line-434" name="line-434"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">g_file_trash</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-435" name="line-435"></a><span class="w"> </span><span class="n">GFileInfo</span><span class="w"> </span><span class="o">*</span><span class="n">info</span><span class="p">;</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">mess</span><span class="p">;</span> +<a id="line-438" name="line-438"></a> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="n">info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_query_info</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="n">G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</span><span class="p">,</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">G_FILE_QUERY_INFO_NONE</span><span class="p">,</span> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-444" name="line-444"></a> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">displayname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_info_get_display_name</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-447" name="line-447"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">displayname</span><span class="p">)</span> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not move </span><span class="se">\"</span><span class="s">%s</span><span class="se">\"</span><span class="s"> to the Trash"</span><span class="p">),</span> +<a id="line-449" name="line-449"></a><span class="w"> </span><span class="n">displayname</span><span class="p">);</span> +<a id="line-450" name="line-450"></a> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">info</span><span class="p">);</span> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="p">}</span> +<a id="line-453" name="line-453"></a> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="cm">/* fallback */</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not move file to the Trash"</span><span class="p">));</span> +<a id="line-457" name="line-457"></a> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">mess</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Details: %s"</span><span class="p">),</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="n">mess</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">window</span><span class="p">);</span> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">mess</span><span class="p">);</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-463" name="line-463"></a> +<a id="line-464" name="line-464"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="p">}</span> +<a id="line-466" name="line-466"></a> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-468" name="line-468"></a><span class="p">}</span> +<a id="line-469" name="line-469"></a> +<a id="line-470" name="line-470"></a><span class="n">gboolean</span> +<a id="line-471" name="line-471"></a><span class="nf">baobab_help_display</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">,</span> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">file_name</span><span class="p">,</span> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">link_id</span><span class="p">)</span> +<a id="line-474" name="line-474"></a><span class="p">{</span> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">uri</span><span class="p">;</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-478" name="line-478"></a> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">link_id</span><span class="p">)</span><span class="w"> </span><span class="o">?</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"help:%s/%s"</span><span class="p">,</span><span class="w"> </span><span class="n">file_name</span><span class="p">,</span><span class="w"> </span><span class="n">link_id</span><span class="p">)</span><span class="w"> </span><span class="o">:</span> +<a id="line-481" name="line-481"></a><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"help:%s"</span><span class="p">,</span><span class="w"> </span><span class="n">file_name</span><span class="p">);</span> +<a id="line-482" name="line-482"></a> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_show_uri_on_window</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">uri</span><span class="p">,</span> +<a id="line-485" name="line-485"></a><span class="w"> </span><span class="n">gtk_get_current_event_time</span><span class="w"> </span><span class="p">(),</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">uri</span><span class="p">);</span> +<a id="line-488" name="line-488"></a> +<a id="line-489" name="line-489"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-491" name="line-491"></a> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span> +<a id="line-496" name="line-496"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"There was an error displaying help."</span><span class="p">));</span> +<a id="line-497" name="line-497"></a> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-500" name="line-500"></a> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">,</span><span class="w"> </span><span class="s">"response"</span><span class="p">,</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-504" name="line-504"></a> +<a id="line-505" name="line-505"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-506" name="line-506"></a> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-508" name="line-508"></a><span class="w"> </span><span class="p">}</span> +<a id="line-509" name="line-509"></a> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-511" name="line-511"></a><span class="p">}</span> +<a id="line-512" name="line-512"></a> +<a id="line-513" name="line-513"></a><span class="n">gboolean</span> +<a id="line-514" name="line-514"></a><span class="nf">is_virtual_filesystem</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-515" name="line-515"></a><span class="p">{</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">;</span> +<a id="line-518" name="line-518"></a> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-520" name="line-520"></a> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="cm">/* FIXME: we need a better way to check virtual FS */</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="s">"/proc"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">||</span> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="s">"/sys"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">))</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-526" name="line-526"></a><span class="w"> </span><span class="p">}</span> +<a id="line-527" name="line-527"></a> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-529" name="line-529"></a> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-531" name="line-531"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/8.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/8.html new file mode 100644 index 00000000..8f43835c --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/8.html @@ -0,0 +1,2903 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: baobab/src/baobab.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> baobab.c</p> +<a href="8.html#line-83"> variableScope 83</a><a href="8.html#line-333"> knownConditionTrueFalse 333</a><a href="8.html#line-338"> knownConditionTrueFalse 338</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal"> 100</span> +<span class="normal"> 101</span> +<span class="normal"> 102</span> +<span class="normal"> 103</span> +<span class="normal"> 104</span> +<span class="normal"> 105</span> +<span class="normal"> 106</span> +<span class="normal"> 107</span> +<span class="normal"> 108</span> +<span class="normal"> 109</span> +<span class="normal"> 110</span> +<span class="normal"> 111</span> +<span class="normal"> 112</span> +<span class="normal"> 113</span> +<span class="normal"> 114</span> +<span class="normal"> 115</span> +<span class="normal"> 116</span> +<span class="normal"> 117</span> +<span class="normal"> 118</span> +<span class="normal"> 119</span> +<span class="normal"> 120</span> +<span class="normal"> 121</span> +<span class="normal"> 122</span> +<span class="normal"> 123</span> +<span class="normal"> 124</span> +<span class="normal"> 125</span> +<span class="normal"> 126</span> +<span class="normal"> 127</span> +<span class="normal"> 128</span> +<span class="normal"> 129</span> +<span class="normal"> 130</span> +<span class="normal"> 131</span> +<span class="normal"> 132</span> +<span class="normal"> 133</span> +<span class="normal"> 134</span> +<span class="normal"> 135</span> +<span class="normal"> 136</span> +<span class="normal"> 137</span> +<span class="normal"> 138</span> +<span class="normal"> 139</span> +<span class="normal"> 140</span> +<span class="normal"> 141</span> +<span class="normal"> 142</span> +<span class="normal"> 143</span> +<span class="normal"> 144</span> +<span class="normal"> 145</span> +<span class="normal"> 146</span> +<span class="normal"> 147</span> +<span class="normal"> 148</span> +<span class="normal"> 149</span> +<span class="normal"> 150</span> +<span class="normal"> 151</span> +<span class="normal"> 152</span> +<span class="normal"> 153</span> +<span class="normal"> 154</span> +<span class="normal"> 155</span> +<span class="normal"> 156</span> +<span class="normal"> 157</span> +<span class="normal"> 158</span> +<span class="normal"> 159</span> +<span class="normal"> 160</span> +<span class="normal"> 161</span> +<span class="normal"> 162</span> +<span class="normal"> 163</span> +<span class="normal"> 164</span> +<span class="normal"> 165</span> +<span class="normal"> 166</span> +<span class="normal"> 167</span> +<span class="normal"> 168</span> +<span class="normal"> 169</span> +<span class="normal"> 170</span> +<span class="normal"> 171</span> +<span class="normal"> 172</span> +<span class="normal"> 173</span> +<span class="normal"> 174</span> +<span class="normal"> 175</span> +<span class="normal"> 176</span> +<span class="normal"> 177</span> +<span class="normal"> 178</span> +<span class="normal"> 179</span> +<span class="normal"> 180</span> +<span class="normal"> 181</span> +<span class="normal"> 182</span> +<span class="normal"> 183</span> +<span class="normal"> 184</span> +<span class="normal"> 185</span> +<span class="normal"> 186</span> +<span class="normal"> 187</span> +<span class="normal"> 188</span> +<span class="normal"> 189</span> +<span class="normal"> 190</span> +<span class="normal"> 191</span> +<span class="normal"> 192</span> +<span class="normal"> 193</span> +<span class="normal"> 194</span> +<span class="normal"> 195</span> +<span class="normal"> 196</span> +<span class="normal"> 197</span> +<span class="normal"> 198</span> +<span class="normal"> 199</span> +<span class="normal"> 200</span> +<span class="normal"> 201</span> +<span class="normal"> 202</span> +<span class="normal"> 203</span> +<span class="normal"> 204</span> +<span class="normal"> 205</span> +<span class="normal"> 206</span> +<span class="normal"> 207</span> +<span class="normal"> 208</span> +<span class="normal"> 209</span> +<span class="normal"> 210</span> +<span class="normal"> 211</span> +<span class="normal"> 212</span> +<span class="normal"> 213</span> +<span class="normal"> 214</span> +<span class="normal"> 215</span> +<span class="normal"> 216</span> +<span class="normal"> 217</span> +<span class="normal"> 218</span> +<span class="normal"> 219</span> +<span class="normal"> 220</span> +<span class="normal"> 221</span> +<span class="normal"> 222</span> +<span class="normal"> 223</span> +<span class="normal"> 224</span> +<span class="normal"> 225</span> +<span class="normal"> 226</span> +<span class="normal"> 227</span> +<span class="normal"> 228</span> +<span class="normal"> 229</span> +<span class="normal"> 230</span> +<span class="normal"> 231</span> +<span class="normal"> 232</span> +<span class="normal"> 233</span> +<span class="normal"> 234</span> +<span class="normal"> 235</span> +<span class="normal"> 236</span> +<span class="normal"> 237</span> +<span class="normal"> 238</span> +<span class="normal"> 239</span> +<span class="normal"> 240</span> +<span class="normal"> 241</span> +<span class="normal"> 242</span> +<span class="normal"> 243</span> +<span class="normal"> 244</span> +<span class="normal"> 245</span> +<span class="normal"> 246</span> +<span class="normal"> 247</span> +<span class="normal"> 248</span> +<span class="normal"> 249</span> +<span class="normal"> 250</span> +<span class="normal"> 251</span> +<span class="normal"> 252</span> +<span class="normal"> 253</span> +<span class="normal"> 254</span> +<span class="normal"> 255</span> +<span class="normal"> 256</span> +<span class="normal"> 257</span> +<span class="normal"> 258</span> +<span class="normal"> 259</span> +<span class="normal"> 260</span> +<span class="normal"> 261</span> +<span class="normal"> 262</span> +<span class="normal"> 263</span> +<span class="normal"> 264</span> +<span class="normal"> 265</span> +<span class="normal"> 266</span> +<span class="normal"> 267</span> +<span class="normal"> 268</span> +<span class="normal"> 269</span> +<span class="normal"> 270</span> +<span class="normal"> 271</span> +<span class="normal"> 272</span> +<span class="normal"> 273</span> +<span class="normal"> 274</span> +<span class="normal"> 275</span> +<span class="normal"> 276</span> +<span class="normal"> 277</span> +<span class="normal"> 278</span> +<span class="normal"> 279</span> +<span class="normal"> 280</span> +<span class="normal"> 281</span> +<span class="normal"> 282</span> +<span class="normal"> 283</span> +<span class="normal"> 284</span> +<span class="normal"> 285</span> +<span class="normal"> 286</span> +<span class="normal"> 287</span> +<span class="normal"> 288</span> +<span class="normal"> 289</span> +<span class="normal"> 290</span> +<span class="normal"> 291</span> +<span class="normal"> 292</span> +<span class="normal"> 293</span> +<span class="normal"> 294</span> +<span class="normal"> 295</span> +<span class="normal"> 296</span> +<span class="normal"> 297</span> +<span class="normal"> 298</span> +<span class="normal"> 299</span> +<span class="normal"> 300</span> +<span class="normal"> 301</span> +<span class="normal"> 302</span> +<span class="normal"> 303</span> +<span class="normal"> 304</span> +<span class="normal"> 305</span> +<span class="normal"> 306</span> +<span class="normal"> 307</span> +<span class="normal"> 308</span> +<span class="normal"> 309</span> +<span class="normal"> 310</span> +<span class="normal"> 311</span> +<span class="normal"> 312</span> +<span class="normal"> 313</span> +<span class="normal"> 314</span> +<span class="normal"> 315</span> +<span class="normal"> 316</span> +<span class="normal"> 317</span> +<span class="normal"> 318</span> +<span class="normal"> 319</span> +<span class="normal"> 320</span> +<span class="normal"> 321</span> +<span class="normal"> 322</span> +<span class="normal"> 323</span> +<span class="normal"> 324</span> +<span class="normal"> 325</span> +<span class="normal"> 326</span> +<span class="normal"> 327</span> +<span class="normal"> 328</span> +<span class="normal"> 329</span> +<span class="normal"> 330</span> +<span class="normal"> 331</span> +<span class="normal"> 332</span> +<span class="normal"> 333</span> +<span class="normal"> 334</span> +<span class="normal"> 335</span> +<span class="normal"> 336</span> +<span class="normal"> 337</span> +<span class="normal"> 338</span> +<span class="normal"> 339</span> +<span class="normal"> 340</span> +<span class="normal"> 341</span> +<span class="normal"> 342</span> +<span class="normal"> 343</span> +<span class="normal"> 344</span> +<span class="normal"> 345</span> +<span class="normal"> 346</span> +<span class="normal"> 347</span> +<span class="normal"> 348</span> +<span class="normal"> 349</span> +<span class="normal"> 350</span> +<span class="normal"> 351</span> +<span class="normal"> 352</span> +<span class="normal"> 353</span> +<span class="normal"> 354</span> +<span class="normal"> 355</span> +<span class="normal"> 356</span> +<span class="normal"> 357</span> +<span class="normal"> 358</span> +<span class="normal"> 359</span> +<span class="normal"> 360</span> +<span class="normal"> 361</span> +<span class="normal"> 362</span> +<span class="normal"> 363</span> +<span class="normal"> 364</span> +<span class="normal"> 365</span> +<span class="normal"> 366</span> +<span class="normal"> 367</span> +<span class="normal"> 368</span> +<span class="normal"> 369</span> +<span class="normal"> 370</span> +<span class="normal"> 371</span> +<span class="normal"> 372</span> +<span class="normal"> 373</span> +<span class="normal"> 374</span> +<span class="normal"> 375</span> +<span class="normal"> 376</span> +<span class="normal"> 377</span> +<span class="normal"> 378</span> +<span class="normal"> 379</span> +<span class="normal"> 380</span> +<span class="normal"> 381</span> +<span class="normal"> 382</span> +<span class="normal"> 383</span> +<span class="normal"> 384</span> +<span class="normal"> 385</span> +<span class="normal"> 386</span> +<span class="normal"> 387</span> +<span class="normal"> 388</span> +<span class="normal"> 389</span> +<span class="normal"> 390</span> +<span class="normal"> 391</span> +<span class="normal"> 392</span> +<span class="normal"> 393</span> +<span class="normal"> 394</span> +<span class="normal"> 395</span> +<span class="normal"> 396</span> +<span class="normal"> 397</span> +<span class="normal"> 398</span> +<span class="normal"> 399</span> +<span class="normal"> 400</span> +<span class="normal"> 401</span> +<span class="normal"> 402</span> +<span class="normal"> 403</span> +<span class="normal"> 404</span> +<span class="normal"> 405</span> +<span class="normal"> 406</span> +<span class="normal"> 407</span> +<span class="normal"> 408</span> +<span class="normal"> 409</span> +<span class="normal"> 410</span> +<span class="normal"> 411</span> +<span class="normal"> 412</span> +<span class="normal"> 413</span> +<span class="normal"> 414</span> +<span class="normal"> 415</span> +<span class="normal"> 416</span> +<span class="normal"> 417</span> +<span class="normal"> 418</span> +<span class="normal"> 419</span> +<span class="normal"> 420</span> +<span class="normal"> 421</span> +<span class="normal"> 422</span> +<span class="normal"> 423</span> +<span class="normal"> 424</span> +<span class="normal"> 425</span> +<span class="normal"> 426</span> +<span class="normal"> 427</span> +<span class="normal"> 428</span> +<span class="normal"> 429</span> +<span class="normal"> 430</span> +<span class="normal"> 431</span> +<span class="normal"> 432</span> +<span class="normal"> 433</span> +<span class="normal"> 434</span> +<span class="normal"> 435</span> +<span class="normal"> 436</span> +<span class="normal"> 437</span> +<span class="normal"> 438</span> +<span class="normal"> 439</span> +<span class="normal"> 440</span> +<span class="normal"> 441</span> +<span class="normal"> 442</span> +<span class="normal"> 443</span> +<span class="normal"> 444</span> +<span class="normal"> 445</span> +<span class="normal"> 446</span> +<span class="normal"> 447</span> +<span class="normal"> 448</span> +<span class="normal"> 449</span> +<span class="normal"> 450</span> +<span class="normal"> 451</span> +<span class="normal"> 452</span> +<span class="normal"> 453</span> +<span class="normal"> 454</span> +<span class="normal"> 455</span> +<span class="normal"> 456</span> +<span class="normal"> 457</span> +<span class="normal"> 458</span> +<span class="normal"> 459</span> +<span class="normal"> 460</span> +<span class="normal"> 461</span> +<span class="normal"> 462</span> +<span class="normal"> 463</span> +<span class="normal"> 464</span> +<span class="normal"> 465</span> +<span class="normal"> 466</span> +<span class="normal"> 467</span> +<span class="normal"> 468</span> +<span class="normal"> 469</span> +<span class="normal"> 470</span> +<span class="normal"> 471</span> +<span class="normal"> 472</span> +<span class="normal"> 473</span> +<span class="normal"> 474</span> +<span class="normal"> 475</span> +<span class="normal"> 476</span> +<span class="normal"> 477</span> +<span class="normal"> 478</span> +<span class="normal"> 479</span> +<span class="normal"> 480</span> +<span class="normal"> 481</span> +<span class="normal"> 482</span> +<span class="normal"> 483</span> +<span class="normal"> 484</span> +<span class="normal"> 485</span> +<span class="normal"> 486</span> +<span class="normal"> 487</span> +<span class="normal"> 488</span> +<span class="normal"> 489</span> +<span class="normal"> 490</span> +<span class="normal"> 491</span> +<span class="normal"> 492</span> +<span class="normal"> 493</span> +<span class="normal"> 494</span> +<span class="normal"> 495</span> +<span class="normal"> 496</span> +<span class="normal"> 497</span> +<span class="normal"> 498</span> +<span class="normal"> 499</span> +<span class="normal"> 500</span> +<span class="normal"> 501</span> +<span class="normal"> 502</span> +<span class="normal"> 503</span> +<span class="normal"> 504</span> +<span class="normal"> 505</span> +<span class="normal"> 506</span> +<span class="normal"> 507</span> +<span class="normal"> 508</span> +<span class="normal"> 509</span> +<span class="normal"> 510</span> +<span class="normal"> 511</span> +<span class="normal"> 512</span> +<span class="normal"> 513</span> +<span class="normal"> 514</span> +<span class="normal"> 515</span> +<span class="normal"> 516</span> +<span class="normal"> 517</span> +<span class="normal"> 518</span> +<span class="normal"> 519</span> +<span class="normal"> 520</span> +<span class="normal"> 521</span> +<span class="normal"> 522</span> +<span class="normal"> 523</span> +<span class="normal"> 524</span> +<span class="normal"> 525</span> +<span class="normal"> 526</span> +<span class="normal"> 527</span> +<span class="normal"> 528</span> +<span class="normal"> 529</span> +<span class="normal"> 530</span> +<span class="normal"> 531</span> +<span class="normal"> 532</span> +<span class="normal"> 533</span> +<span class="normal"> 534</span> +<span class="normal"> 535</span> +<span class="normal"> 536</span> +<span class="normal"> 537</span> +<span class="normal"> 538</span> +<span class="normal"> 539</span> +<span class="normal"> 540</span> +<span class="normal"> 541</span> +<span class="normal"> 542</span> +<span class="normal"> 543</span> +<span class="normal"> 544</span> +<span class="normal"> 545</span> +<span class="normal"> 546</span> +<span class="normal"> 547</span> +<span class="normal"> 548</span> +<span class="normal"> 549</span> +<span class="normal"> 550</span> +<span class="normal"> 551</span> +<span class="normal"> 552</span> +<span class="normal"> 553</span> +<span class="normal"> 554</span> +<span class="normal"> 555</span> +<span class="normal"> 556</span> +<span class="normal"> 557</span> +<span class="normal"> 558</span> +<span class="normal"> 559</span> +<span class="normal"> 560</span> +<span class="normal"> 561</span> +<span class="normal"> 562</span> +<span class="normal"> 563</span> +<span class="normal"> 564</span> +<span class="normal"> 565</span> +<span class="normal"> 566</span> +<span class="normal"> 567</span> +<span class="normal"> 568</span> +<span class="normal"> 569</span> +<span class="normal"> 570</span> +<span class="normal"> 571</span> +<span class="normal"> 572</span> +<span class="normal"> 573</span> +<span class="normal"> 574</span> +<span class="normal"> 575</span> +<span class="normal"> 576</span> +<span class="normal"> 577</span> +<span class="normal"> 578</span> +<span class="normal"> 579</span> +<span class="normal"> 580</span> +<span class="normal"> 581</span> +<span class="normal"> 582</span> +<span class="normal"> 583</span> +<span class="normal"> 584</span> +<span class="normal"> 585</span> +<span class="normal"> 586</span> +<span class="normal"> 587</span> +<span class="normal"> 588</span> +<span class="normal"> 589</span> +<span class="normal"> 590</span> +<span class="normal"> 591</span> +<span class="normal"> 592</span> +<span class="normal"> 593</span> +<span class="normal"> 594</span> +<span class="normal"> 595</span> +<span class="normal"> 596</span> +<span class="normal"> 597</span> +<span class="normal"> 598</span> +<span class="normal"> 599</span> +<span class="normal"> 600</span> +<span class="normal"> 601</span> +<span class="normal"> 602</span> +<span class="normal"> 603</span> +<span class="normal"> 604</span> +<span class="normal"> 605</span> +<span class="normal"> 606</span> +<span class="normal"> 607</span> +<span class="normal"> 608</span> +<span class="normal"> 609</span> +<span class="normal"> 610</span> +<span class="normal"> 611</span> +<span class="normal"> 612</span> +<span class="normal"> 613</span> +<span class="normal"> 614</span> +<span class="normal"> 615</span> +<span class="normal"> 616</span> +<span class="normal"> 617</span> +<span class="normal"> 618</span> +<span class="normal"> 619</span> +<span class="normal"> 620</span> +<span class="normal"> 621</span> +<span class="normal"> 622</span> +<span class="normal"> 623</span> +<span class="normal"> 624</span> +<span class="normal"> 625</span> +<span class="normal"> 626</span> +<span class="normal"> 627</span> +<span class="normal"> 628</span> +<span class="normal"> 629</span> +<span class="normal"> 630</span> +<span class="normal"> 631</span> +<span class="normal"> 632</span> +<span class="normal"> 633</span> +<span class="normal"> 634</span> +<span class="normal"> 635</span> +<span class="normal"> 636</span> +<span class="normal"> 637</span> +<span class="normal"> 638</span> +<span class="normal"> 639</span> +<span class="normal"> 640</span> +<span class="normal"> 641</span> +<span class="normal"> 642</span> +<span class="normal"> 643</span> +<span class="normal"> 644</span> +<span class="normal"> 645</span> +<span class="normal"> 646</span> +<span class="normal"> 647</span> +<span class="normal"> 648</span> +<span class="normal"> 649</span> +<span class="normal"> 650</span> +<span class="normal"> 651</span> +<span class="normal"> 652</span> +<span class="normal"> 653</span> +<span class="normal"> 654</span> +<span class="normal"> 655</span> +<span class="normal"> 656</span> +<span class="normal"> 657</span> +<span class="normal"> 658</span> +<span class="normal"> 659</span> +<span class="normal"> 660</span> +<span class="normal"> 661</span> +<span class="normal"> 662</span> +<span class="normal"> 663</span> +<span class="normal"> 664</span> +<span class="normal"> 665</span> +<span class="normal"> 666</span> +<span class="normal"> 667</span> +<span class="normal"> 668</span> +<span class="normal"> 669</span> +<span class="normal"> 670</span> +<span class="normal"> 671</span> +<span class="normal"> 672</span> +<span class="normal"> 673</span> +<span class="normal"> 674</span> +<span class="normal"> 675</span> +<span class="normal"> 676</span> +<span class="normal"> 677</span> +<span class="normal"> 678</span> +<span class="normal"> 679</span> +<span class="normal"> 680</span> +<span class="normal"> 681</span> +<span class="normal"> 682</span> +<span class="normal"> 683</span> +<span class="normal"> 684</span> +<span class="normal"> 685</span> +<span class="normal"> 686</span> +<span class="normal"> 687</span> +<span class="normal"> 688</span> +<span class="normal"> 689</span> +<span class="normal"> 690</span> +<span class="normal"> 691</span> +<span class="normal"> 692</span> +<span class="normal"> 693</span> +<span class="normal"> 694</span> +<span class="normal"> 695</span> +<span class="normal"> 696</span> +<span class="normal"> 697</span> +<span class="normal"> 698</span> +<span class="normal"> 699</span> +<span class="normal"> 700</span> +<span class="normal"> 701</span> +<span class="normal"> 702</span> +<span class="normal"> 703</span> +<span class="normal"> 704</span> +<span class="normal"> 705</span> +<span class="normal"> 706</span> +<span class="normal"> 707</span> +<span class="normal"> 708</span> +<span class="normal"> 709</span> +<span class="normal"> 710</span> +<span class="normal"> 711</span> +<span class="normal"> 712</span> +<span class="normal"> 713</span> +<span class="normal"> 714</span> +<span class="normal"> 715</span> +<span class="normal"> 716</span> +<span class="normal"> 717</span> +<span class="normal"> 718</span> +<span class="normal"> 719</span> +<span class="normal"> 720</span> +<span class="normal"> 721</span> +<span class="normal"> 722</span> +<span class="normal"> 723</span> +<span class="normal"> 724</span> +<span class="normal"> 725</span> +<span class="normal"> 726</span> +<span class="normal"> 727</span> +<span class="normal"> 728</span> +<span class="normal"> 729</span> +<span class="normal"> 730</span> +<span class="normal"> 731</span> +<span class="normal"> 732</span> +<span class="normal"> 733</span> +<span class="normal"> 734</span> +<span class="normal"> 735</span> +<span class="normal"> 736</span> +<span class="normal"> 737</span> +<span class="normal"> 738</span> +<span class="normal"> 739</span> +<span class="normal"> 740</span> +<span class="normal"> 741</span> +<span class="normal"> 742</span> +<span class="normal"> 743</span> +<span class="normal"> 744</span> +<span class="normal"> 745</span> +<span class="normal"> 746</span> +<span class="normal"> 747</span> +<span class="normal"> 748</span> +<span class="normal"> 749</span> +<span class="normal"> 750</span> +<span class="normal"> 751</span> +<span class="normal"> 752</span> +<span class="normal"> 753</span> +<span class="normal"> 754</span> +<span class="normal"> 755</span> +<span class="normal"> 756</span> +<span class="normal"> 757</span> +<span class="normal"> 758</span> +<span class="normal"> 759</span> +<span class="normal"> 760</span> +<span class="normal"> 761</span> +<span class="normal"> 762</span> +<span class="normal"> 763</span> +<span class="normal"> 764</span> +<span class="normal"> 765</span> +<span class="normal"> 766</span> +<span class="normal"> 767</span> +<span class="normal"> 768</span> +<span class="normal"> 769</span> +<span class="normal"> 770</span> +<span class="normal"> 771</span> +<span class="normal"> 772</span> +<span class="normal"> 773</span> +<span class="normal"> 774</span> +<span class="normal"> 775</span> +<span class="normal"> 776</span> +<span class="normal"> 777</span> +<span class="normal"> 778</span> +<span class="normal"> 779</span> +<span class="normal"> 780</span> +<span class="normal"> 781</span> +<span class="normal"> 782</span> +<span class="normal"> 783</span> +<span class="normal"> 784</span> +<span class="normal"> 785</span> +<span class="normal"> 786</span> +<span class="normal"> 787</span> +<span class="normal"> 788</span> +<span class="normal"> 789</span> +<span class="normal"> 790</span> +<span class="normal"> 791</span> +<span class="normal"> 792</span> +<span class="normal"> 793</span> +<span class="normal"> 794</span> +<span class="normal"> 795</span> +<span class="normal"> 796</span> +<span class="normal"> 797</span> +<span class="normal"> 798</span> +<span class="normal"> 799</span> +<span class="normal"> 800</span> +<span class="normal"> 801</span> +<span class="normal"> 802</span> +<span class="normal"> 803</span> +<span class="normal"> 804</span> +<span class="normal"> 805</span> +<span class="normal"> 806</span> +<span class="normal"> 807</span> +<span class="normal"> 808</span> +<span class="normal"> 809</span> +<span class="normal"> 810</span> +<span class="normal"> 811</span> +<span class="normal"> 812</span> +<span class="normal"> 813</span> +<span class="normal"> 814</span> +<span class="normal"> 815</span> +<span class="normal"> 816</span> +<span class="normal"> 817</span> +<span class="normal"> 818</span> +<span class="normal"> 819</span> +<span class="normal"> 820</span> +<span class="normal"> 821</span> +<span class="normal"> 822</span> +<span class="normal"> 823</span> +<span class="normal"> 824</span> +<span class="normal"> 825</span> +<span class="normal"> 826</span> +<span class="normal"> 827</span> +<span class="normal"> 828</span> +<span class="normal"> 829</span> +<span class="normal"> 830</span> +<span class="normal"> 831</span> +<span class="normal"> 832</span> +<span class="normal"> 833</span> +<span class="normal"> 834</span> +<span class="normal"> 835</span> +<span class="normal"> 836</span> +<span class="normal"> 837</span> +<span class="normal"> 838</span> +<span class="normal"> 839</span> +<span class="normal"> 840</span> +<span class="normal"> 841</span> +<span class="normal"> 842</span> +<span class="normal"> 843</span> +<span class="normal"> 844</span> +<span class="normal"> 845</span> +<span class="normal"> 846</span> +<span class="normal"> 847</span> +<span class="normal"> 848</span> +<span class="normal"> 849</span> +<span class="normal"> 850</span> +<span class="normal"> 851</span> +<span class="normal"> 852</span> +<span class="normal"> 853</span> +<span class="normal"> 854</span> +<span class="normal"> 855</span> +<span class="normal"> 856</span> +<span class="normal"> 857</span> +<span class="normal"> 858</span> +<span class="normal"> 859</span> +<span class="normal"> 860</span> +<span class="normal"> 861</span> +<span class="normal"> 862</span> +<span class="normal"> 863</span> +<span class="normal"> 864</span> +<span class="normal"> 865</span> +<span class="normal"> 866</span> +<span class="normal"> 867</span> +<span class="normal"> 868</span> +<span class="normal"> 869</span> +<span class="normal"> 870</span> +<span class="normal"> 871</span> +<span class="normal"> 872</span> +<span class="normal"> 873</span> +<span class="normal"> 874</span> +<span class="normal"> 875</span> +<span class="normal"> 876</span> +<span class="normal"> 877</span> +<span class="normal"> 878</span> +<span class="normal"> 879</span> +<span class="normal"> 880</span> +<span class="normal"> 881</span> +<span class="normal"> 882</span> +<span class="normal"> 883</span> +<span class="normal"> 884</span> +<span class="normal"> 885</span> +<span class="normal"> 886</span> +<span class="normal"> 887</span> +<span class="normal"> 888</span> +<span class="normal"> 889</span> +<span class="normal"> 890</span> +<span class="normal"> 891</span> +<span class="normal"> 892</span> +<span class="normal"> 893</span> +<span class="normal"> 894</span> +<span class="normal"> 895</span> +<span class="normal"> 896</span> +<span class="normal"> 897</span> +<span class="normal"> 898</span> +<span class="normal"> 899</span> +<span class="normal"> 900</span> +<span class="normal"> 901</span> +<span class="normal"> 902</span> +<span class="normal"> 903</span> +<span class="normal"> 904</span> +<span class="normal"> 905</span> +<span class="normal"> 906</span> +<span class="normal"> 907</span> +<span class="normal"> 908</span> +<span class="normal"> 909</span> +<span class="normal"> 910</span> +<span class="normal"> 911</span> +<span class="normal"> 912</span> +<span class="normal"> 913</span> +<span class="normal"> 914</span> +<span class="normal"> 915</span> +<span class="normal"> 916</span> +<span class="normal"> 917</span> +<span class="normal"> 918</span> +<span class="normal"> 919</span> +<span class="normal"> 920</span> +<span class="normal"> 921</span> +<span class="normal"> 922</span> +<span class="normal"> 923</span> +<span class="normal"> 924</span> +<span class="normal"> 925</span> +<span class="normal"> 926</span> +<span class="normal"> 927</span> +<span class="normal"> 928</span> +<span class="normal"> 929</span> +<span class="normal"> 930</span> +<span class="normal"> 931</span> +<span class="normal"> 932</span> +<span class="normal"> 933</span> +<span class="normal"> 934</span> +<span class="normal"> 935</span> +<span class="normal"> 936</span> +<span class="normal"> 937</span> +<span class="normal"> 938</span> +<span class="normal"> 939</span> +<span class="normal"> 940</span> +<span class="normal"> 941</span> +<span class="normal"> 942</span> +<span class="normal"> 943</span> +<span class="normal"> 944</span> +<span class="normal"> 945</span> +<span class="normal"> 946</span> +<span class="normal"> 947</span> +<span class="normal"> 948</span> +<span class="normal"> 949</span> +<span class="normal"> 950</span> +<span class="normal"> 951</span> +<span class="normal"> 952</span> +<span class="normal"> 953</span> +<span class="normal"> 954</span> +<span class="normal"> 955</span> +<span class="normal"> 956</span> +<span class="normal"> 957</span> +<span class="normal"> 958</span> +<span class="normal"> 959</span> +<span class="normal"> 960</span> +<span class="normal"> 961</span> +<span class="normal"> 962</span> +<span class="normal"> 963</span> +<span class="normal"> 964</span> +<span class="normal"> 965</span> +<span class="normal"> 966</span> +<span class="normal"> 967</span> +<span class="normal"> 968</span> +<span class="normal"> 969</span> +<span class="normal"> 970</span> +<span class="normal"> 971</span> +<span class="normal"> 972</span> +<span class="normal"> 973</span> +<span class="normal"> 974</span> +<span class="normal"> 975</span> +<span class="normal"> 976</span> +<span class="normal"> 977</span> +<span class="normal"> 978</span> +<span class="normal"> 979</span> +<span class="normal"> 980</span> +<span class="normal"> 981</span> +<span class="normal"> 982</span> +<span class="normal"> 983</span> +<span class="normal"> 984</span> +<span class="normal"> 985</span> +<span class="normal"> 986</span> +<span class="normal"> 987</span> +<span class="normal"> 988</span> +<span class="normal"> 989</span> +<span class="normal"> 990</span> +<span class="normal"> 991</span> +<span class="normal"> 992</span> +<span class="normal"> 993</span> +<span class="normal"> 994</span> +<span class="normal"> 995</span> +<span class="normal"> 996</span> +<span class="normal"> 997</span> +<span class="normal"> 998</span> +<span class="normal"> 999</span> +<span class="normal">1000</span> +<span class="normal">1001</span> +<span class="normal">1002</span> +<span class="normal">1003</span> +<span class="normal">1004</span> +<span class="normal">1005</span> +<span class="normal">1006</span> +<span class="normal">1007</span> +<span class="normal">1008</span> +<span class="normal">1009</span> +<span class="normal">1010</span> +<span class="normal">1011</span> +<span class="normal">1012</span> +<span class="normal">1013</span> +<span class="normal">1014</span> +<span class="normal">1015</span> +<span class="normal">1016</span> +<span class="normal">1017</span> +<span class="normal">1018</span> +<span class="normal">1019</span> +<span class="normal">1020</span> +<span class="normal">1021</span> +<span class="normal">1022</span> +<span class="normal">1023</span> +<span class="normal">1024</span> +<span class="normal">1025</span> +<span class="normal">1026</span> +<span class="normal">1027</span> +<span class="normal">1028</span> +<span class="normal">1029</span> +<span class="normal">1030</span> +<span class="normal">1031</span> +<span class="normal">1032</span> +<span class="normal">1033</span> +<span class="normal">1034</span> +<span class="normal">1035</span> +<span class="normal">1036</span> +<span class="normal">1037</span> +<span class="normal">1038</span> +<span class="normal">1039</span> +<span class="normal">1040</span> +<span class="normal">1041</span> +<span class="normal">1042</span> +<span class="normal">1043</span> +<span class="normal">1044</span> +<span class="normal">1045</span> +<span class="normal">1046</span> +<span class="normal">1047</span> +<span class="normal">1048</span> +<span class="normal">1049</span> +<span class="normal">1050</span> +<span class="normal">1051</span> +<span class="normal">1052</span> +<span class="normal">1053</span> +<span class="normal">1054</span> +<span class="normal">1055</span> +<span class="normal">1056</span> +<span class="normal">1057</span> +<span class="normal">1058</span> +<span class="normal">1059</span> +<span class="normal">1060</span> +<span class="normal">1061</span> +<span class="normal">1062</span> +<span class="normal">1063</span> +<span class="normal">1064</span> +<span class="normal">1065</span> +<span class="normal">1066</span> +<span class="normal">1067</span> +<span class="normal">1068</span> +<span class="normal">1069</span> +<span class="normal">1070</span> +<span class="normal">1071</span> +<span class="normal">1072</span> +<span class="normal">1073</span> +<span class="normal">1074</span> +<span class="normal">1075</span> +<span class="normal">1076</span> +<span class="normal">1077</span> +<span class="normal">1078</span> +<span class="normal">1079</span> +<span class="normal">1080</span> +<span class="normal">1081</span> +<span class="normal">1082</span> +<span class="normal">1083</span> +<span class="normal">1084</span> +<span class="normal">1085</span> +<span class="normal">1086</span> +<span class="normal">1087</span> +<span class="normal">1088</span> +<span class="normal">1089</span> +<span class="normal">1090</span> +<span class="normal">1091</span> +<span class="normal">1092</span> +<span class="normal">1093</span> +<span class="normal">1094</span> +<span class="normal">1095</span> +<span class="normal">1096</span> +<span class="normal">1097</span> +<span class="normal">1098</span> +<span class="normal">1099</span> +<span class="normal">1100</span> +<span class="normal">1101</span> +<span class="normal">1102</span> +<span class="normal">1103</span> +<span class="normal">1104</span> +<span class="normal">1105</span> +<span class="normal">1106</span> +<span class="normal">1107</span> +<span class="normal">1108</span> +<span class="normal">1109</span> +<span class="normal">1110</span> +<span class="normal">1111</span> +<span class="normal">1112</span> +<span class="normal">1113</span> +<span class="normal">1114</span> +<span class="normal">1115</span> +<span class="normal">1116</span> +<span class="normal">1117</span> +<span class="normal">1118</span> +<span class="normal">1119</span> +<span class="normal">1120</span> +<span class="normal">1121</span> +<span class="normal">1122</span> +<span class="normal">1123</span> +<span class="normal">1124</span> +<span class="normal">1125</span> +<span class="normal">1126</span> +<span class="normal">1127</span> +<span class="normal">1128</span> +<span class="normal">1129</span> +<span class="normal">1130</span> +<span class="normal">1131</span> +<span class="normal">1132</span> +<span class="normal">1133</span> +<span class="normal">1134</span> +<span class="normal">1135</span> +<span class="normal">1136</span> +<span class="normal">1137</span> +<span class="normal">1138</span> +<span class="normal">1139</span> +<span class="normal">1140</span> +<span class="normal">1141</span> +<span class="normal">1142</span> +<span class="normal">1143</span> +<span class="normal">1144</span> +<span class="normal">1145</span> +<span class="normal">1146</span> +<span class="normal">1147</span> +<span class="normal">1148</span> +<span class="normal">1149</span> +<span class="normal">1150</span> +<span class="normal">1151</span> +<span class="normal">1152</span> +<span class="normal">1153</span> +<span class="normal">1154</span> +<span class="normal">1155</span> +<span class="normal">1156</span> +<span class="normal">1157</span> +<span class="normal">1158</span> +<span class="normal">1159</span> +<span class="normal">1160</span> +<span class="normal">1161</span> +<span class="normal">1162</span> +<span class="normal">1163</span> +<span class="normal">1164</span> +<span class="normal">1165</span> +<span class="normal">1166</span> +<span class="normal">1167</span> +<span class="normal">1168</span> +<span class="normal">1169</span> +<span class="normal">1170</span> +<span class="normal">1171</span> +<span class="normal">1172</span> +<span class="normal">1173</span> +<span class="normal">1174</span> +<span class="normal">1175</span> +<span class="normal">1176</span> +<span class="normal">1177</span> +<span class="normal">1178</span> +<span class="normal">1179</span> +<span class="normal">1180</span> +<span class="normal">1181</span> +<span class="normal">1182</span> +<span class="normal">1183</span> +<span class="normal">1184</span> +<span class="normal">1185</span> +<span class="normal">1186</span> +<span class="normal">1187</span> +<span class="normal">1188</span> +<span class="normal">1189</span> +<span class="normal">1190</span> +<span class="normal">1191</span> +<span class="normal">1192</span> +<span class="normal">1193</span> +<span class="normal">1194</span> +<span class="normal">1195</span> +<span class="normal">1196</span> +<span class="normal">1197</span> +<span class="normal">1198</span> +<span class="normal">1199</span> +<span class="normal">1200</span> +<span class="normal">1201</span> +<span class="normal">1202</span> +<span class="normal">1203</span> +<span class="normal">1204</span> +<span class="normal">1205</span> +<span class="normal">1206</span> +<span class="normal">1207</span> +<span class="normal">1208</span> +<span class="normal">1209</span> +<span class="normal">1210</span> +<span class="normal">1211</span> +<span class="normal">1212</span> +<span class="normal">1213</span> +<span class="normal">1214</span> +<span class="normal">1215</span> +<span class="normal">1216</span> +<span class="normal">1217</span> +<span class="normal">1218</span> +<span class="normal">1219</span> +<span class="normal">1220</span> +<span class="normal">1221</span> +<span class="normal">1222</span> +<span class="normal">1223</span> +<span class="normal">1224</span> +<span class="normal">1225</span> +<span class="normal">1226</span> +<span class="normal">1227</span> +<span class="normal">1228</span> +<span class="normal">1229</span> +<span class="normal">1230</span> +<span class="normal">1231</span> +<span class="normal">1232</span> +<span class="normal">1233</span> +<span class="normal">1234</span> +<span class="normal">1235</span> +<span class="normal">1236</span> +<span class="normal">1237</span> +<span class="normal">1238</span> +<span class="normal">1239</span> +<span class="normal">1240</span> +<span class="normal">1241</span> +<span class="normal">1242</span> +<span class="normal">1243</span> +<span class="normal">1244</span> +<span class="normal">1245</span> +<span class="normal">1246</span> +<span class="normal">1247</span> +<span class="normal">1248</span> +<span class="normal">1249</span> +<span class="normal">1250</span> +<span class="normal">1251</span> +<span class="normal">1252</span> +<span class="normal">1253</span> +<span class="normal">1254</span> +<span class="normal">1255</span> +<span class="normal">1256</span> +<span class="normal">1257</span> +<span class="normal">1258</span> +<span class="normal">1259</span> +<span class="normal">1260</span> +<span class="normal">1261</span> +<span class="normal">1262</span> +<span class="normal">1263</span> +<span class="normal">1264</span> +<span class="normal">1265</span> +<span class="normal">1266</span> +<span class="normal">1267</span> +<span class="normal">1268</span> +<span class="normal">1269</span> +<span class="normal">1270</span> +<span class="normal">1271</span> +<span class="normal">1272</span> +<span class="normal">1273</span> +<span class="normal">1274</span> +<span class="normal">1275</span> +<span class="normal">1276</span> +<span class="normal">1277</span> +<span class="normal">1278</span> +<span class="normal">1279</span> +<span class="normal">1280</span> +<span class="normal">1281</span> +<span class="normal">1282</span> +<span class="normal">1283</span> +<span class="normal">1284</span> +<span class="normal">1285</span> +<span class="normal">1286</span> +<span class="normal">1287</span> +<span class="normal">1288</span> +<span class="normal">1289</span> +<span class="normal">1290</span> +<span class="normal">1291</span> +<span class="normal">1292</span> +<span class="normal">1293</span> +<span class="normal">1294</span> +<span class="normal">1295</span> +<span class="normal">1296</span> +<span class="normal">1297</span> +<span class="normal">1298</span> +<span class="normal">1299</span> +<span class="normal">1300</span> +<span class="normal">1301</span> +<span class="normal">1302</span> +<span class="normal">1303</span> +<span class="normal">1304</span> +<span class="normal">1305</span> +<span class="normal">1306</span> +<span class="normal">1307</span> +<span class="normal">1308</span> +<span class="normal">1309</span> +<span class="normal">1310</span> +<span class="normal">1311</span> +<span class="normal">1312</span> +<span class="normal">1313</span> +<span class="normal">1314</span> +<span class="normal">1315</span> +<span class="normal">1316</span> +<span class="normal">1317</span> +<span class="normal">1318</span> +<span class="normal">1319</span> +<span class="normal">1320</span> +<span class="normal">1321</span> +<span class="normal">1322</span> +<span class="normal">1323</span> +<span class="normal">1324</span> +<span class="normal">1325</span> +<span class="normal">1326</span> +<span class="normal">1327</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]></span> +<a id="line-2" name="line-2"></a><span class="cm"> * Copyright (C) 2012-2021 MATE Developers</span> +<a id="line-3" name="line-3"></a><span class="cm"> *</span> +<a id="line-4" name="line-4"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-7" name="line-7"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-8" name="line-8"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-9" name="line-9"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-10" name="line-10"></a><span class="cm"> *</span> +<a id="line-11" name="line-11"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-12" name="line-12"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-14" name="line-14"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-15" name="line-15"></a><span class="cm"> *</span> +<a id="line-16" name="line-16"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-17" name="line-17"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-18" name="line-18"></a><span class="cm"> */</span> +<a id="line-19" name="line-19"></a> +<a id="line-20" name="line-20"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-21" name="line-21"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-22" name="line-22"></a><span class="cp">#endif</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-26" name="line-26"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gio/gio.h></span> +<a id="line-27" name="line-27"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glibtop.h></span> +<a id="line-28" name="line-28"></a> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab.h"</span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-scan.h"</span> +<a id="line-31" name="line-31"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-treeview.h"</span> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-utils.h"</span> +<a id="line-33" name="line-33"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"callbacks.h"</span> +<a id="line-34" name="line-34"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-prefs.h"</span> +<a id="line-35" name="line-35"></a> +<a id="line-36" name="line-36"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-treemap.h"</span> +<a id="line-37" name="line-37"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"baobab-ringschart.h"</span> +<a id="line-38" name="line-38"></a> +<a id="line-39" name="line-39"></a><span class="cp">#define BAOBAB_UI_RESOURCE "/org/mate/disk-usage-analyzer/baobab-main-window.ui"</span> +<a id="line-40" name="line-40"></a><span class="cp">#define GET_WIDGET(x) (GTK_WIDGET (gtk_builder_get_object (baobab.main_ui, (x))))</span> +<a id="line-41" name="line-41"></a><span class="cp">#define GET_ACTION(x) (GTK_ACTION (gtk_builder_get_object (baobab.main_ui, (x))))</span> +<a id="line-42" name="line-42"></a><span class="cp">#define GET_TOGGLE_ACTION(x) (GTK_TOGGLE_ACTION (gtk_builder_get_object (baobab.main_ui, (x))))</span> +<a id="line-43" name="line-43"></a> +<a id="line-44" name="line-44"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">push_iter_in_stack</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="p">);</span> +<a id="line-45" name="line-45"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="nf">pop_iter_from_stack</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> +<a id="line-46" name="line-46"></a> +<a id="line-47" name="line-47"></a><span class="n">BaobabApplication</span><span class="w"> </span><span class="n">baobab</span><span class="p">;</span> +<a id="line-48" name="line-48"></a> +<a id="line-49" name="line-49"></a><span class="k">static</span><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">currentdepth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-50" name="line-50"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">currentiter</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">firstiter</span><span class="p">;</span> +<a id="line-52" name="line-52"></a><span class="k">static</span><span class="w"> </span><span class="n">GQueue</span><span class="w"> </span><span class="o">*</span><span class="n">iterstack</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-53" name="line-53"></a> +<a id="line-54" name="line-54"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-55" name="line-55"></a><span class="w"> </span><span class="n">DND_TARGET_URI_LIST</span> +<a id="line-56" name="line-56"></a><span class="p">};</span> +<a id="line-57" name="line-57"></a> +<a id="line-58" name="line-58"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkTargetEntry</span><span class="w"> </span><span class="n">dnd_target_list</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"text/uri-list"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">DND_TARGET_URI_LIST</span><span class="w"> </span><span class="p">},</span> +<a id="line-60" name="line-60"></a><span class="p">};</span> +<a id="line-61" name="line-61"></a> +<a id="line-62" name="line-62"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-63" name="line-63"></a><span class="nf">scan_is_local</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-64" name="line-64"></a><span class="p">{</span> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">uri_scheme</span><span class="p">;</span> +<a id="line-66" name="line-66"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-67" name="line-67"></a> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="n">uri_scheme</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_uri_scheme</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_ascii_strcasecmp</span><span class="p">(</span><span class="n">uri_scheme</span><span class="p">,</span><span class="s">"file"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-71" name="line-71"></a> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">uri_scheme</span><span class="p">);</span> +<a id="line-73" name="line-73"></a> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-75" name="line-75"></a><span class="p">}</span> +<a id="line-76" name="line-76"></a> +<a id="line-77" name="line-77"></a><span class="kt">void</span> +<a id="line-78" name="line-78"></a><span class="nf">baobab_set_busy</span><span class="w"> </span><span class="p">(</span><span class="n">gboolean</span><span class="w"> </span><span class="n">busy</span><span class="p">)</span> +<a id="line-79" name="line-79"></a><span class="p">{</span> +<a id="line-80" name="line-80"></a><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">GdkCursor</span><span class="w"> </span><span class="o">*</span><span class="n">busy_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-81" name="line-81"></a><span class="w"> </span><span class="n">GdkCursor</span><span class="w"> </span><span class="o">*</span><span class="n">cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">GdkWindow</span><span class="w"> </span><span class="o">*</span><span class="n">window</span><span class="p">;</span> +<a id="line-83" name="line-83"></a><span class="hll"><span class="w"> </span><span class="n">GdkDisplay</span><span class="w"> </span><span class="o">*</span><span class="n">display</span><span class="p">;</span><div class="verbose expandable"><span class="error2"><--- The scope of the variable 'display' can be reduced. <span class="marker">[+]</span></span><div class="content">The scope of the variable 'display' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: +void f(int x) +{ + int i = 0; + if (x) { + // it's safe to move 'int i = 0;' here + for (int n = 0; n < 10; ++n) { + // it is possible but not safe to move 'int i = 0;' here + do_something(&i); + } + } +} +When you see this message it is always safe to reduce the variable scope 1 level.</div></div> +</span><a id="line-84" name="line-84"></a> +<a id="line-85" name="line-85"></a><span class="w"> </span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_window</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">window</span><span class="p">);</span> +<a id="line-86" name="line-86"></a> +<a id="line-87" name="line-87"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">busy</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">TRUE</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">busy_cursor</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">window</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-89" name="line-89"></a><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_widget_get_display</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">window</span><span class="p">);</span> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">busy_cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gdk_cursor_new_for_display</span><span class="w"> </span><span class="p">(</span><span class="n">display</span><span class="p">,</span><span class="w"> </span><span class="n">GDK_WATCH</span><span class="p">);</span> +<a id="line-91" name="line-91"></a><span class="w"> </span><span class="p">}</span> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="n">cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">busy_cursor</span><span class="p">;</span> +<a id="line-93" name="line-93"></a> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">spinner</span><span class="p">);</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="n">gtk_spinner_start</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SPINNER</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">spinner</span><span class="p">));</span> +<a id="line-96" name="line-96"></a> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">baobab_chart_freeze_updates</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">);</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="n">baobab_chart_freeze_updates</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">);</span> +<a id="line-99" name="line-99"></a> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="p">}</span> +<a id="line-102" name="line-102"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-103" name="line-103"></a><span class="w"> </span><span class="n">gtk_widget_hide</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">spinner</span><span class="p">);</span> +<a id="line-104" name="line-104"></a><span class="w"> </span><span class="n">gtk_spinner_stop</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SPINNER</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">spinner</span><span class="p">));</span> +<a id="line-105" name="line-105"></a> +<a id="line-106" name="line-106"></a><span class="w"> </span><span class="n">baobab_chart_thaw_updates</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">);</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">baobab_chart_thaw_updates</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">);</span> +<a id="line-108" name="line-108"></a> +<a id="line-109" name="line-109"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="p">}</span> +<a id="line-111" name="line-111"></a> +<a id="line-112" name="line-112"></a><span class="w"> </span><span class="cm">/* change the cursor */</span> +<a id="line-113" name="line-113"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-114" name="line-114"></a><span class="w"> </span><span class="n">gdk_window_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">window</span><span class="p">,</span><span class="w"> </span><span class="n">cursor</span><span class="p">);</span> +<a id="line-115" name="line-115"></a><span class="w"> </span><span class="p">}</span> +<a id="line-116" name="line-116"></a><span class="p">}</span> +<a id="line-117" name="line-117"></a> +<a id="line-118" name="line-118"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-119" name="line-119"></a><span class="nf">set_drop_target</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">target</span><span class="p">,</span><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">active</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-121" name="line-121"></a><span class="w"> </span><span class="n">gtk_drag_dest_set</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">target</span><span class="p">),</span> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="n">GTK_DEST_DEFAULT_DROP</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GTK_DEST_DEFAULT_MOTION</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">GTK_DEST_DEFAULT_HIGHLIGHT</span><span class="p">,</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="n">dnd_target_list</span><span class="p">,</span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">G_N_ELEMENTS</span><span class="w"> </span><span class="p">(</span><span class="n">dnd_target_list</span><span class="p">),</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">GDK_ACTION_COPY</span><span class="p">);</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-127" name="line-127"></a><span class="w"> </span><span class="n">gtk_drag_dest_unset</span><span class="w"> </span><span class="p">(</span><span class="n">target</span><span class="p">);</span> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="p">}</span> +<a id="line-129" name="line-129"></a><span class="p">}</span> +<a id="line-130" name="line-130"></a> +<a id="line-131" name="line-131"></a><span class="cm">/* menu & toolbar sensitivity */</span> +<a id="line-132" name="line-132"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-133" name="line-133"></a><span class="nf">check_menu_sens</span><span class="w"> </span><span class="p">(</span><span class="n">gboolean</span><span class="w"> </span><span class="n">scanning</span><span class="p">)</span> +<a id="line-134" name="line-134"></a><span class="p">{</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">has_current_location</span><span class="p">;</span> +<a id="line-136" name="line-136"></a> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">scanning</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-140" name="line-140"></a> +<a id="line-141" name="line-141"></a><span class="w"> </span><span class="n">baobab_set_statusbar</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Scanning..."</span><span class="p">));</span> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"expand_all"</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"collapse_all"</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="p">}</span> +<a id="line-145" name="line-145"></a> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="n">has_current_location</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">current_location</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-147" name="line-147"></a> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"menuscanhome"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"menuallfs"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-150" name="line-150"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"menuscandir"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"menustop"</span><span class="p">),</span><span class="w"> </span><span class="n">scanning</span><span class="p">);</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"menurescan"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">has_current_location</span><span class="p">);</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"preferenze1"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"menu_scan_rem"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"ck_allocated"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">is_local</span><span class="p">);</span> +<a id="line-156" name="line-156"></a> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"tbscanhome"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"tbscanall"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"tbscandir"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"tbstop"</span><span class="p">),</span><span class="w"> </span><span class="n">scanning</span><span class="p">);</span> +<a id="line-161" name="line-161"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"tbrescan"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">has_current_location</span><span class="p">);</span> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"tb_scan_remote"</span><span class="p">),</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-163" name="line-163"></a><span class="p">}</span> +<a id="line-164" name="line-164"></a> +<a id="line-165" name="line-165"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-166" name="line-166"></a><span class="nf">check_drop_targets</span><span class="w"> </span><span class="p">(</span><span class="n">gboolean</span><span class="w"> </span><span class="n">scanning</span><span class="p">)</span> +<a id="line-167" name="line-167"></a><span class="p">{</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">set_drop_target</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">,</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-169" name="line-169"></a><span class="w"> </span><span class="n">set_drop_target</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">,</span><span class="w"> </span><span class="o">!</span><span class="n">scanning</span><span class="p">);</span> +<a id="line-170" name="line-170"></a><span class="p">}</span> +<a id="line-171" name="line-171"></a> +<a id="line-172" name="line-172"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-173" name="line-173"></a><span class="nf">update_scan_label</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-174" name="line-174"></a><span class="p">{</span> +<a id="line-175" name="line-175"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">markup</span><span class="p">;</span> +<a id="line-176" name="line-176"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">total</span><span class="p">;</span> +<a id="line-177" name="line-177"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">used</span><span class="p">;</span> +<a id="line-178" name="line-178"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">available</span><span class="p">;</span> +<a id="line-179" name="line-179"></a> +<a id="line-180" name="line-180"></a><span class="w"> </span><span class="n">total</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">total</span><span class="p">);</span> +<a id="line-181" name="line-181"></a><span class="w"> </span><span class="n">used</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">used</span><span class="p">);</span> +<a id="line-182" name="line-182"></a><span class="w"> </span><span class="n">available</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">avail</span><span class="p">);</span> +<a id="line-183" name="line-183"></a> +<a id="line-184" name="line-184"></a><span class="w"> </span><span class="cm">/* Translators: these are labels for disk space */</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">markup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_markup_printf_escaped</span><span class="w"> </span><span class="p">(</span><span class="s">"<small>%s <b>%s</b> (%s %s %s %s)</small>"</span><span class="p">,</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Total filesystem capacity:"</span><span class="p">),</span><span class="w"> </span><span class="n">total</span><span class="p">,</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"used:"</span><span class="p">),</span><span class="w"> </span><span class="n">used</span><span class="p">,</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"available:"</span><span class="p">),</span><span class="w"> </span><span class="n">available</span><span class="p">);</span> +<a id="line-189" name="line-189"></a> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">total</span><span class="p">);</span> +<a id="line-191" name="line-191"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">used</span><span class="p">);</span> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">available</span><span class="p">);</span> +<a id="line-193" name="line-193"></a> +<a id="line-194" name="line-194"></a><span class="w"> </span><span class="n">gtk_label_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"label1"</span><span class="p">)),</span><span class="w"> </span><span class="n">markup</span><span class="p">);</span> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">markup</span><span class="p">);</span> +<a id="line-196" name="line-196"></a><span class="p">}</span> +<a id="line-197" name="line-197"></a> +<a id="line-198" name="line-198"></a><span class="kt">void</span> +<a id="line-199" name="line-199"></a><span class="nf">baobab_update_filesystem</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-200" name="line-200"></a><span class="p">{</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="n">baobab_get_filesystem</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">);</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="n">update_scan_label</span><span class="w"> </span><span class="p">();</span> +<a id="line-203" name="line-203"></a><span class="p">}</span> +<a id="line-204" name="line-204"></a> +<a id="line-205" name="line-205"></a><span class="kt">void</span> +<a id="line-206" name="line-206"></a><span class="nf">baobab_scan_location</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-207" name="line-207"></a><span class="p">{</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="n">GtkToggleAction</span><span class="w"> </span><span class="o">*</span><span class="n">ck_allocated</span><span class="p">;</span> +<a id="line-209" name="line-209"></a> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">baobab_check_dir</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">))</span> +<a id="line-211" name="line-211"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">iterstack</span><span class="w"> </span><span class="o">!=</span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-214" name="line-214"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-215" name="line-215"></a> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_location</span><span class="p">)</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_location</span><span class="p">);</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">current_location</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-219" name="line-219"></a> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">STOP_SCANNING</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">baobab_set_busy</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">check_menu_sens</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">check_drop_targets</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">gtk_tree_store_clear</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">);</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">currentdepth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span><span class="w"> </span><span class="cm">/* flag */</span> +<a id="line-226" name="line-226"></a><span class="w"> </span><span class="n">iterstack</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_queue_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-227" name="line-227"></a> +<a id="line-228" name="line-228"></a><span class="w"> </span><span class="cm">/* check if the file system is local or remote */</span> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">is_local</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scan_is_local</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">ck_allocated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_TOGGLE_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"ck_allocated"</span><span class="p">);</span> +<a id="line-231" name="line-231"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">baobab</span><span class="p">.</span><span class="n">is_local</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">gtk_toggle_action_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">ck_allocated</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">ck_allocated</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-234" name="line-234"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">show_allocated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="p">}</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ACTION</span><span class="w"> </span><span class="p">(</span><span class="n">ck_allocated</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-238" name="line-238"></a><span class="w"> </span><span class="p">}</span> +<a id="line-239" name="line-239"></a> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">baobab_scan_execute</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="cm">/* set statusbar, percentage and allocated/normal size */</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">baobab_set_statusbar</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Calculating percentage bars..."</span><span class="p">));</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="n">gtk_tree_model_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">),</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">show_bars</span><span class="p">,</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-247" name="line-247"></a> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">baobab_chart_set_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">model_max_depth</span><span class="p">);</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">baobab_chart_set_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">model_max_depth</span><span class="p">);</span> +<a id="line-250" name="line-250"></a> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="n">baobab_set_busy</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">check_menu_sens</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">check_drop_targets</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="n">baobab_set_statusbar</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Ready"</span><span class="p">));</span> +<a id="line-255" name="line-255"></a> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">gtk_tree_view_columns_autosize</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">tree_view</span><span class="p">));</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">STOP_SCANNING</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">g_queue_free</span><span class="w"> </span><span class="p">(</span><span class="n">iterstack</span><span class="p">);</span> +<a id="line-259" name="line-259"></a><span class="w"> </span><span class="n">iterstack</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">CONTENTS_CHANGED_DELAYED</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-261" name="line-261"></a><span class="p">}</span> +<a id="line-262" name="line-262"></a> +<a id="line-263" name="line-263"></a><span class="kt">void</span> +<a id="line-264" name="line-264"></a><span class="nf">baobab_scan_home</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-265" name="line-265"></a><span class="p">{</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-267" name="line-267"></a> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_home_dir</span><span class="w"> </span><span class="p">());</span> +<a id="line-269" name="line-269"></a><span class="w"> </span><span class="n">baobab_scan_location</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-271" name="line-271"></a><span class="p">}</span> +<a id="line-272" name="line-272"></a> +<a id="line-273" name="line-273"></a><span class="kt">void</span> +<a id="line-274" name="line-274"></a><span class="nf">baobab_scan_root</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-275" name="line-275"></a><span class="p">{</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-277" name="line-277"></a> +<a id="line-278" name="line-278"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_uri</span><span class="w"> </span><span class="p">(</span><span class="s">"file:///"</span><span class="p">);</span> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">baobab_scan_location</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-281" name="line-281"></a><span class="p">}</span> +<a id="line-282" name="line-282"></a> +<a id="line-283" name="line-283"></a><span class="kt">void</span> +<a id="line-284" name="line-284"></a><span class="nf">baobab_rescan_current_dir</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-285" name="line-285"></a><span class="p">{</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_location</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-287" name="line-287"></a> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">baobab_update_filesystem</span><span class="w"> </span><span class="p">();</span> +<a id="line-289" name="line-289"></a> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_location</span><span class="p">);</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="n">baobab_scan_location</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_location</span><span class="p">);</span> +<a id="line-292" name="line-292"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_location</span><span class="p">);</span> +<a id="line-293" name="line-293"></a><span class="p">}</span> +<a id="line-294" name="line-294"></a> +<a id="line-295" name="line-295"></a><span class="kt">void</span> +<a id="line-296" name="line-296"></a><span class="nf">baobab_stop_scan</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-297" name="line-297"></a><span class="p">{</span> +<a id="line-298" name="line-298"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">STOP_SCANNING</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="w"> </span><span class="n">baobab_set_statusbar</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Calculating percentage bars..."</span><span class="p">));</span> +<a id="line-301" name="line-301"></a><span class="w"> </span><span class="n">gtk_tree_model_foreach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">),</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">show_bars</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-303" name="line-303"></a><span class="w"> </span><span class="n">gtk_tree_view_columns_autosize</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">tree_view</span><span class="p">));</span> +<a id="line-304" name="line-304"></a><span class="p">}</span> +<a id="line-305" name="line-305"></a> +<a id="line-306" name="line-306"></a><span class="cm">/*</span> +<a id="line-307" name="line-307"></a><span class="cm"> * pre-fills model during scanning</span> +<a id="line-308" name="line-308"></a><span class="cm"> */</span> +<a id="line-309" name="line-309"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-310" name="line-310"></a><span class="nf">prefill_model</span><span class="w"> </span><span class="p">(</span><span class="k">struct</span><span class="w"> </span><span class="nc">chan_data</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">)</span> +<a id="line-311" name="line-311"></a><span class="p">{</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">iterparent</span><span class="p">;</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">;</span> +<a id="line-315" name="line-315"></a> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">currentdepth</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="n">gtk_tree_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-318" name="line-318"></a><span class="w"> </span><span class="n">firstiter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="p">}</span> +<a id="line-320" name="line-320"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-321" name="line-321"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">;</span> +<a id="line-322" name="line-322"></a> +<a id="line-323" name="line-323"></a><span class="w"> </span><span class="n">gtk_tree_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">firstiter</span><span class="p">);</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">),</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="o">&</span><span class="n">firstiter</span><span class="p">);</span> +<a id="line-326" name="line-326"></a><span class="w"> </span><span class="n">gtk_tree_view_expand_row</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">tree_view</span><span class="p">),</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-329" name="line-329"></a><span class="w"> </span><span class="p">}</span> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">currentdepth</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="n">gtk_tree_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">currentiter</span><span class="p">);</span> +<a id="line-332" name="line-332"></a><span class="w"> </span><span class="p">}</span> +<a id="line-333" name="line-333"></a><span class="hll"><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">currentdepth</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="error2"><--- Assuming that condition 'data->depth==currentdepth' is not redundant</span> +</span><a id="line-334" name="line-334"></a><span class="w"> </span><span class="n">gtk_tree_model_iter_parent</span><span class="w"> </span><span class="p">((</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="o">&</span><span class="n">iterparent</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">currentiter</span><span class="p">);</span> +<a id="line-336" name="line-336"></a><span class="w"> </span><span class="n">gtk_tree_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iterparent</span><span class="p">);</span> +<a id="line-337" name="line-337"></a><span class="w"> </span><span class="p">}</span> +<a id="line-338" name="line-338"></a><span class="hll"><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">depth</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">currentdepth</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="error2"><--- Condition 'data->depth<currentdepth' is always true</span> +</span><a id="line-339" name="line-339"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">tempiter</span><span class="p">;</span> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">currentiter</span><span class="p">;</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="p">(</span><span class="n">currentdepth</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">depth</span><span class="p">);</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-343" name="line-343"></a><span class="w"> </span><span class="n">gtk_tree_model_iter_parent</span><span class="w"> </span><span class="p">((</span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="p">)</span> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="o">&</span><span class="n">tempiter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tempiter</span><span class="p">;</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="p">}</span> +<a id="line-348" name="line-348"></a><span class="w"> </span><span class="n">gtk_tree_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">tempiter</span><span class="p">);</span> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="p">}</span> +<a id="line-350" name="line-350"></a> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="n">currentdepth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">depth</span><span class="p">;</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">push_iter_in_stack</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="n">currentiter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-354" name="line-354"></a> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="cm">/* in case filenames contains gmarkup */</span> +<a id="line-356" name="line-356"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_markup_escape_text</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">display_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-357" name="line-357"></a> +<a id="line-358" name="line-358"></a><span class="w"> </span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup_printf</span><span class="w"> </span><span class="p">(</span><span class="s">"<small><i>%s</i></small>"</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Scanning..."</span><span class="p">));</span> +<a id="line-359" name="line-359"></a> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="n">gtk_tree_view_set_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-361" name="line-361"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">COL_DIR_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">,</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">COL_H_PARSENAME</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span> +<a id="line-364" name="line-364"></a><span class="w"> </span><span class="n">COL_H_ELEMENTS</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">COL_H_PERC</span><span class="p">,</span><span class="w"> </span><span class="mf">-1.0</span><span class="p">,</span> +<a id="line-366" name="line-366"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">str</span><span class="p">,</span> +<a id="line-367" name="line-367"></a><span class="w"> </span><span class="n">COL_ELEMENTS</span><span class="p">,</span><span class="w"> </span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-368" name="line-368"></a> +<a id="line-369" name="line-369"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-371" name="line-371"></a> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-374" name="line-374"></a><span class="w"> </span><span class="p">}</span> +<a id="line-375" name="line-375"></a><span class="p">}</span> +<a id="line-376" name="line-376"></a> +<a id="line-377" name="line-377"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-378" name="line-378"></a><span class="nf">first_row</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-379" name="line-379"></a><span class="p">{</span> +<a id="line-380" name="line-380"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">size</span><span class="p">;</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">gdouble</span><span class="w"> </span><span class="n">perc</span><span class="p">;</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="p">;</span> +<a id="line-383" name="line-383"></a> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">root_iter</span><span class="p">;</span> +<a id="line-385" name="line-385"></a> +<a id="line-386" name="line-386"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">capacity_label</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">capacity_size</span><span class="p">;</span> +<a id="line-387" name="line-387"></a> +<a id="line-388" name="line-388"></a><span class="w"> </span><span class="n">gtk_tree_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">root_iter</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-389" name="line-389"></a> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">capacity_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">total</span><span class="p">);</span> +<a id="line-391" name="line-391"></a> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">capacity_label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Total filesystem capacity"</span><span class="p">));</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">root_iter</span><span class="p">,</span> +<a id="line-394" name="line-394"></a><span class="w"> </span><span class="n">COL_DIR_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">capacity_label</span><span class="p">,</span> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">COL_H_PARSENAME</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span> +<a id="line-396" name="line-396"></a><span class="w"> </span><span class="n">COL_H_PERC</span><span class="p">,</span><span class="w"> </span><span class="mf">100.0</span><span class="p">,</span> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">capacity_size</span><span class="p">,</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">COL_H_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">total</span><span class="p">,</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">COL_H_ALLOCSIZE</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">total</span><span class="p">,</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">COL_H_ELEMENTS</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">capacity_label</span><span class="p">);</span> +<a id="line-402" name="line-402"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">capacity_size</span><span class="p">);</span> +<a id="line-403" name="line-403"></a> +<a id="line-404" name="line-404"></a><span class="w"> </span><span class="n">gtk_tree_view_set_headers_visible</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="n">gtk_tree_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">firstiter</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">root_iter</span><span class="p">);</span> +<a id="line-406" name="line-406"></a> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">used</span><span class="p">);</span> +<a id="line-408" name="line-408"></a> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">total</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">used</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="n">perc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">100.0</span><span class="p">;</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">g_assert</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">total</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">perc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">((</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">used</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="n">gdouble</span><span class="p">)</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">total</span><span class="p">;</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="p">}</span> +<a id="line-415" name="line-415"></a> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Total filesystem usage"</span><span class="p">));</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">firstiter</span><span class="p">,</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="n">COL_DIR_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">label</span><span class="p">,</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">COL_H_PARSENAME</span><span class="p">,</span><span class="w"> </span><span class="s">""</span><span class="p">,</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="n">COL_H_PERC</span><span class="p">,</span><span class="w"> </span><span class="n">perc</span><span class="p">,</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">,</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="n">COL_H_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">used</span><span class="p">,</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="n">COL_H_ALLOCSIZE</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">used</span><span class="p">,</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">COL_H_ELEMENTS</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-425" name="line-425"></a> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">size</span><span class="p">);</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">);</span> +<a id="line-428" name="line-428"></a> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">gtk_tree_view_expand_all</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">tree_view</span><span class="p">));</span> +<a id="line-430" name="line-430"></a><span class="p">}</span> +<a id="line-431" name="line-431"></a> +<a id="line-432" name="line-432"></a><span class="cm">/* fills model during scanning */</span> +<a id="line-433" name="line-433"></a><span class="kt">void</span> +<a id="line-434" name="line-434"></a><span class="nf">baobab_fill_model</span><span class="w"> </span><span class="p">(</span><span class="k">struct</span><span class="w"> </span><span class="nc">chan_data</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="p">)</span> +<a id="line-435" name="line-435"></a><span class="p">{</span> +<a id="line-436" name="line-436"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">hardlinks</span><span class="p">;</span> +<a id="line-438" name="line-438"></a><span class="w"> </span><span class="n">GString</span><span class="w"> </span><span class="o">*</span><span class="n">elements</span><span class="p">;</span> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span> +<a id="line-440" name="line-440"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">size</span><span class="p">;</span> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">alloc_size</span><span class="p">;</span> +<a id="line-442" name="line-442"></a> +<a id="line-443" name="line-443"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">elements</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="n">prefill_model</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="p">);</span> +<a id="line-445" name="line-445"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-446" name="line-446"></a><span class="w"> </span><span class="p">}</span> +<a id="line-447" name="line-447"></a> +<a id="line-448" name="line-448"></a><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pop_iter_from_stack</span><span class="w"> </span><span class="p">();</span> +<a id="line-449" name="line-449"></a> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="cm">/* in case filenames contains gmarkup */</span> +<a id="line-451" name="line-451"></a><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_markup_escape_text</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">display_name</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-452" name="line-452"></a> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">hardlinks</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-454" name="line-454"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">tempHLsize</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">tempHLsize</span><span class="p">);</span> +<a id="line-456" name="line-456"></a> +<a id="line-457" name="line-457"></a><span class="w"> </span><span class="n">g_string_assign</span><span class="w"> </span><span class="p">(</span><span class="n">hardlinks</span><span class="p">,</span><span class="w"> </span><span class="s">"<i>("</span><span class="p">);</span> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">hardlinks</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"contains hardlinks for:"</span><span class="p">));</span> +<a id="line-459" name="line-459"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">hardlinks</span><span class="p">,</span><span class="w"> </span><span class="s">" "</span><span class="p">);</span> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">hardlinks</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">);</span> +<a id="line-461" name="line-461"></a><span class="w"> </span><span class="n">g_string_append</span><span class="w"> </span><span class="p">(</span><span class="n">hardlinks</span><span class="p">,</span><span class="w"> </span><span class="s">")</i>"</span><span class="p">);</span> +<a id="line-462" name="line-462"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">size</span><span class="p">);</span> +<a id="line-463" name="line-463"></a><span class="w"> </span><span class="p">}</span> +<a id="line-464" name="line-464"></a> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="n">elements</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_string_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span> +<a id="line-466" name="line-466"></a><span class="w"> </span><span class="n">g_string_printf</span><span class="w"> </span><span class="p">(</span><span class="n">elements</span><span class="p">,</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="n">ngettext</span><span class="w"> </span><span class="p">(</span><span class="s">"%5d item"</span><span class="p">,</span><span class="w"> </span><span class="s">"%5d items"</span><span class="p">,</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">elements</span><span class="p">),</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">elements</span><span class="p">);</span> +<a id="line-469" name="line-469"></a> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">size</span><span class="p">);</span> +<a id="line-471" name="line-471"></a><span class="w"> </span><span class="n">alloc_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_format_size</span><span class="w"> </span><span class="p">(</span><span class="n">data</span><span class="o">-></span><span class="n">alloc_size</span><span class="p">);</span> +<a id="line-472" name="line-472"></a> +<a id="line-473" name="line-473"></a><span class="w"> </span><span class="n">gtk_tree_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-474" name="line-474"></a><span class="w"> </span><span class="n">COL_DIR_NAME</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="p">,</span> +<a id="line-475" name="line-475"></a><span class="w"> </span><span class="n">COL_H_PARSENAME</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">parse_name</span><span class="p">,</span> +<a id="line-476" name="line-476"></a><span class="w"> </span><span class="n">COL_H_PERC</span><span class="p">,</span><span class="w"> </span><span class="mf">-1.0</span><span class="p">,</span> +<a id="line-477" name="line-477"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">show_allocated</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">alloc_size</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">size</span><span class="p">,</span> +<a id="line-479" name="line-479"></a><span class="w"> </span><span class="n">COL_H_SIZE</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">size</span><span class="p">,</span> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="n">COL_ELEMENTS</span><span class="p">,</span><span class="w"> </span><span class="n">elements</span><span class="o">-></span><span class="n">str</span><span class="p">,</span> +<a id="line-481" name="line-481"></a><span class="w"> </span><span class="n">COL_H_ELEMENTS</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">elements</span><span class="p">,</span> +<a id="line-482" name="line-482"></a><span class="w"> </span><span class="n">COL_HARDLINK</span><span class="p">,</span><span class="w"> </span><span class="n">hardlinks</span><span class="o">-></span><span class="n">str</span><span class="p">,</span> +<a id="line-483" name="line-483"></a><span class="w"> </span><span class="n">COL_H_HARDLINK</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">tempHLsize</span><span class="p">,</span> +<a id="line-484" name="line-484"></a><span class="w"> </span><span class="n">COL_H_ALLOCSIZE</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="o">-></span><span class="n">alloc_size</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-485" name="line-485"></a> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span><span class="w"> </span><span class="p">{</span> +<a id="line-487" name="line-487"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="p">}</span> +<a id="line-489" name="line-489"></a> +<a id="line-490" name="line-490"></a><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">hardlinks</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-491" name="line-491"></a><span class="w"> </span><span class="n">g_string_free</span><span class="w"> </span><span class="p">(</span><span class="n">elements</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-492" name="line-492"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">);</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">size</span><span class="p">);</span> +<a id="line-494" name="line-494"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">alloc_size</span><span class="p">);</span> +<a id="line-495" name="line-495"></a><span class="p">}</span> +<a id="line-496" name="line-496"></a> +<a id="line-497" name="line-497"></a><span class="kt">void</span> +<a id="line-498" name="line-498"></a><span class="nf">push_iter_in_stack</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">)</span> +<a id="line-499" name="line-499"></a><span class="p">{</span> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="n">g_queue_push_head</span><span class="w"> </span><span class="p">(</span><span class="n">iterstack</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="o">-></span><span class="n">user_data3</span><span class="p">);</span> +<a id="line-501" name="line-501"></a><span class="w"> </span><span class="n">g_queue_push_head</span><span class="w"> </span><span class="p">(</span><span class="n">iterstack</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="o">-></span><span class="n">user_data2</span><span class="p">);</span> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="n">g_queue_push_head</span><span class="w"> </span><span class="p">(</span><span class="n">iterstack</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="o">-></span><span class="n">user_data</span><span class="p">);</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="n">g_queue_push_head</span><span class="w"> </span><span class="p">(</span><span class="n">iterstack</span><span class="p">,</span><span class="w"> </span><span class="n">GINT_TO_POINTER</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="o">-></span><span class="n">stamp</span><span class="p">));</span> +<a id="line-504" name="line-504"></a><span class="p">}</span> +<a id="line-505" name="line-505"></a> +<a id="line-506" name="line-506"></a><span class="n">GtkTreeIter</span> +<a id="line-507" name="line-507"></a><span class="nf">pop_iter_from_stack</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-508" name="line-508"></a><span class="p">{</span> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-510" name="line-510"></a> +<a id="line-511" name="line-511"></a><span class="w"> </span><span class="n">iter</span><span class="p">.</span><span class="n">stamp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GPOINTER_TO_INT</span><span class="w"> </span><span class="p">(</span><span class="n">g_queue_pop_head</span><span class="w"> </span><span class="p">(</span><span class="n">iterstack</span><span class="p">));</span> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="n">iter</span><span class="p">.</span><span class="n">user_data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_queue_pop_head</span><span class="w"> </span><span class="p">(</span><span class="n">iterstack</span><span class="p">);</span> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="n">iter</span><span class="p">.</span><span class="n">user_data2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_queue_pop_head</span><span class="w"> </span><span class="p">(</span><span class="n">iterstack</span><span class="p">);</span> +<a id="line-514" name="line-514"></a><span class="w"> </span><span class="n">iter</span><span class="p">.</span><span class="n">user_data3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_queue_pop_head</span><span class="w"> </span><span class="p">(</span><span class="n">iterstack</span><span class="p">);</span> +<a id="line-515" name="line-515"></a> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-517" name="line-517"></a><span class="p">}</span> +<a id="line-518" name="line-518"></a> +<a id="line-519" name="line-519"></a><span class="n">gboolean</span> +<a id="line-520" name="line-520"></a><span class="nf">baobab_is_excluded_location</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-521" name="line-521"></a><span class="p">{</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-523" name="line-523"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-524" name="line-524"></a> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-526" name="line-526"></a> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">excluded_locations</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-528" name="line-528"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_equal</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="n">file</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-531" name="line-531"></a><span class="w"> </span><span class="p">}</span> +<a id="line-532" name="line-532"></a><span class="w"> </span><span class="p">}</span> +<a id="line-533" name="line-533"></a> +<a id="line-534" name="line-534"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-535" name="line-535"></a><span class="p">}</span> +<a id="line-536" name="line-536"></a> +<a id="line-537" name="line-537"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-538" name="line-538"></a><span class="nf">volume_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GVolumeMonitor</span><span class="w"> </span><span class="o">*</span><span class="n">volume_monitor</span><span class="p">,</span> +<a id="line-539" name="line-539"></a><span class="w"> </span><span class="n">GVolume</span><span class="w"> </span><span class="o">*</span><span class="n">volume</span><span class="p">,</span> +<a id="line-540" name="line-540"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-541" name="line-541"></a><span class="p">{</span> +<a id="line-542" name="line-542"></a><span class="w"> </span><span class="cm">/* filesystem has changed (mounted or unmounted device) */</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="n">baobab_update_filesystem</span><span class="w"> </span><span class="p">();</span> +<a id="line-544" name="line-544"></a><span class="p">}</span> +<a id="line-545" name="line-545"></a> +<a id="line-546" name="line-546"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-547" name="line-547"></a><span class="nf">home_contents_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GFileMonitor</span><span class="w"> </span><span class="o">*</span><span class="n">file_monitor</span><span class="p">,</span> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">child</span><span class="p">,</span> +<a id="line-549" name="line-549"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">other_file</span><span class="p">,</span> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="n">GFileMonitorEvent</span><span class="w"> </span><span class="n">event_type</span><span class="p">,</span> +<a id="line-551" name="line-551"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-552" name="line-552"></a> +<a id="line-553" name="line-553"></a><span class="p">{</span> +<a id="line-554" name="line-554"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">excluding</span><span class="p">;</span> +<a id="line-555" name="line-555"></a> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">CONTENTS_CHANGED_DELAYED</span><span class="p">)</span> +<a id="line-557" name="line-557"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-558" name="line-558"></a> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="n">excluding</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_get_basename</span><span class="w"> </span><span class="p">(</span><span class="n">child</span><span class="p">);</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">excluding</span><span class="p">,</span><span class="w"> </span><span class="s">".recently-used"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">||</span> +<a id="line-561" name="line-561"></a><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">excluding</span><span class="p">,</span><span class="w"> </span><span class="s">".mate2_private"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">||</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">excluding</span><span class="p">,</span><span class="w"> </span><span class="s">".xsession-errors"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">||</span> +<a id="line-563" name="line-563"></a><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">excluding</span><span class="p">,</span><span class="w"> </span><span class="s">".bash_history"</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-564" name="line-564"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">excluding</span><span class="p">);</span> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-566" name="line-566"></a><span class="w"> </span><span class="p">}</span> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">excluding</span><span class="p">);</span> +<a id="line-568" name="line-568"></a> +<a id="line-569" name="line-569"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">CONTENTS_CHANGED_DELAYED</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-570" name="line-570"></a><span class="p">}</span> +<a id="line-571" name="line-571"></a> +<a id="line-572" name="line-572"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-573" name="line-573"></a><span class="nf">monitor_volume</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-574" name="line-574"></a><span class="p">{</span> +<a id="line-575" name="line-575"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_vol</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_volume_monitor_get</span><span class="w"> </span><span class="p">();</span> +<a id="line-576" name="line-576"></a> +<a id="line-577" name="line-577"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_vol</span><span class="p">,</span><span class="w"> </span><span class="s">"volume_changed"</span><span class="p">,</span> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">volume_changed</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-579" name="line-579"></a><span class="p">}</span> +<a id="line-580" name="line-580"></a> +<a id="line-581" name="line-581"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-582" name="line-582"></a><span class="nf">monitor_home</span><span class="w"> </span><span class="p">(</span><span class="n">gboolean</span><span class="w"> </span><span class="n">enable</span><span class="p">)</span> +<a id="line-583" name="line-583"></a><span class="p">{</span> +<a id="line-584" name="line-584"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">enable</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-585" name="line-585"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-586" name="line-586"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-587" name="line-587"></a> +<a id="line-588" name="line-588"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_path</span><span class="w"> </span><span class="p">(</span><span class="n">g_get_home_dir</span><span class="w"> </span><span class="p">());</span> +<a id="line-589" name="line-589"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_monitor_directory</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-590" name="line-590"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-591" name="line-591"></a> +<a id="line-592" name="line-592"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-593" name="line-593"></a><span class="w"> </span><span class="n">message</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Could not initialize monitoring"</span><span class="p">),</span> +<a id="line-594" name="line-594"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Changes to your home folder will not be monitored."</span><span class="p">),</span> +<a id="line-595" name="line-595"></a><span class="w"> </span><span class="n">GTK_MESSAGE_WARNING</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-596" name="line-596"></a><span class="w"> </span><span class="n">g_print</span><span class="w"> </span><span class="p">(</span><span class="s">"homedir:%s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-598" name="line-598"></a><span class="w"> </span><span class="p">}</span> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-600" name="line-600"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="p">,</span> +<a id="line-601" name="line-601"></a><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span> +<a id="line-602" name="line-602"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">home_contents_changed</span><span class="p">),</span> +<a id="line-603" name="line-603"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="p">}</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="p">}</span> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">enable</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">g_file_monitor_cancel</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="p">);</span> +<a id="line-608" name="line-608"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="p">);</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="p">}</span> +<a id="line-611" name="line-611"></a><span class="p">}</span> +<a id="line-612" name="line-612"></a> +<a id="line-613" name="line-613"></a><span class="kt">void</span> +<a id="line-614" name="line-614"></a><span class="nf">baobab_set_statusbar</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">)</span> +<a id="line-615" name="line-615"></a><span class="p">{</span> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="n">gtk_statusbar_pop</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">statusbar</span><span class="p">),</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="n">gtk_statusbar_push</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_STATUSBAR</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">statusbar</span><span class="p">),</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">);</span> +<a id="line-618" name="line-618"></a> +<a id="line-619" name="line-619"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_events_pending</span><span class="w"> </span><span class="p">())</span> +<a id="line-620" name="line-620"></a><span class="w"> </span><span class="n">gtk_main_iteration</span><span class="w"> </span><span class="p">();</span> +<a id="line-621" name="line-621"></a><span class="p">}</span> +<a id="line-622" name="line-622"></a> +<a id="line-623" name="line-623"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-624" name="line-624"></a><span class="nf">toolbar_reconfigured_cb</span><span class="w"> </span><span class="p">(</span><span class="n">GtkToolItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">,</span> +<a id="line-625" name="line-625"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">spinner</span><span class="p">)</span> +<a id="line-626" name="line-626"></a><span class="p">{</span> +<a id="line-627" name="line-627"></a><span class="w"> </span><span class="n">GtkToolbarStyle</span><span class="w"> </span><span class="n">style</span><span class="p">;</span> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="n">GtkIconSize</span><span class="w"> </span><span class="n">size</span><span class="p">;</span> +<a id="line-629" name="line-629"></a> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="n">style</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tool_item_get_toolbar_style</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">);</span> +<a id="line-631" name="line-631"></a> +<a id="line-632" name="line-632"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">style</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">GTK_TOOLBAR_BOTH</span><span class="p">)</span> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="p">{</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_DIALOG</span><span class="p">;</span> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="p">}</span> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="k">else</span> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="p">{</span> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_LARGE_TOOLBAR</span><span class="p">;</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="p">}</span> +<a id="line-640" name="line-640"></a> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="n">gtk_widget_set_size_request</span><span class="w"> </span><span class="p">(</span><span class="n">spinner</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">);</span> +<a id="line-642" name="line-642"></a><span class="p">}</span> +<a id="line-643" name="line-643"></a> +<a id="line-644" name="line-644"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-645" name="line-645"></a><span class="nf">baobab_create_toolbar</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-646" name="line-646"></a><span class="p">{</span> +<a id="line-647" name="line-647"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">toolbar</span><span class="p">;</span> +<a id="line-648" name="line-648"></a><span class="w"> </span><span class="n">GtkToolItem</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-649" name="line-649"></a><span class="w"> </span><span class="n">GtkToolItem</span><span class="w"> </span><span class="o">*</span><span class="n">separator</span><span class="p">;</span> +<a id="line-650" name="line-650"></a> +<a id="line-651" name="line-651"></a><span class="w"> </span><span class="n">toolbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"toolbar1"</span><span class="p">);</span> +<a id="line-652" name="line-652"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">toolbar</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-653" name="line-653"></a><span class="w"> </span><span class="n">g_printerr</span><span class="w"> </span><span class="p">(</span><span class="s">"Could not build toolbar</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> +<a id="line-654" name="line-654"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-655" name="line-655"></a><span class="w"> </span><span class="p">}</span> +<a id="line-656" name="line-656"></a> +<a id="line-657" name="line-657"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">toolbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">toolbar</span><span class="p">;</span> +<a id="line-658" name="line-658"></a> +<a id="line-659" name="line-659"></a><span class="w"> </span><span class="n">separator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_separator_tool_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-660" name="line-660"></a><span class="w"> </span><span class="n">gtk_separator_tool_item_set_draw</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_SEPARATOR_TOOL_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">separator</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-661" name="line-661"></a><span class="w"> </span><span class="n">gtk_tool_item_set_expand</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TOOL_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">separator</span><span class="p">),</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-662" name="line-662"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">toolbar</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">separator</span><span class="p">));</span> +<a id="line-663" name="line-663"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">separator</span><span class="p">));</span> +<a id="line-664" name="line-664"></a> +<a id="line-665" name="line-665"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">spinner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_spinner_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-666" name="line-666"></a><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tool_item_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-667" name="line-667"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">),</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">spinner</span><span class="p">);</span> +<a id="line-668" name="line-668"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">toolbar</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">));</span> +<a id="line-669" name="line-669"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">));</span> +<a id="line-670" name="line-670"></a> +<a id="line-671" name="line-671"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="s">"toolbar-reconfigured"</span><span class="p">,</span> +<a id="line-672" name="line-672"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">toolbar_reconfigured_cb</span><span class="p">),</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">spinner</span><span class="p">);</span> +<a id="line-673" name="line-673"></a><span class="w"> </span><span class="n">toolbar_reconfigured_cb</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">spinner</span><span class="p">);</span> +<a id="line-674" name="line-674"></a> +<a id="line-675" name="line-675"></a><span class="w"> </span><span class="n">g_settings_bind</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="p">,</span> +<a id="line-676" name="line-676"></a><span class="w"> </span><span class="n">BAOBAB_SETTINGS_TOOLBAR_VISIBLE</span><span class="p">,</span> +<a id="line-677" name="line-677"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">toolbar</span><span class="p">,</span><span class="w"> </span><span class="s">"visible"</span><span class="p">,</span> +<a id="line-678" name="line-678"></a><span class="w"> </span><span class="n">G_SETTINGS_BIND_DEFAULT</span><span class="p">);</span> +<a id="line-679" name="line-679"></a><span class="w"> </span><span class="n">g_settings_bind</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="p">,</span> +<a id="line-680" name="line-680"></a><span class="w"> </span><span class="n">BAOBAB_SETTINGS_TOOLBAR_VISIBLE</span><span class="p">,</span> +<a id="line-681" name="line-681"></a><span class="w"> </span><span class="n">GET_TOGGLE_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"view_tb"</span><span class="p">),</span><span class="w"> </span><span class="s">"active"</span><span class="p">,</span> +<a id="line-682" name="line-682"></a><span class="w"> </span><span class="n">G_SETTINGS_BIND_DEFAULT</span><span class="p">);</span> +<a id="line-683" name="line-683"></a> +<a id="line-684" name="line-684"></a><span class="p">}</span> +<a id="line-685" name="line-685"></a> +<a id="line-686" name="line-686"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-687" name="line-687"></a><span class="nf">baobab_create_statusbar</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-688" name="line-688"></a><span class="p">{</span> +<a id="line-689" name="line-689"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">statusbar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"statusbar1"</span><span class="p">);</span> +<a id="line-690" name="line-690"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">statusbar</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-691" name="line-691"></a><span class="w"> </span><span class="n">g_printerr</span><span class="w"> </span><span class="p">(</span><span class="s">"Could not build statusbar</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> +<a id="line-692" name="line-692"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-693" name="line-693"></a><span class="w"> </span><span class="p">}</span> +<a id="line-694" name="line-694"></a> +<a id="line-695" name="line-695"></a><span class="w"> </span><span class="n">g_settings_bind</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="p">,</span> +<a id="line-696" name="line-696"></a><span class="w"> </span><span class="n">BAOBAB_SETTINGS_STATUSBAR_VISIBLE</span><span class="p">,</span> +<a id="line-697" name="line-697"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">statusbar</span><span class="p">,</span><span class="w"> </span><span class="s">"visible"</span><span class="p">,</span> +<a id="line-698" name="line-698"></a><span class="w"> </span><span class="n">G_SETTINGS_BIND_DEFAULT</span><span class="p">);</span> +<a id="line-699" name="line-699"></a><span class="w"> </span><span class="n">g_settings_bind</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="p">,</span> +<a id="line-700" name="line-700"></a><span class="w"> </span><span class="n">BAOBAB_SETTINGS_STATUSBAR_VISIBLE</span><span class="p">,</span> +<a id="line-701" name="line-701"></a><span class="w"> </span><span class="n">GET_TOGGLE_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"view_sb"</span><span class="p">),</span><span class="w"> </span><span class="s">"active"</span><span class="p">,</span> +<a id="line-702" name="line-702"></a><span class="w"> </span><span class="n">G_SETTINGS_BIND_DEFAULT</span><span class="p">);</span> +<a id="line-703" name="line-703"></a><span class="p">}</span> +<a id="line-704" name="line-704"></a> +<a id="line-705" name="line-705"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-706" name="line-706"></a><span class="nf">baobab_settings_subfoldertips_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="n">settings</span><span class="p">,</span> +<a id="line-707" name="line-707"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-708" name="line-708"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-709" name="line-709"></a><span class="p">{</span> +<a id="line-710" name="line-710"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">visible</span><span class="p">;</span> +<a id="line-711" name="line-711"></a> +<a id="line-712" name="line-712"></a><span class="w"> </span><span class="n">visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">);</span> +<a id="line-713" name="line-713"></a><span class="w"> </span><span class="n">baobab_ringschart_set_subfoldertips_enabled</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">,</span><span class="w"> </span><span class="n">visible</span><span class="p">);</span> +<a id="line-714" name="line-714"></a><span class="p">}</span> +<a id="line-715" name="line-715"></a> +<a id="line-716" name="line-716"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-717" name="line-717"></a><span class="nf">baobab_set_excluded_locations</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">uris</span><span class="p">)</span> +<a id="line-718" name="line-718"></a><span class="p">{</span> +<a id="line-719" name="line-719"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-720" name="line-720"></a> +<a id="line-721" name="line-721"></a><span class="w"> </span><span class="n">g_slist_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">excluded_locations</span><span class="p">,</span><span class="w"> </span><span class="n">g_object_unref</span><span class="p">);</span> +<a id="line-722" name="line-722"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">excluded_locations</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-723" name="line-723"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">uris</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-724" name="line-724"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">excluded_locations</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_prepend</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">excluded_locations</span><span class="p">,</span> +<a id="line-725" name="line-725"></a><span class="w"> </span><span class="n">g_file_new_for_uri</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">[</span><span class="n">i</span><span class="p">]));</span> +<a id="line-726" name="line-726"></a><span class="w"> </span><span class="p">}</span> +<a id="line-727" name="line-727"></a><span class="p">}</span> +<a id="line-728" name="line-728"></a> +<a id="line-729" name="line-729"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-730" name="line-730"></a><span class="nf">store_excluded_locations</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-731" name="line-731"></a><span class="p">{</span> +<a id="line-732" name="line-732"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-733" name="line-733"></a><span class="w"> </span><span class="n">GPtrArray</span><span class="w"> </span><span class="o">*</span><span class="n">uris</span><span class="p">;</span> +<a id="line-734" name="line-734"></a> +<a id="line-735" name="line-735"></a><span class="w"> </span><span class="n">uris</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_ptr_array_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-736" name="line-736"></a> +<a id="line-737" name="line-737"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">excluded_locations</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-738" name="line-738"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">,</span><span class="w"> </span><span class="n">g_file_get_uri</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">));</span> +<a id="line-739" name="line-739"></a><span class="w"> </span><span class="p">}</span> +<a id="line-740" name="line-740"></a> +<a id="line-741" name="line-741"></a><span class="w"> </span><span class="n">g_ptr_array_add</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-742" name="line-742"></a> +<a id="line-743" name="line-743"></a><span class="w"> </span><span class="n">g_settings_set_strv</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">prefs_settings</span><span class="p">,</span> +<a id="line-744" name="line-744"></a><span class="w"> </span><span class="n">BAOBAB_SETTINGS_EXCLUDED_URIS</span><span class="p">,</span> +<a id="line-745" name="line-745"></a><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="k">const</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">uris</span><span class="o">-></span><span class="n">pdata</span><span class="p">);</span> +<a id="line-746" name="line-746"></a> +<a id="line-747" name="line-747"></a><span class="w"> </span><span class="n">g_ptr_array_free</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-748" name="line-748"></a><span class="p">}</span> +<a id="line-749" name="line-749"></a> +<a id="line-750" name="line-750"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-751" name="line-751"></a><span class="nf">sanity_check_excluded_locations</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-752" name="line-752"></a><span class="p">{</span> +<a id="line-753" name="line-753"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">root</span><span class="p">;</span> +<a id="line-754" name="line-754"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">l</span><span class="p">;</span> +<a id="line-755" name="line-755"></a> +<a id="line-756" name="line-756"></a><span class="w"> </span><span class="cm">/* Make sure the root dir is not excluded */</span> +<a id="line-757" name="line-757"></a><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_uri</span><span class="w"> </span><span class="p">(</span><span class="s">"file:///"</span><span class="p">);</span> +<a id="line-758" name="line-758"></a> +<a id="line-759" name="line-759"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">excluded_locations</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">l</span><span class="o">-></span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-760" name="line-760"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_file_equal</span><span class="w"> </span><span class="p">(</span><span class="n">l</span><span class="o">-></span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-761" name="line-761"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">excluded_locations</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_delete_link</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">excluded_locations</span><span class="p">,</span><span class="w"> </span><span class="n">l</span><span class="p">);</span> +<a id="line-762" name="line-762"></a><span class="w"> </span><span class="n">store_excluded_locations</span><span class="w"> </span><span class="p">();</span> +<a id="line-763" name="line-763"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-764" name="line-764"></a><span class="w"> </span><span class="p">}</span> +<a id="line-765" name="line-765"></a><span class="w"> </span><span class="p">}</span> +<a id="line-766" name="line-766"></a> +<a id="line-767" name="line-767"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">root</span><span class="p">);</span> +<a id="line-768" name="line-768"></a><span class="p">}</span> +<a id="line-769" name="line-769"></a> +<a id="line-770" name="line-770"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-771" name="line-771"></a><span class="nf">excluded_uris_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="n">settings</span><span class="p">,</span> +<a id="line-772" name="line-772"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-773" name="line-773"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-774" name="line-774"></a><span class="p">{</span> +<a id="line-775" name="line-775"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">uris</span><span class="p">;</span> +<a id="line-776" name="line-776"></a> +<a id="line-777" name="line-777"></a><span class="w"> </span><span class="n">uris</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_strv</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">);</span> +<a id="line-778" name="line-778"></a><span class="w"> </span><span class="n">baobab_set_excluded_locations</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">);</span> +<a id="line-779" name="line-779"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">);</span> +<a id="line-780" name="line-780"></a> +<a id="line-781" name="line-781"></a><span class="w"> </span><span class="n">baobab_update_filesystem</span><span class="w"> </span><span class="p">();</span> +<a id="line-782" name="line-782"></a> +<a id="line-783" name="line-783"></a><span class="w"> </span><span class="n">gtk_tree_store_clear</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">);</span> +<a id="line-784" name="line-784"></a><span class="w"> </span><span class="n">first_row</span><span class="w"> </span><span class="p">();</span> +<a id="line-785" name="line-785"></a><span class="p">}</span> +<a id="line-786" name="line-786"></a> +<a id="line-787" name="line-787"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-788" name="line-788"></a><span class="nf">baobab_setup_excluded_locations</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-789" name="line-789"></a><span class="p">{</span> +<a id="line-790" name="line-790"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">uris</span><span class="p">;</span> +<a id="line-791" name="line-791"></a> +<a id="line-792" name="line-792"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">prefs_settings</span><span class="p">,</span> +<a id="line-793" name="line-793"></a><span class="w"> </span><span class="s">"changed::"</span><span class="w"> </span><span class="n">BAOBAB_SETTINGS_EXCLUDED_URIS</span><span class="p">,</span> +<a id="line-794" name="line-794"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">excluded_uris_changed</span><span class="p">),</span> +<a id="line-795" name="line-795"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-796" name="line-796"></a> +<a id="line-797" name="line-797"></a><span class="w"> </span><span class="n">uris</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_strv</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">prefs_settings</span><span class="p">,</span> +<a id="line-798" name="line-798"></a><span class="w"> </span><span class="n">BAOBAB_SETTINGS_EXCLUDED_URIS</span><span class="p">);</span> +<a id="line-799" name="line-799"></a><span class="w"> </span><span class="n">baobab_set_excluded_locations</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">);</span> +<a id="line-800" name="line-800"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">uris</span><span class="p">);</span> +<a id="line-801" name="line-801"></a> +<a id="line-802" name="line-802"></a><span class="w"> </span><span class="n">sanity_check_excluded_locations</span><span class="w"> </span><span class="p">();</span> +<a id="line-803" name="line-803"></a><span class="p">}</span> +<a id="line-804" name="line-804"></a> +<a id="line-805" name="line-805"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-806" name="line-806"></a><span class="nf">baobab_settings_monitor_home_changed</span><span class="w"> </span><span class="p">(</span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="n">settings</span><span class="p">,</span> +<a id="line-807" name="line-807"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">,</span> +<a id="line-808" name="line-808"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-809" name="line-809"></a><span class="p">{</span> +<a id="line-810" name="line-810"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">enable</span><span class="p">;</span> +<a id="line-811" name="line-811"></a> +<a id="line-812" name="line-812"></a><span class="w"> </span><span class="n">enable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">settings</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">);</span> +<a id="line-813" name="line-813"></a> +<a id="line-814" name="line-814"></a><span class="w"> </span><span class="n">monitor_home</span><span class="w"> </span><span class="p">(</span><span class="n">enable</span><span class="p">);</span> +<a id="line-815" name="line-815"></a><span class="p">}</span> +<a id="line-816" name="line-816"></a> +<a id="line-817" name="line-817"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-818" name="line-818"></a><span class="nf">baobab_setup_monitors</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-819" name="line-819"></a><span class="p">{</span> +<a id="line-820" name="line-820"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">enable</span><span class="p">;</span> +<a id="line-821" name="line-821"></a> +<a id="line-822" name="line-822"></a><span class="w"> </span><span class="n">monitor_volume</span><span class="w"> </span><span class="p">();</span> +<a id="line-823" name="line-823"></a> +<a id="line-824" name="line-824"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">prefs_settings</span><span class="p">,</span> +<a id="line-825" name="line-825"></a><span class="w"> </span><span class="s">"changed::"</span><span class="w"> </span><span class="n">BAOBAB_SETTINGS_MONITOR_HOME</span><span class="p">,</span> +<a id="line-826" name="line-826"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_settings_monitor_home_changed</span><span class="p">),</span> +<a id="line-827" name="line-827"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-828" name="line-828"></a> +<a id="line-829" name="line-829"></a><span class="w"> </span><span class="n">enable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">prefs_settings</span><span class="p">,</span> +<a id="line-830" name="line-830"></a><span class="w"> </span><span class="n">BAOBAB_SETTINGS_MONITOR_HOME</span><span class="p">);</span> +<a id="line-831" name="line-831"></a> +<a id="line-832" name="line-832"></a><span class="w"> </span><span class="n">monitor_home</span><span class="w"> </span><span class="p">(</span><span class="n">enable</span><span class="p">);</span> +<a id="line-833" name="line-833"></a><span class="p">}</span> +<a id="line-834" name="line-834"></a> +<a id="line-835" name="line-835"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-836" name="line-836"></a><span class="nf">baobab_init</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-837" name="line-837"></a><span class="p">{</span> +<a id="line-838" name="line-838"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-839" name="line-839"></a> +<a id="line-840" name="line-840"></a><span class="w"> </span><span class="cm">/* FileSystem usage */</span> +<a id="line-841" name="line-841"></a><span class="w"> </span><span class="n">baobab_get_filesystem</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">);</span> +<a id="line-842" name="line-842"></a> +<a id="line-843" name="line-843"></a><span class="w"> </span><span class="cm">/* Load the UI */</span> +<a id="line-844" name="line-844"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">main_ui</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_builder_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-845" name="line-845"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_builder_add_from_resource</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">main_ui</span><span class="p">,</span><span class="w"> </span><span class="n">BAOBAB_UI_RESOURCE</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-846" name="line-846"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">main_ui</span><span class="p">);</span> +<a id="line-847" name="line-847"></a><span class="w"> </span><span class="n">g_critical</span><span class="w"> </span><span class="p">(</span><span class="s">"Unable to load the user interface file: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-848" name="line-848"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-849" name="line-849"></a><span class="w"> </span><span class="n">exit</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> +<a id="line-850" name="line-850"></a><span class="w"> </span><span class="p">}</span> +<a id="line-851" name="line-851"></a> +<a id="line-852" name="line-852"></a><span class="w"> </span><span class="n">gtk_builder_connect_signals</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">main_ui</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-853" name="line-853"></a> +<a id="line-854" name="line-854"></a><span class="w"> </span><span class="cm">/* Settings */</span> +<a id="line-855" name="line-855"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_UI_SETTINGS_SCHEMA</span><span class="p">);</span> +<a id="line-856" name="line-856"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">prefs_settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="n">BAOBAB_PREFS_SETTINGS_SCHEMA</span><span class="p">);</span> +<a id="line-857" name="line-857"></a> +<a id="line-858" name="line-858"></a><span class="w"> </span><span class="cm">/* Misc */</span> +<a id="line-859" name="line-859"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">CONTENTS_CHANGED_DELAYED</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-860" name="line-860"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">STOP_SCANNING</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-861" name="line-861"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">show_allocated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-862" name="line-862"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">is_local</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-863" name="line-863"></a> +<a id="line-864" name="line-864"></a><span class="w"> </span><span class="n">baobab_setup_excluded_locations</span><span class="w"> </span><span class="p">();</span> +<a id="line-865" name="line-865"></a> +<a id="line-866" name="line-866"></a><span class="w"> </span><span class="n">baobab_create_toolbar</span><span class="w"> </span><span class="p">();</span> +<a id="line-867" name="line-867"></a><span class="w"> </span><span class="n">baobab_create_statusbar</span><span class="w"> </span><span class="p">();</span> +<a id="line-868" name="line-868"></a><span class="w"> </span><span class="n">baobab_setup_monitors</span><span class="w"> </span><span class="p">();</span> +<a id="line-869" name="line-869"></a> +<a id="line-870" name="line-870"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="p">,</span><span class="w"> </span><span class="s">"changed::"</span><span class="w"> </span><span class="n">BAOBAB_SETTINGS_SUBFLSTIPS_VISIBLE</span><span class="p">,</span> +<a id="line-871" name="line-871"></a><span class="w"> </span><span class="p">(</span><span class="n">GCallback</span><span class="p">)</span><span class="w"> </span><span class="n">baobab_settings_subfoldertips_changed</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-872" name="line-872"></a><span class="p">}</span> +<a id="line-873" name="line-873"></a> +<a id="line-874" name="line-874"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-875" name="line-875"></a><span class="nf">baobab_shutdown</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-876" name="line-876"></a><span class="p">{</span> +<a id="line-877" name="line-877"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_location</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-878" name="line-878"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_location</span><span class="p">);</span> +<a id="line-879" name="line-879"></a><span class="w"> </span><span class="p">}</span> +<a id="line-880" name="line-880"></a> +<a id="line-881" name="line-881"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_vol</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-882" name="line-882"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_vol</span><span class="p">);</span> +<a id="line-883" name="line-883"></a><span class="w"> </span><span class="p">}</span> +<a id="line-884" name="line-884"></a> +<a id="line-885" name="line-885"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-886" name="line-886"></a><span class="w"> </span><span class="n">g_file_monitor_cancel</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="p">);</span> +<a id="line-887" name="line-887"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">monitor_home</span><span class="p">);</span> +<a id="line-888" name="line-888"></a><span class="w"> </span><span class="p">}</span> +<a id="line-889" name="line-889"></a> +<a id="line-890" name="line-890"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">selected_path</span><span class="p">);</span> +<a id="line-891" name="line-891"></a> +<a id="line-892" name="line-892"></a><span class="w"> </span><span class="n">g_slist_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">excluded_locations</span><span class="p">,</span><span class="w"> </span><span class="n">g_object_unref</span><span class="p">);</span> +<a id="line-893" name="line-893"></a> +<a id="line-894" name="line-894"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-895" name="line-895"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="p">);</span> +<a id="line-896" name="line-896"></a><span class="w"> </span><span class="p">}</span> +<a id="line-897" name="line-897"></a> +<a id="line-898" name="line-898"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">prefs_settings</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-899" name="line-899"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">prefs_settings</span><span class="p">);</span> +<a id="line-900" name="line-900"></a><span class="w"> </span><span class="p">}</span> +<a id="line-901" name="line-901"></a><span class="p">}</span> +<a id="line-902" name="line-902"></a> +<a id="line-903" name="line-903"></a><span class="k">static</span><span class="w"> </span><span class="n">BaobabChartMenu</span><span class="w"> </span><span class="o">*</span> +<a id="line-904" name="line-904"></a><span class="nf">create_context_menu</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-905" name="line-905"></a><span class="p">{</span> +<a id="line-906" name="line-906"></a><span class="w"> </span><span class="n">BaobabChartMenu</span><span class="w"> </span><span class="o">*</span><span class="n">menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-907" name="line-907"></a> +<a id="line-908" name="line-908"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_new0</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChartMenu</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-909" name="line-909"></a><span class="w"> </span><span class="n">menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_menu</span><span class="p">;</span> +<a id="line-910" name="line-910"></a> +<a id="line-911" name="line-911"></a><span class="w"> </span><span class="n">menu</span><span class="o">-></span><span class="n">widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_menu_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-912" name="line-912"></a> +<a id="line-913" name="line-913"></a><span class="w"> </span><span class="n">menu</span><span class="o">-></span><span class="n">up_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_menu_item_new_with_label</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Move to parent folder"</span><span class="p">));</span> +<a id="line-914" name="line-914"></a><span class="w"> </span><span class="n">gtk_image_menu_item_set_image</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IMAGE_MENU_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">up_item</span><span class="p">),</span> +<a id="line-915" name="line-915"></a><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="p">(</span><span class="s">"go-up"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">));</span> +<a id="line-916" name="line-916"></a> +<a id="line-917" name="line-917"></a><span class="w"> </span><span class="n">menu</span><span class="o">-></span><span class="n">zoom_in_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_menu_item_new_with_label</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Zoom in"</span><span class="p">))</span><span class="w"> </span><span class="p">;</span> +<a id="line-918" name="line-918"></a><span class="w"> </span><span class="n">gtk_image_menu_item_set_image</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IMAGE_MENU_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">zoom_in_item</span><span class="p">),</span> +<a id="line-919" name="line-919"></a><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="p">(</span><span class="s">"list-add"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">));</span> +<a id="line-920" name="line-920"></a> +<a id="line-921" name="line-921"></a><span class="w"> </span><span class="n">menu</span><span class="o">-></span><span class="n">zoom_out_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_menu_item_new_with_label</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Zoom out"</span><span class="p">));</span> +<a id="line-922" name="line-922"></a><span class="w"> </span><span class="n">gtk_image_menu_item_set_image</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IMAGE_MENU_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">zoom_out_item</span><span class="p">),</span> +<a id="line-923" name="line-923"></a><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="p">(</span><span class="s">"list-remove"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">));</span> +<a id="line-924" name="line-924"></a> +<a id="line-925" name="line-925"></a><span class="w"> </span><span class="n">menu</span><span class="o">-></span><span class="n">snapshot_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_image_menu_item_new_with_label</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Save screenshot"</span><span class="p">));</span> +<a id="line-926" name="line-926"></a><span class="w"> </span><span class="n">gtk_image_menu_item_set_image</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IMAGE_MENU_ITEM</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">snapshot_item</span><span class="p">),</span> +<a id="line-927" name="line-927"></a><span class="w"> </span><span class="n">gtk_image_new_from_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"applets-screenshooter"</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_ICON_SIZE_MENU</span><span class="p">));</span> +<a id="line-928" name="line-928"></a> +<a id="line-929" name="line-929"></a><span class="w"> </span><span class="n">gtk_menu_shell_append</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">widget</span><span class="p">),</span> +<a id="line-930" name="line-930"></a><span class="w"> </span><span class="n">menu</span><span class="o">-></span><span class="n">up_item</span><span class="p">);</span> +<a id="line-931" name="line-931"></a><span class="w"> </span><span class="n">gtk_menu_shell_append</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">widget</span><span class="p">),</span> +<a id="line-932" name="line-932"></a><span class="w"> </span><span class="n">gtk_separator_menu_item_new</span><span class="w"> </span><span class="p">());</span> +<a id="line-933" name="line-933"></a><span class="w"> </span><span class="n">gtk_menu_shell_append</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">widget</span><span class="p">),</span> +<a id="line-934" name="line-934"></a><span class="w"> </span><span class="n">menu</span><span class="o">-></span><span class="n">zoom_in_item</span><span class="p">);</span> +<a id="line-935" name="line-935"></a><span class="w"> </span><span class="n">gtk_menu_shell_append</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">widget</span><span class="p">),</span> +<a id="line-936" name="line-936"></a><span class="w"> </span><span class="n">menu</span><span class="o">-></span><span class="n">zoom_out_item</span><span class="p">);</span> +<a id="line-937" name="line-937"></a><span class="w"> </span><span class="n">gtk_menu_shell_append</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">widget</span><span class="p">),</span> +<a id="line-938" name="line-938"></a><span class="w"> </span><span class="n">gtk_separator_menu_item_new</span><span class="w"> </span><span class="p">());</span> +<a id="line-939" name="line-939"></a><span class="w"> </span><span class="n">gtk_menu_shell_append</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU_SHELL</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">widget</span><span class="p">),</span> +<a id="line-940" name="line-940"></a><span class="w"> </span><span class="n">menu</span><span class="o">-></span><span class="n">snapshot_item</span><span class="p">);</span> +<a id="line-941" name="line-941"></a> +<a id="line-942" name="line-942"></a><span class="w"> </span><span class="cm">/* connect signals */</span> +<a id="line-943" name="line-943"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">up_item</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-944" name="line-944"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_move_upwards_cb</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-945" name="line-945"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">zoom_in_item</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-946" name="line-946"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_zoom_in_cb</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-947" name="line-947"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">zoom_out_item</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-948" name="line-948"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_zoom_out_cb</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-949" name="line-949"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">snapshot_item</span><span class="p">,</span><span class="w"> </span><span class="s">"activate"</span><span class="p">,</span> +<a id="line-950" name="line-950"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_chart_snapshot_cb</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-951" name="line-951"></a> +<a id="line-952" name="line-952"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">widget</span><span class="p">);</span> +<a id="line-953" name="line-953"></a> +<a id="line-954" name="line-954"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">menu</span><span class="p">;</span> +<a id="line-955" name="line-955"></a><span class="p">}</span> +<a id="line-956" name="line-956"></a> +<a id="line-957" name="line-957"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-958" name="line-958"></a><span class="nf">on_chart_item_activated</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChart</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">)</span> +<a id="line-959" name="line-959"></a><span class="p">{</span> +<a id="line-960" name="line-960"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">;</span> +<a id="line-961" name="line-961"></a> +<a id="line-962" name="line-962"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_path</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">),</span><span class="w"> </span><span class="n">iter</span><span class="p">);</span> +<a id="line-963" name="line-963"></a> +<a id="line-964" name="line-964"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_tree_view_row_expanded</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">path</span><span class="p">))</span> +<a id="line-965" name="line-965"></a><span class="w"> </span><span class="n">gtk_tree_view_expand_to_path</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">tree_view</span><span class="p">),</span><span class="w"> </span><span class="n">path</span><span class="p">);</span> +<a id="line-966" name="line-966"></a> +<a id="line-967" name="line-967"></a><span class="w"> </span><span class="n">gtk_tree_view_set_cursor</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_VIEW</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">tree_view</span><span class="p">),</span> +<a id="line-968" name="line-968"></a><span class="w"> </span><span class="n">path</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-969" name="line-969"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-970" name="line-970"></a><span class="p">}</span> +<a id="line-971" name="line-971"></a> +<a id="line-972" name="line-972"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-973" name="line-973"></a><span class="nf">on_chart_button_release</span><span class="w"> </span><span class="p">(</span><span class="n">BaobabChart</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">,</span> +<a id="line-974" name="line-974"></a><span class="w"> </span><span class="n">GdkEventButton</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">,</span> +<a id="line-975" name="line-975"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-976" name="line-976"></a><span class="p">{</span> +<a id="line-977" name="line-977"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab_chart_is_frozen</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="p">))</span> +<a id="line-978" name="line-978"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-979" name="line-979"></a> +<a id="line-980" name="line-980"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">event</span><span class="o">-></span><span class="n">button</span><span class="o">==</span><span class="w"> </span><span class="mi">3</span><span class="p">)</span><span class="w"> </span><span class="cm">/* right button */</span> +<a id="line-981" name="line-981"></a><span class="w"> </span><span class="p">{</span> +<a id="line-982" name="line-982"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">root_path</span><span class="p">;</span> +<a id="line-983" name="line-983"></a><span class="w"> </span><span class="n">BaobabChartMenu</span><span class="w"> </span><span class="o">*</span><span class="n">menu</span><span class="p">;</span> +<a id="line-984" name="line-984"></a> +<a id="line-985" name="line-985"></a><span class="w"> </span><span class="n">root_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_chart_get_root</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="p">);</span> +<a id="line-986" name="line-986"></a> +<a id="line-987" name="line-987"></a><span class="w"> </span><span class="n">menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_menu</span><span class="p">;</span> +<a id="line-988" name="line-988"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">up_item</span><span class="p">,</span> +<a id="line-989" name="line-989"></a><span class="w"> </span><span class="p">((</span><span class="n">root_path</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-990" name="line-990"></a><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_path_get_depth</span><span class="w"> </span><span class="p">(</span><span class="n">root_path</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">1</span><span class="p">)));</span> +<a id="line-991" name="line-991"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">zoom_in_item</span><span class="p">,</span> +<a id="line-992" name="line-992"></a><span class="w"> </span><span class="n">baobab_chart_can_zoom_in</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="p">));</span> +<a id="line-993" name="line-993"></a><span class="w"> </span><span class="n">gtk_widget_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">zoom_out_item</span><span class="p">,</span> +<a id="line-994" name="line-994"></a><span class="w"> </span><span class="n">baobab_chart_can_zoom_out</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="p">));</span> +<a id="line-995" name="line-995"></a> +<a id="line-996" name="line-996"></a><span class="w"> </span><span class="cm">/* show the menu */</span> +<a id="line-997" name="line-997"></a><span class="w"> </span><span class="n">gtk_menu_popup_at_pointer</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MENU</span><span class="w"> </span><span class="p">(</span><span class="n">menu</span><span class="o">-></span><span class="n">widget</span><span class="p">),</span> +<a id="line-998" name="line-998"></a><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">GdkEvent</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">event</span><span class="p">);</span> +<a id="line-999" name="line-999"></a> +<a id="line-1000" name="line-1000"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">root_path</span><span class="p">);</span> +<a id="line-1001" name="line-1001"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1002" name="line-1002"></a> +<a id="line-1003" name="line-1003"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1004" name="line-1004"></a><span class="p">}</span> +<a id="line-1005" name="line-1005"></a> +<a id="line-1006" name="line-1006"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1007" name="line-1007"></a><span class="nf">drag_data_received_handl</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span> +<a id="line-1008" name="line-1008"></a><span class="w"> </span><span class="n">GdkDragContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">,</span> +<a id="line-1009" name="line-1009"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">x</span><span class="p">,</span> +<a id="line-1010" name="line-1010"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">y</span><span class="p">,</span> +<a id="line-1011" name="line-1011"></a><span class="w"> </span><span class="n">GtkSelectionData</span><span class="w"> </span><span class="o">*</span><span class="n">selection_data</span><span class="p">,</span> +<a id="line-1012" name="line-1012"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">target_type</span><span class="p">,</span> +<a id="line-1013" name="line-1013"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">time</span><span class="p">,</span> +<a id="line-1014" name="line-1014"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">)</span> +<a id="line-1015" name="line-1015"></a><span class="p">{</span> +<a id="line-1016" name="line-1016"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">gf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1017" name="line-1017"></a> +<a id="line-1018" name="line-1018"></a><span class="w"> </span><span class="cm">/* set "gf" if we got some valid data */</span> +<a id="line-1019" name="line-1019"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="n">selection_data</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-1020" name="line-1020"></a><span class="w"> </span><span class="p">(</span><span class="n">gtk_selection_data_get_length</span><span class="w"> </span><span class="p">(</span><span class="n">selection_data</span><span class="p">)</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="o">&&</span> +<a id="line-1021" name="line-1021"></a><span class="w"> </span><span class="p">(</span><span class="n">target_type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">DND_TARGET_URI_LIST</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1022" name="line-1022"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">uri_list</span><span class="p">;</span> +<a id="line-1023" name="line-1023"></a><span class="w"> </span><span class="n">uri_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_uri_list_extract_uris</span><span class="w"> </span><span class="p">((</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">gtk_selection_data_get_data</span><span class="w"> </span><span class="p">(</span><span class="n">selection_data</span><span class="p">));</span> +<a id="line-1024" name="line-1024"></a><span class="w"> </span><span class="cm">/* check list is 1 item long */</span> +<a id="line-1025" name="line-1025"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">uri_list</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">uri_list</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">uri_list</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1026" name="line-1026"></a><span class="w"> </span><span class="n">gf</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_uri</span><span class="w"> </span><span class="p">(</span><span class="n">uri_list</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span> +<a id="line-1027" name="line-1027"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1028" name="line-1028"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">uri_list</span><span class="p">);</span> +<a id="line-1029" name="line-1029"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1030" name="line-1030"></a> +<a id="line-1031" name="line-1031"></a><span class="w"> </span><span class="cm">/* success if "gf" has been set */</span> +<a id="line-1032" name="line-1032"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gf</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1033" name="line-1033"></a><span class="w"> </span><span class="cm">/* finish drop before beginning scan, as the drag-drop can</span> +<a id="line-1034" name="line-1034"></a><span class="cm"> probably time out */</span> +<a id="line-1035" name="line-1035"></a><span class="w"> </span><span class="n">gtk_drag_finish</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="p">);</span> +<a id="line-1036" name="line-1036"></a><span class="w"> </span><span class="n">baobab_scan_location</span><span class="w"> </span><span class="p">(</span><span class="n">gf</span><span class="p">);</span> +<a id="line-1037" name="line-1037"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">gf</span><span class="p">);</span> +<a id="line-1038" name="line-1038"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1039" name="line-1039"></a><span class="w"> </span><span class="n">gtk_drag_finish</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="p">);</span> +<a id="line-1040" name="line-1040"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1041" name="line-1041"></a><span class="p">}</span> +<a id="line-1042" name="line-1042"></a> +<a id="line-1043" name="line-1043"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1044" name="line-1044"></a><span class="nf">set_active_chart</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">)</span> +<a id="line-1045" name="line-1045"></a><span class="p">{</span> +<a id="line-1046" name="line-1046"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">chart</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1047" name="line-1047"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1048" name="line-1048"></a><span class="w"> </span><span class="n">baobab_chart_freeze_updates</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="p">);</span> +<a id="line-1049" name="line-1049"></a> +<a id="line-1050" name="line-1050"></a><span class="w"> </span><span class="n">g_object_ref</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="p">);</span> +<a id="line-1051" name="line-1051"></a><span class="w"> </span><span class="n">gtk_container_remove</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_frame</span><span class="p">),</span> +<a id="line-1052" name="line-1052"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="p">);</span> +<a id="line-1053" name="line-1053"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1054" name="line-1054"></a> +<a id="line-1055" name="line-1055"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_frame</span><span class="p">),</span><span class="w"> </span><span class="n">chart</span><span class="p">);</span> +<a id="line-1056" name="line-1056"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1057" name="line-1057"></a> +<a id="line-1058" name="line-1058"></a><span class="w"> </span><span class="n">baobab_chart_thaw_updates</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1059" name="line-1059"></a> +<a id="line-1060" name="line-1060"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">chart</span><span class="p">;</span> +<a id="line-1061" name="line-1061"></a> +<a id="line-1062" name="line-1062"></a><span class="w"> </span><span class="n">gtk_widget_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_frame</span><span class="p">);</span> +<a id="line-1063" name="line-1063"></a> +<a id="line-1064" name="line-1064"></a><span class="w"> </span><span class="n">g_settings_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="p">,</span> +<a id="line-1065" name="line-1065"></a><span class="w"> </span><span class="n">BAOBAB_SETTINGS_ACTIVE_CHART</span><span class="p">,</span> +<a id="line-1066" name="line-1066"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">current_chart</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">"rings"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s">"treemap"</span><span class="p">);</span> +<a id="line-1067" name="line-1067"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1068" name="line-1068"></a><span class="p">}</span> +<a id="line-1069" name="line-1069"></a> +<a id="line-1070" name="line-1070"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1071" name="line-1071"></a><span class="nf">on_chart_type_change</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">combo</span><span class="p">,</span><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span><span class="p">)</span> +<a id="line-1072" name="line-1072"></a><span class="p">{</span> +<a id="line-1073" name="line-1073"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">chart</span><span class="p">;</span> +<a id="line-1074" name="line-1074"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">active</span><span class="p">;</span> +<a id="line-1075" name="line-1075"></a> +<a id="line-1076" name="line-1076"></a><span class="w"> </span><span class="n">active</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_combo_box_get_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">combo</span><span class="p">));</span> +<a id="line-1077" name="line-1077"></a> +<a id="line-1078" name="line-1078"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">active</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1079" name="line-1079"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">0</span><span class="p">:</span> +<a id="line-1080" name="line-1080"></a><span class="w"> </span><span class="n">chart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">;</span> +<a id="line-1081" name="line-1081"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1082" name="line-1082"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="mi">1</span><span class="p">:</span> +<a id="line-1083" name="line-1083"></a><span class="w"> </span><span class="n">chart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">;</span> +<a id="line-1084" name="line-1084"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-1085" name="line-1085"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-1086" name="line-1086"></a><span class="w"> </span><span class="n">g_return_if_reached</span><span class="w"> </span><span class="p">();</span> +<a id="line-1087" name="line-1087"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1088" name="line-1088"></a> +<a id="line-1089" name="line-1089"></a><span class="w"> </span><span class="n">set_active_chart</span><span class="w"> </span><span class="p">(</span><span class="n">chart</span><span class="p">);</span> +<a id="line-1090" name="line-1090"></a><span class="p">}</span> +<a id="line-1091" name="line-1091"></a> +<a id="line-1092" name="line-1092"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-1093" name="line-1093"></a><span class="nf">initialize_charts</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<a id="line-1094" name="line-1094"></a><span class="p">{</span> +<a id="line-1095" name="line-1095"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hpaned_main</span><span class="p">;</span> +<a id="line-1096" name="line-1096"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">hbox1</span><span class="p">;</span> +<a id="line-1097" name="line-1097"></a><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">saved_chart</span><span class="p">;</span> +<a id="line-1098" name="line-1098"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">visible</span><span class="p">;</span> +<a id="line-1099" name="line-1099"></a> +<a id="line-1100" name="line-1100"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_frame</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_frame_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1101" name="line-1101"></a><span class="w"> </span><span class="n">gtk_frame_set_label_align</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FRAME</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_frame</span><span class="p">),</span><span class="w"> </span><span class="mf">0.0</span><span class="p">,</span><span class="w"> </span><span class="mf">0.0</span><span class="p">);</span> +<a id="line-1102" name="line-1102"></a><span class="w"> </span><span class="n">gtk_frame_set_shadow_type</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_FRAME</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_frame</span><span class="p">),</span><span class="w"> </span><span class="n">GTK_SHADOW_IN</span><span class="p">);</span> +<a id="line-1103" name="line-1103"></a> +<a id="line-1104" name="line-1104"></a><span class="w"> </span><span class="n">hpaned_main</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"hpaned_main"</span><span class="p">);</span> +<a id="line-1105" name="line-1105"></a><span class="w"> </span><span class="n">gtk_paned_pack2</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_PANED</span><span class="w"> </span><span class="p">(</span><span class="n">hpaned_main</span><span class="p">),</span> +<a id="line-1106" name="line-1106"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_frame</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1107" name="line-1107"></a><span class="w"> </span><span class="n">gtk_paned_set_position</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_PANED</span><span class="w"> </span><span class="p">(</span><span class="n">hpaned_main</span><span class="p">),</span><span class="w"> </span><span class="mi">480</span><span class="p">);</span> +<a id="line-1108" name="line-1108"></a> +<a id="line-1109" name="line-1109"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_combo_box_text_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1110" name="line-1110"></a><span class="w"> </span><span class="n">gtk_combo_box_text_append_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX_TEXT</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="p">),</span> +<a id="line-1111" name="line-1111"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"View as Rings Chart"</span><span class="p">));</span> +<a id="line-1112" name="line-1112"></a><span class="w"> </span><span class="n">gtk_combo_box_text_append_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX_TEXT</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="p">),</span> +<a id="line-1113" name="line-1113"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"View as Treemap Chart"</span><span class="p">));</span> +<a id="line-1114" name="line-1114"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="p">);</span> +<a id="line-1115" name="line-1115"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="p">,</span> +<a id="line-1116" name="line-1116"></a><span class="w"> </span><span class="s">"changed"</span><span class="p">,</span> +<a id="line-1117" name="line-1117"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_chart_type_change</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1118" name="line-1118"></a> +<a id="line-1119" name="line-1119"></a><span class="w"> </span><span class="n">hbox1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"hbox1"</span><span class="p">);</span> +<a id="line-1120" name="line-1120"></a><span class="w"> </span><span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">hbox1</span><span class="p">),</span><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="p">);</span> +<a id="line-1121" name="line-1121"></a><span class="w"> </span><span class="n">gtk_box_set_spacing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox1</span><span class="p">),</span><span class="w"> </span><span class="mi">50</span><span class="p">);</span> +<a id="line-1122" name="line-1122"></a><span class="w"> </span><span class="n">gtk_box_set_child_packing</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">hbox1</span><span class="p">),</span> +<a id="line-1123" name="line-1123"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="p">,</span> +<a id="line-1124" name="line-1124"></a><span class="w"> </span><span class="n">FALSE</span><span class="p">,</span> +<a id="line-1125" name="line-1125"></a><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-1126" name="line-1126"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_PACK_END</span><span class="p">);</span> +<a id="line-1127" name="line-1127"></a> +<a id="line-1128" name="line-1128"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_menu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">create_context_menu</span><span class="w"> </span><span class="p">();</span> +<a id="line-1129" name="line-1129"></a> +<a id="line-1130" name="line-1130"></a><span class="w"> </span><span class="cm">/* Baobab's Treemap Chart */</span> +<a id="line-1131" name="line-1131"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">baobab_treemap_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1132" name="line-1132"></a><span class="w"> </span><span class="n">baobab_chart_set_model_with_columns</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">,</span> +<a id="line-1133" name="line-1133"></a><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">),</span> +<a id="line-1134" name="line-1134"></a><span class="w"> </span><span class="n">COL_DIR_NAME</span><span class="p">,</span> +<a id="line-1135" name="line-1135"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span> +<a id="line-1136" name="line-1136"></a><span class="w"> </span><span class="n">COL_H_PARSENAME</span><span class="p">,</span> +<a id="line-1137" name="line-1137"></a><span class="w"> </span><span class="n">COL_H_PERC</span><span class="p">,</span> +<a id="line-1138" name="line-1138"></a><span class="w"> </span><span class="n">COL_H_ELEMENTS</span><span class="p">,</span> +<a id="line-1139" name="line-1139"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1140" name="line-1140"></a><span class="w"> </span><span class="n">baobab_chart_set_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1141" name="line-1141"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">,</span><span class="w"> </span><span class="s">"item_activated"</span><span class="p">,</span> +<a id="line-1142" name="line-1142"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_chart_item_activated</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1143" name="line-1143"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">,</span><span class="w"> </span><span class="s">"button-release-event"</span><span class="p">,</span> +<a id="line-1144" name="line-1144"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_chart_button_release</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1145" name="line-1145"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">,</span><span class="w"> </span><span class="s">"drag-data-received"</span><span class="p">,</span> +<a id="line-1146" name="line-1146"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">drag_data_received_handl</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1147" name="line-1147"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">);</span> +<a id="line-1148" name="line-1148"></a><span class="w"> </span><span class="n">g_object_ref_sink</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">);</span> +<a id="line-1149" name="line-1149"></a><span class="w"> </span><span class="n">baobab_chart_freeze_updates</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">);</span> +<a id="line-1150" name="line-1150"></a> +<a id="line-1151" name="line-1151"></a><span class="w"> </span><span class="cm">/* Baobab's Rings Chart */</span> +<a id="line-1152" name="line-1152"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">baobab_ringschart_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-1153" name="line-1153"></a><span class="w"> </span><span class="n">baobab_chart_set_model_with_columns</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">,</span> +<a id="line-1154" name="line-1154"></a><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">model</span><span class="p">),</span> +<a id="line-1155" name="line-1155"></a><span class="w"> </span><span class="n">COL_DIR_NAME</span><span class="p">,</span> +<a id="line-1156" name="line-1156"></a><span class="w"> </span><span class="n">COL_DIR_SIZE</span><span class="p">,</span> +<a id="line-1157" name="line-1157"></a><span class="w"> </span><span class="n">COL_H_PARSENAME</span><span class="p">,</span> +<a id="line-1158" name="line-1158"></a><span class="w"> </span><span class="n">COL_H_PERC</span><span class="p">,</span> +<a id="line-1159" name="line-1159"></a><span class="w"> </span><span class="n">COL_H_ELEMENTS</span><span class="p">,</span> +<a id="line-1160" name="line-1160"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1161" name="line-1161"></a> +<a id="line-1162" name="line-1162"></a><span class="w"> </span><span class="n">visible</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_boolean</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="p">,</span> +<a id="line-1163" name="line-1163"></a><span class="w"> </span><span class="n">BAOBAB_SETTINGS_SUBFLSTIPS_VISIBLE</span><span class="p">);</span> +<a id="line-1164" name="line-1164"></a><span class="w"> </span><span class="n">baobab_ringschart_set_subfoldertips_enabled</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">,</span><span class="w"> </span><span class="n">visible</span><span class="p">);</span> +<a id="line-1165" name="line-1165"></a> +<a id="line-1166" name="line-1166"></a><span class="w"> </span><span class="n">baobab_chart_set_max_depth</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1167" name="line-1167"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">,</span><span class="w"> </span><span class="s">"item_activated"</span><span class="p">,</span> +<a id="line-1168" name="line-1168"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_chart_item_activated</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1169" name="line-1169"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">,</span><span class="w"> </span><span class="s">"button-release-event"</span><span class="p">,</span> +<a id="line-1170" name="line-1170"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">on_chart_button_release</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1171" name="line-1171"></a><span class="w"> </span><span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">,</span><span class="w"> </span><span class="s">"drag-data-received"</span><span class="p">,</span> +<a id="line-1172" name="line-1172"></a><span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">drag_data_received_handl</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1173" name="line-1173"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">);</span> +<a id="line-1174" name="line-1174"></a><span class="w"> </span><span class="n">g_object_ref_sink</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">);</span> +<a id="line-1175" name="line-1175"></a><span class="w"> </span><span class="n">baobab_chart_freeze_updates</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">);</span> +<a id="line-1176" name="line-1176"></a> +<a id="line-1177" name="line-1177"></a><span class="w"> </span><span class="n">saved_chart</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_string</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">ui_settings</span><span class="p">,</span> +<a id="line-1178" name="line-1178"></a><span class="w"> </span><span class="n">BAOBAB_SETTINGS_ACTIVE_CHART</span><span class="p">);</span> +<a id="line-1179" name="line-1179"></a> +<a id="line-1180" name="line-1180"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">g_ascii_strcasecmp</span><span class="w"> </span><span class="p">(</span><span class="n">saved_chart</span><span class="p">,</span><span class="w"> </span><span class="s">"treemap"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span> +<a id="line-1181" name="line-1181"></a><span class="w"> </span><span class="n">set_active_chart</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">treemap_chart</span><span class="p">);</span> +<a id="line-1182" name="line-1182"></a><span class="w"> </span><span class="n">gtk_combo_box_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="p">),</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-1183" name="line-1183"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> +<a id="line-1184" name="line-1184"></a><span class="w"> </span><span class="n">set_active_chart</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">rings_chart</span><span class="p">);</span> +<a id="line-1185" name="line-1185"></a><span class="w"> </span><span class="n">gtk_combo_box_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">chart_type_combo</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-1186" name="line-1186"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1187" name="line-1187"></a> +<a id="line-1188" name="line-1188"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">saved_chart</span><span class="p">);</span> +<a id="line-1189" name="line-1189"></a> +<a id="line-1190" name="line-1190"></a><span class="w"> </span><span class="n">check_drop_targets</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1191" name="line-1191"></a><span class="p">}</span> +<a id="line-1192" name="line-1192"></a> +<a id="line-1193" name="line-1193"></a><span class="kt">void</span> +<a id="line-1194" name="line-1194"></a><span class="nf">baobab_quit</span><span class="w"> </span><span class="p">()</span> +<a id="line-1195" name="line-1195"></a><span class="p">{</span> +<a id="line-1196" name="line-1196"></a><span class="w"> </span><span class="n">baobab_stop_scan</span><span class="w"> </span><span class="p">();</span> +<a id="line-1197" name="line-1197"></a><span class="w"> </span><span class="n">gtk_main_quit</span><span class="w"> </span><span class="p">();</span> +<a id="line-1198" name="line-1198"></a><span class="p">}</span> +<a id="line-1199" name="line-1199"></a> +<a id="line-1200" name="line-1200"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1201" name="line-1201"></a><span class="nf">start_proc_on_command_line</span><span class="w"> </span><span class="p">(</span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">)</span> +<a id="line-1202" name="line-1202"></a><span class="p">{</span> +<a id="line-1203" name="line-1203"></a><span class="w"> </span><span class="n">baobab_scan_location</span><span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="p">);</span> +<a id="line-1204" name="line-1204"></a> +<a id="line-1205" name="line-1205"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-1206" name="line-1206"></a><span class="p">}</span> +<a id="line-1207" name="line-1207"></a> +<a id="line-1208" name="line-1208"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-1209" name="line-1209"></a><span class="nf">show_version</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">option_name</span><span class="p">,</span> +<a id="line-1210" name="line-1210"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-1211" name="line-1211"></a><span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">data</span><span class="p">,</span> +<a id="line-1212" name="line-1212"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">**</span><span class="n">error</span><span class="p">)</span> +<a id="line-1213" name="line-1213"></a><span class="p">{</span> +<a id="line-1214" name="line-1214"></a><span class="w"> </span><span class="n">g_print</span><span class="p">(</span><span class="s">"%s %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">g_get_application_name</span><span class="w"> </span><span class="p">(),</span><span class="w"> </span><span class="n">VERSION</span><span class="p">);</span> +<a id="line-1215" name="line-1215"></a><span class="w"> </span><span class="n">exit</span><span class="w"> </span><span class="p">(</span><span class="mi">0</span><span class="p">);</span> +<a id="line-1216" name="line-1216"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span><span class="w"> </span><span class="cm">/* It's just good form */</span> +<a id="line-1217" name="line-1217"></a><span class="p">}</span> +<a id="line-1218" name="line-1218"></a> +<a id="line-1219" name="line-1219"></a><span class="kt">int</span> +<a id="line-1220" name="line-1220"></a><span class="nf">main</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">argv</span><span class="p">[])</span> +<a id="line-1221" name="line-1221"></a><span class="p">{</span> +<a id="line-1222" name="line-1222"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">**</span><span class="n">directories</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1223" name="line-1223"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GOptionEntry</span><span class="w"> </span><span class="n">options</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<a id="line-1224" name="line-1224"></a><span class="w"> </span><span class="p">{</span><span class="s">"version"</span><span class="p">,</span><span class="w"> </span><span class="sc">'V'</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_FLAG_NO_ARG</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_CALLBACK</span><span class="p">,</span><span class="w"> </span><span class="n">show_version</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"Show version"</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">},</span> +<a id="line-1225" name="line-1225"></a><span class="w"> </span><span class="p">{</span><span class="n">G_OPTION_REMAINING</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_FILENAME_ARRAY</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">directories</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">N_</span><span class="p">(</span><span class="s">"[DIRECTORY]"</span><span class="p">)},</span> +<a id="line-1226" name="line-1226"></a><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">G_OPTION_ARG_NONE</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">}</span> +<a id="line-1227" name="line-1227"></a><span class="w"> </span><span class="p">};</span> +<a id="line-1228" name="line-1228"></a><span class="w"> </span><span class="n">GOptionContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="p">;</span> +<a id="line-1229" name="line-1229"></a><span class="w"> </span><span class="n">GError</span><span class="w"> </span><span class="o">*</span><span class="n">error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-1230" name="line-1230"></a> +<a id="line-1231" name="line-1231"></a><span class="cp">#ifdef ENABLE_NLS</span> +<a id="line-1232" name="line-1232"></a><span class="w"> </span><span class="n">bindtextdomain</span><span class="w"> </span><span class="p">(</span><span class="n">GETTEXT_PACKAGE</span><span class="p">,</span><span class="w"> </span><span class="n">MATELOCALEDIR</span><span class="p">);</span> +<a id="line-1233" name="line-1233"></a><span class="w"> </span><span class="n">bind_textdomain_codeset</span><span class="w"> </span><span class="p">(</span><span class="n">GETTEXT_PACKAGE</span><span class="p">,</span><span class="w"> </span><span class="s">"UTF-8"</span><span class="p">);</span> +<a id="line-1234" name="line-1234"></a><span class="w"> </span><span class="n">textdomain</span><span class="w"> </span><span class="p">(</span><span class="n">GETTEXT_PACKAGE</span><span class="p">);</span> +<a id="line-1235" name="line-1235"></a><span class="cp">#endif </span><span class="cm">/* ENABLE_NLS */</span> +<a id="line-1236" name="line-1236"></a> +<a id="line-1237" name="line-1237"></a><span class="w"> </span><span class="n">g_set_application_name</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Disk Usage Analyzer"</span><span class="p">));</span> +<a id="line-1238" name="line-1238"></a> +<a id="line-1239" name="line-1239"></a><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_option_context_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-1240" name="line-1240"></a><span class="w"> </span><span class="n">g_option_context_set_ignore_unknown_options</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1241" name="line-1241"></a><span class="w"> </span><span class="n">g_option_context_set_help_enabled</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-1242" name="line-1242"></a><span class="w"> </span><span class="n">g_option_context_add_main_entries</span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">options</span><span class="p">,</span><span class="w"> </span><span class="n">GETTEXT_PACKAGE</span><span class="p">);</span> +<a id="line-1243" name="line-1243"></a><span class="w"> </span><span class="n">g_option_context_add_group</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_get_option_group</span><span class="w"> </span><span class="p">(</span><span class="n">TRUE</span><span class="p">));</span> +<a id="line-1244" name="line-1244"></a> +<a id="line-1245" name="line-1245"></a><span class="w"> </span><span class="n">g_option_context_parse</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">error</span><span class="p">);</span> +<a id="line-1246" name="line-1246"></a> +<a id="line-1247" name="line-1247"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1248" name="line-1248"></a><span class="w"> </span><span class="n">g_critical</span><span class="w"> </span><span class="p">(</span><span class="s">"Unable to parse option: %s"</span><span class="p">,</span><span class="w"> </span><span class="n">error</span><span class="o">-></span><span class="n">message</span><span class="p">);</span> +<a id="line-1249" name="line-1249"></a><span class="w"> </span><span class="n">g_error_free</span><span class="w"> </span><span class="p">(</span><span class="n">error</span><span class="p">);</span> +<a id="line-1250" name="line-1250"></a><span class="w"> </span><span class="n">g_option_context_free</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-1251" name="line-1251"></a> +<a id="line-1252" name="line-1252"></a><span class="w"> </span><span class="n">exit</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> +<a id="line-1253" name="line-1253"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1254" name="line-1254"></a><span class="w"> </span><span class="n">g_option_context_free</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span> +<a id="line-1255" name="line-1255"></a> +<a id="line-1256" name="line-1256"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">directories</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">directories</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">directories</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span><span class="w"> </span><span class="p">{</span> +<a id="line-1257" name="line-1257"></a><span class="w"> </span><span class="n">g_critical</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Too many arguments. Only one directory can be specified."</span><span class="p">));</span> +<a id="line-1258" name="line-1258"></a><span class="w"> </span><span class="n">exit</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> +<a id="line-1259" name="line-1259"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1260" name="line-1260"></a> +<a id="line-1261" name="line-1261"></a><span class="w"> </span><span class="n">glibtop_init</span><span class="w"> </span><span class="p">();</span> +<a id="line-1262" name="line-1262"></a> +<a id="line-1263" name="line-1263"></a><span class="w"> </span><span class="n">gtk_window_set_default_icon_name</span><span class="w"> </span><span class="p">(</span><span class="s">"mate-disk-usage-analyzer"</span><span class="p">);</span> +<a id="line-1264" name="line-1264"></a> +<a id="line-1265" name="line-1265"></a><span class="w"> </span><span class="n">baobab_init</span><span class="w"> </span><span class="p">();</span> +<a id="line-1266" name="line-1266"></a> +<a id="line-1267" name="line-1267"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">fs</span><span class="p">.</span><span class="n">total</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-1268" name="line-1268"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">dialog</span><span class="p">;</span> +<a id="line-1269" name="line-1269"></a> +<a id="line-1270" name="line-1270"></a><span class="w"> </span><span class="n">dialog</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_message_dialog_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-1271" name="line-1271"></a><span class="w"> </span><span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">,</span> +<a id="line-1272" name="line-1272"></a><span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span> +<a id="line-1273" name="line-1273"></a><span class="w"> </span><span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span> +<a id="line-1274" name="line-1274"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Could not detect any mount point."</span><span class="p">));</span> +<a id="line-1275" name="line-1275"></a><span class="w"> </span><span class="n">gtk_message_dialog_format_secondary_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span><span class="p">(</span><span class="n">dialog</span><span class="p">),</span> +<a id="line-1276" name="line-1276"></a><span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"Without mount points disk usage cannot be analyzed."</span><span class="p">));</span> +<a id="line-1277" name="line-1277"></a><span class="w"> </span><span class="n">gtk_dialog_run</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_DIALOG</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">));</span> +<a id="line-1278" name="line-1278"></a><span class="w"> </span><span class="n">gtk_widget_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">dialog</span><span class="p">);</span> +<a id="line-1279" name="line-1279"></a><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">closing</span><span class="p">;</span> +<a id="line-1280" name="line-1280"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1281" name="line-1281"></a> +<a id="line-1282" name="line-1282"></a><span class="w"> </span><span class="n">check_menu_sens</span><span class="w"> </span><span class="p">(</span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1283" name="line-1283"></a><span class="w"> </span><span class="n">update_scan_label</span><span class="w"> </span><span class="p">();</span> +<a id="line-1284" name="line-1284"></a> +<a id="line-1285" name="line-1285"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">window</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GET_WIDGET</span><span class="w"> </span><span class="p">(</span><span class="s">"baobab_window"</span><span class="p">);</span> +<a id="line-1286" name="line-1286"></a><span class="w"> </span><span class="n">gtk_window_set_position</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_WINDOW</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">window</span><span class="p">),</span> +<a id="line-1287" name="line-1287"></a><span class="w"> </span><span class="n">GTK_WIN_POS_CENTER</span><span class="p">);</span> +<a id="line-1288" name="line-1288"></a> +<a id="line-1289" name="line-1289"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">tree_view</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">create_directory_treeview</span><span class="w"> </span><span class="p">();</span> +<a id="line-1290" name="line-1290"></a> +<a id="line-1291" name="line-1291"></a><span class="w"> </span><span class="n">gtk_action_set_sensitive</span><span class="w"> </span><span class="p">(</span><span class="n">GET_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"menurescan"</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-1292" name="line-1292"></a> +<a id="line-1293" name="line-1293"></a><span class="w"> </span><span class="cm">/* set allocated space checkbox */</span> +<a id="line-1294" name="line-1294"></a><span class="w"> </span><span class="n">gtk_toggle_action_set_active</span><span class="w"> </span><span class="p">(</span><span class="n">GET_TOGGLE_ACTION</span><span class="w"> </span><span class="p">(</span><span class="s">"ck_allocated"</span><span class="p">),</span> +<a id="line-1295" name="line-1295"></a><span class="w"> </span><span class="n">baobab</span><span class="p">.</span><span class="n">show_allocated</span><span class="p">);</span> +<a id="line-1296" name="line-1296"></a> +<a id="line-1297" name="line-1297"></a><span class="w"> </span><span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">baobab</span><span class="p">.</span><span class="n">window</span><span class="p">);</span> +<a id="line-1298" name="line-1298"></a> +<a id="line-1299" name="line-1299"></a><span class="w"> </span><span class="n">first_row</span><span class="w"> </span><span class="p">();</span> +<a id="line-1300" name="line-1300"></a><span class="w"> </span><span class="n">baobab_set_statusbar</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">"Ready"</span><span class="p">));</span> +<a id="line-1301" name="line-1301"></a> +<a id="line-1302" name="line-1302"></a><span class="w"> </span><span class="n">initialize_charts</span><span class="w"> </span><span class="p">();</span> +<a id="line-1303" name="line-1303"></a> +<a id="line-1304" name="line-1304"></a><span class="w"> </span><span class="cm">/* commandline */</span> +<a id="line-1305" name="line-1305"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">directories</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">directories</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span><span class="w"> </span><span class="p">{</span> +<a id="line-1306" name="line-1306"></a><span class="w"> </span><span class="n">GFile</span><span class="w"> </span><span class="o">*</span><span class="n">file</span><span class="p">;</span> +<a id="line-1307" name="line-1307"></a> +<a id="line-1308" name="line-1308"></a><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_file_new_for_commandline_arg</span><span class="w"> </span><span class="p">(</span><span class="n">directories</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span> +<a id="line-1309" name="line-1309"></a> +<a id="line-1310" name="line-1310"></a><span class="w"> </span><span class="cm">/* start processing the dir specified on the</span> +<a id="line-1311" name="line-1311"></a><span class="cm"> * command line as soon as we enter the main loop */</span> +<a id="line-1312" name="line-1312"></a><span class="w"> </span><span class="n">g_idle_add_full</span><span class="w"> </span><span class="p">(</span><span class="n">G_PRIORITY_DEFAULT_IDLE</span><span class="p">,</span> +<a id="line-1313" name="line-1313"></a><span class="w"> </span><span class="p">(</span><span class="n">GSourceFunc</span><span class="p">)</span><span class="w"> </span><span class="n">start_proc_on_command_line</span><span class="p">,</span> +<a id="line-1314" name="line-1314"></a><span class="w"> </span><span class="n">file</span><span class="p">,</span> +<a id="line-1315" name="line-1315"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="p">);</span> +<a id="line-1316" name="line-1316"></a><span class="w"> </span><span class="p">}</span> +<a id="line-1317" name="line-1317"></a><span class="w"> </span><span class="n">g_strfreev</span><span class="w"> </span><span class="p">(</span><span class="n">directories</span><span class="p">);</span> +<a id="line-1318" name="line-1318"></a> +<a id="line-1319" name="line-1319"></a><span class="w"> </span><span class="n">gtk_main</span><span class="w"> </span><span class="p">();</span> +<a id="line-1320" name="line-1320"></a> +<a id="line-1321" name="line-1321"></a><span class="w"> </span><span class="nl">closing</span><span class="p">:</span> +<a id="line-1322" name="line-1322"></a><span class="w"> </span><span class="n">baobab_shutdown</span><span class="w"> </span><span class="p">();</span> +<a id="line-1323" name="line-1323"></a> +<a id="line-1324" name="line-1324"></a><span class="w"> </span><span class="n">glibtop_close</span><span class="w"> </span><span class="p">();</span> +<a id="line-1325" name="line-1325"></a> +<a id="line-1326" name="line-1326"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-1327" name="line-1327"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/9.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/9.html new file mode 100644 index 00000000..763b42a1 --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/9.html @@ -0,0 +1,1531 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: gsearchtool/libmateui-deprecated/gsearchtool-entry.c</h1> + + </div> + + <div id="menu"> + <p><a href="index.html">Defects:</a> gsearchtool-entry.c</p> +<a href="9.html#line-53"> unknownMacro 53</a> + </div> + <div id="content"> +<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span> +<span class="normal"> 2</span> +<span class="normal"> 3</span> +<span class="normal"> 4</span> +<span class="normal"> 5</span> +<span class="normal"> 6</span> +<span class="normal"> 7</span> +<span class="normal"> 8</span> +<span class="normal"> 9</span> +<span class="normal"> 10</span> +<span class="normal"> 11</span> +<span class="normal"> 12</span> +<span class="normal"> 13</span> +<span class="normal"> 14</span> +<span class="normal"> 15</span> +<span class="normal"> 16</span> +<span class="normal"> 17</span> +<span class="normal"> 18</span> +<span class="normal"> 19</span> +<span class="normal"> 20</span> +<span class="normal"> 21</span> +<span class="normal"> 22</span> +<span class="normal"> 23</span> +<span class="normal"> 24</span> +<span class="normal"> 25</span> +<span class="normal"> 26</span> +<span class="normal"> 27</span> +<span class="normal"> 28</span> +<span class="normal"> 29</span> +<span class="normal"> 30</span> +<span class="normal"> 31</span> +<span class="normal"> 32</span> +<span class="normal"> 33</span> +<span class="normal"> 34</span> +<span class="normal"> 35</span> +<span class="normal"> 36</span> +<span class="normal"> 37</span> +<span class="normal"> 38</span> +<span class="normal"> 39</span> +<span class="normal"> 40</span> +<span class="normal"> 41</span> +<span class="normal"> 42</span> +<span class="normal"> 43</span> +<span class="normal"> 44</span> +<span class="normal"> 45</span> +<span class="normal"> 46</span> +<span class="normal"> 47</span> +<span class="normal"> 48</span> +<span class="normal"> 49</span> +<span class="normal"> 50</span> +<span class="normal"> 51</span> +<span class="normal"> 52</span> +<span class="normal"> 53</span> +<span class="normal"> 54</span> +<span class="normal"> 55</span> +<span class="normal"> 56</span> +<span class="normal"> 57</span> +<span class="normal"> 58</span> +<span class="normal"> 59</span> +<span class="normal"> 60</span> +<span class="normal"> 61</span> +<span class="normal"> 62</span> +<span class="normal"> 63</span> +<span class="normal"> 64</span> +<span class="normal"> 65</span> +<span class="normal"> 66</span> +<span class="normal"> 67</span> +<span class="normal"> 68</span> +<span class="normal"> 69</span> +<span class="normal"> 70</span> +<span class="normal"> 71</span> +<span class="normal"> 72</span> +<span class="normal"> 73</span> +<span class="normal"> 74</span> +<span class="normal"> 75</span> +<span class="normal"> 76</span> +<span class="normal"> 77</span> +<span class="normal"> 78</span> +<span class="normal"> 79</span> +<span class="normal"> 80</span> +<span class="normal"> 81</span> +<span class="normal"> 82</span> +<span class="normal"> 83</span> +<span class="normal"> 84</span> +<span class="normal"> 85</span> +<span class="normal"> 86</span> +<span class="normal"> 87</span> +<span class="normal"> 88</span> +<span class="normal"> 89</span> +<span class="normal"> 90</span> +<span class="normal"> 91</span> +<span class="normal"> 92</span> +<span class="normal"> 93</span> +<span class="normal"> 94</span> +<span class="normal"> 95</span> +<span class="normal"> 96</span> +<span class="normal"> 97</span> +<span class="normal"> 98</span> +<span class="normal"> 99</span> +<span class="normal">100</span> +<span class="normal">101</span> +<span class="normal">102</span> +<span class="normal">103</span> +<span class="normal">104</span> +<span class="normal">105</span> +<span class="normal">106</span> +<span class="normal">107</span> +<span class="normal">108</span> +<span class="normal">109</span> +<span class="normal">110</span> +<span class="normal">111</span> +<span class="normal">112</span> +<span class="normal">113</span> +<span class="normal">114</span> +<span class="normal">115</span> +<span class="normal">116</span> +<span class="normal">117</span> +<span class="normal">118</span> +<span class="normal">119</span> +<span class="normal">120</span> +<span class="normal">121</span> +<span class="normal">122</span> +<span class="normal">123</span> +<span class="normal">124</span> +<span class="normal">125</span> +<span class="normal">126</span> +<span class="normal">127</span> +<span class="normal">128</span> +<span class="normal">129</span> +<span class="normal">130</span> +<span class="normal">131</span> +<span class="normal">132</span> +<span class="normal">133</span> +<span class="normal">134</span> +<span class="normal">135</span> +<span class="normal">136</span> +<span class="normal">137</span> +<span class="normal">138</span> +<span class="normal">139</span> +<span class="normal">140</span> +<span class="normal">141</span> +<span class="normal">142</span> +<span class="normal">143</span> +<span class="normal">144</span> +<span class="normal">145</span> +<span class="normal">146</span> +<span class="normal">147</span> +<span class="normal">148</span> +<span class="normal">149</span> +<span class="normal">150</span> +<span class="normal">151</span> +<span class="normal">152</span> +<span class="normal">153</span> +<span class="normal">154</span> +<span class="normal">155</span> +<span class="normal">156</span> +<span class="normal">157</span> +<span class="normal">158</span> +<span class="normal">159</span> +<span class="normal">160</span> +<span class="normal">161</span> +<span class="normal">162</span> +<span class="normal">163</span> +<span class="normal">164</span> +<span class="normal">165</span> +<span class="normal">166</span> +<span class="normal">167</span> +<span class="normal">168</span> +<span class="normal">169</span> +<span class="normal">170</span> +<span class="normal">171</span> +<span class="normal">172</span> +<span class="normal">173</span> +<span class="normal">174</span> +<span class="normal">175</span> +<span class="normal">176</span> +<span class="normal">177</span> +<span class="normal">178</span> +<span class="normal">179</span> +<span class="normal">180</span> +<span class="normal">181</span> +<span class="normal">182</span> +<span class="normal">183</span> +<span class="normal">184</span> +<span class="normal">185</span> +<span class="normal">186</span> +<span class="normal">187</span> +<span class="normal">188</span> +<span class="normal">189</span> +<span class="normal">190</span> +<span class="normal">191</span> +<span class="normal">192</span> +<span class="normal">193</span> +<span class="normal">194</span> +<span class="normal">195</span> +<span class="normal">196</span> +<span class="normal">197</span> +<span class="normal">198</span> +<span class="normal">199</span> +<span class="normal">200</span> +<span class="normal">201</span> +<span class="normal">202</span> +<span class="normal">203</span> +<span class="normal">204</span> +<span class="normal">205</span> +<span class="normal">206</span> +<span class="normal">207</span> +<span class="normal">208</span> +<span class="normal">209</span> +<span class="normal">210</span> +<span class="normal">211</span> +<span class="normal">212</span> +<span class="normal">213</span> +<span class="normal">214</span> +<span class="normal">215</span> +<span class="normal">216</span> +<span class="normal">217</span> +<span class="normal">218</span> +<span class="normal">219</span> +<span class="normal">220</span> +<span class="normal">221</span> +<span class="normal">222</span> +<span class="normal">223</span> +<span class="normal">224</span> +<span class="normal">225</span> +<span class="normal">226</span> +<span class="normal">227</span> +<span class="normal">228</span> +<span class="normal">229</span> +<span class="normal">230</span> +<span class="normal">231</span> +<span class="normal">232</span> +<span class="normal">233</span> +<span class="normal">234</span> +<span class="normal">235</span> +<span class="normal">236</span> +<span class="normal">237</span> +<span class="normal">238</span> +<span class="normal">239</span> +<span class="normal">240</span> +<span class="normal">241</span> +<span class="normal">242</span> +<span class="normal">243</span> +<span class="normal">244</span> +<span class="normal">245</span> +<span class="normal">246</span> +<span class="normal">247</span> +<span class="normal">248</span> +<span class="normal">249</span> +<span class="normal">250</span> +<span class="normal">251</span> +<span class="normal">252</span> +<span class="normal">253</span> +<span class="normal">254</span> +<span class="normal">255</span> +<span class="normal">256</span> +<span class="normal">257</span> +<span class="normal">258</span> +<span class="normal">259</span> +<span class="normal">260</span> +<span class="normal">261</span> +<span class="normal">262</span> +<span class="normal">263</span> +<span class="normal">264</span> +<span class="normal">265</span> +<span class="normal">266</span> +<span class="normal">267</span> +<span class="normal">268</span> +<span class="normal">269</span> +<span class="normal">270</span> +<span class="normal">271</span> +<span class="normal">272</span> +<span class="normal">273</span> +<span class="normal">274</span> +<span class="normal">275</span> +<span class="normal">276</span> +<span class="normal">277</span> +<span class="normal">278</span> +<span class="normal">279</span> +<span class="normal">280</span> +<span class="normal">281</span> +<span class="normal">282</span> +<span class="normal">283</span> +<span class="normal">284</span> +<span class="normal">285</span> +<span class="normal">286</span> +<span class="normal">287</span> +<span class="normal">288</span> +<span class="normal">289</span> +<span class="normal">290</span> +<span class="normal">291</span> +<span class="normal">292</span> +<span class="normal">293</span> +<span class="normal">294</span> +<span class="normal">295</span> +<span class="normal">296</span> +<span class="normal">297</span> +<span class="normal">298</span> +<span class="normal">299</span> +<span class="normal">300</span> +<span class="normal">301</span> +<span class="normal">302</span> +<span class="normal">303</span> +<span class="normal">304</span> +<span class="normal">305</span> +<span class="normal">306</span> +<span class="normal">307</span> +<span class="normal">308</span> +<span class="normal">309</span> +<span class="normal">310</span> +<span class="normal">311</span> +<span class="normal">312</span> +<span class="normal">313</span> +<span class="normal">314</span> +<span class="normal">315</span> +<span class="normal">316</span> +<span class="normal">317</span> +<span class="normal">318</span> +<span class="normal">319</span> +<span class="normal">320</span> +<span class="normal">321</span> +<span class="normal">322</span> +<span class="normal">323</span> +<span class="normal">324</span> +<span class="normal">325</span> +<span class="normal">326</span> +<span class="normal">327</span> +<span class="normal">328</span> +<span class="normal">329</span> +<span class="normal">330</span> +<span class="normal">331</span> +<span class="normal">332</span> +<span class="normal">333</span> +<span class="normal">334</span> +<span class="normal">335</span> +<span class="normal">336</span> +<span class="normal">337</span> +<span class="normal">338</span> +<span class="normal">339</span> +<span class="normal">340</span> +<span class="normal">341</span> +<span class="normal">342</span> +<span class="normal">343</span> +<span class="normal">344</span> +<span class="normal">345</span> +<span class="normal">346</span> +<span class="normal">347</span> +<span class="normal">348</span> +<span class="normal">349</span> +<span class="normal">350</span> +<span class="normal">351</span> +<span class="normal">352</span> +<span class="normal">353</span> +<span class="normal">354</span> +<span class="normal">355</span> +<span class="normal">356</span> +<span class="normal">357</span> +<span class="normal">358</span> +<span class="normal">359</span> +<span class="normal">360</span> +<span class="normal">361</span> +<span class="normal">362</span> +<span class="normal">363</span> +<span class="normal">364</span> +<span class="normal">365</span> +<span class="normal">366</span> +<span class="normal">367</span> +<span class="normal">368</span> +<span class="normal">369</span> +<span class="normal">370</span> +<span class="normal">371</span> +<span class="normal">372</span> +<span class="normal">373</span> +<span class="normal">374</span> +<span class="normal">375</span> +<span class="normal">376</span> +<span class="normal">377</span> +<span class="normal">378</span> +<span class="normal">379</span> +<span class="normal">380</span> +<span class="normal">381</span> +<span class="normal">382</span> +<span class="normal">383</span> +<span class="normal">384</span> +<span class="normal">385</span> +<span class="normal">386</span> +<span class="normal">387</span> +<span class="normal">388</span> +<span class="normal">389</span> +<span class="normal">390</span> +<span class="normal">391</span> +<span class="normal">392</span> +<span class="normal">393</span> +<span class="normal">394</span> +<span class="normal">395</span> +<span class="normal">396</span> +<span class="normal">397</span> +<span class="normal">398</span> +<span class="normal">399</span> +<span class="normal">400</span> +<span class="normal">401</span> +<span class="normal">402</span> +<span class="normal">403</span> +<span class="normal">404</span> +<span class="normal">405</span> +<span class="normal">406</span> +<span class="normal">407</span> +<span class="normal">408</span> +<span class="normal">409</span> +<span class="normal">410</span> +<span class="normal">411</span> +<span class="normal">412</span> +<span class="normal">413</span> +<span class="normal">414</span> +<span class="normal">415</span> +<span class="normal">416</span> +<span class="normal">417</span> +<span class="normal">418</span> +<span class="normal">419</span> +<span class="normal">420</span> +<span class="normal">421</span> +<span class="normal">422</span> +<span class="normal">423</span> +<span class="normal">424</span> +<span class="normal">425</span> +<span class="normal">426</span> +<span class="normal">427</span> +<span class="normal">428</span> +<span class="normal">429</span> +<span class="normal">430</span> +<span class="normal">431</span> +<span class="normal">432</span> +<span class="normal">433</span> +<span class="normal">434</span> +<span class="normal">435</span> +<span class="normal">436</span> +<span class="normal">437</span> +<span class="normal">438</span> +<span class="normal">439</span> +<span class="normal">440</span> +<span class="normal">441</span> +<span class="normal">442</span> +<span class="normal">443</span> +<span class="normal">444</span> +<span class="normal">445</span> +<span class="normal">446</span> +<span class="normal">447</span> +<span class="normal">448</span> +<span class="normal">449</span> +<span class="normal">450</span> +<span class="normal">451</span> +<span class="normal">452</span> +<span class="normal">453</span> +<span class="normal">454</span> +<span class="normal">455</span> +<span class="normal">456</span> +<span class="normal">457</span> +<span class="normal">458</span> +<span class="normal">459</span> +<span class="normal">460</span> +<span class="normal">461</span> +<span class="normal">462</span> +<span class="normal">463</span> +<span class="normal">464</span> +<span class="normal">465</span> +<span class="normal">466</span> +<span class="normal">467</span> +<span class="normal">468</span> +<span class="normal">469</span> +<span class="normal">470</span> +<span class="normal">471</span> +<span class="normal">472</span> +<span class="normal">473</span> +<span class="normal">474</span> +<span class="normal">475</span> +<span class="normal">476</span> +<span class="normal">477</span> +<span class="normal">478</span> +<span class="normal">479</span> +<span class="normal">480</span> +<span class="normal">481</span> +<span class="normal">482</span> +<span class="normal">483</span> +<span class="normal">484</span> +<span class="normal">485</span> +<span class="normal">486</span> +<span class="normal">487</span> +<span class="normal">488</span> +<span class="normal">489</span> +<span class="normal">490</span> +<span class="normal">491</span> +<span class="normal">492</span> +<span class="normal">493</span> +<span class="normal">494</span> +<span class="normal">495</span> +<span class="normal">496</span> +<span class="normal">497</span> +<span class="normal">498</span> +<span class="normal">499</span> +<span class="normal">500</span> +<span class="normal">501</span> +<span class="normal">502</span> +<span class="normal">503</span> +<span class="normal">504</span> +<span class="normal">505</span> +<span class="normal">506</span> +<span class="normal">507</span> +<span class="normal">508</span> +<span class="normal">509</span> +<span class="normal">510</span> +<span class="normal">511</span> +<span class="normal">512</span> +<span class="normal">513</span> +<span class="normal">514</span> +<span class="normal">515</span> +<span class="normal">516</span> +<span class="normal">517</span> +<span class="normal">518</span> +<span class="normal">519</span> +<span class="normal">520</span> +<span class="normal">521</span> +<span class="normal">522</span> +<span class="normal">523</span> +<span class="normal">524</span> +<span class="normal">525</span> +<span class="normal">526</span> +<span class="normal">527</span> +<span class="normal">528</span> +<span class="normal">529</span> +<span class="normal">530</span> +<span class="normal">531</span> +<span class="normal">532</span> +<span class="normal">533</span> +<span class="normal">534</span> +<span class="normal">535</span> +<span class="normal">536</span> +<span class="normal">537</span> +<span class="normal">538</span> +<span class="normal">539</span> +<span class="normal">540</span> +<span class="normal">541</span> +<span class="normal">542</span> +<span class="normal">543</span> +<span class="normal">544</span> +<span class="normal">545</span> +<span class="normal">546</span> +<span class="normal">547</span> +<span class="normal">548</span> +<span class="normal">549</span> +<span class="normal">550</span> +<span class="normal">551</span> +<span class="normal">552</span> +<span class="normal">553</span> +<span class="normal">554</span> +<span class="normal">555</span> +<span class="normal">556</span> +<span class="normal">557</span> +<span class="normal">558</span> +<span class="normal">559</span> +<span class="normal">560</span> +<span class="normal">561</span> +<span class="normal">562</span> +<span class="normal">563</span> +<span class="normal">564</span> +<span class="normal">565</span> +<span class="normal">566</span> +<span class="normal">567</span> +<span class="normal">568</span> +<span class="normal">569</span> +<span class="normal">570</span> +<span class="normal">571</span> +<span class="normal">572</span> +<span class="normal">573</span> +<span class="normal">574</span> +<span class="normal">575</span> +<span class="normal">576</span> +<span class="normal">577</span> +<span class="normal">578</span> +<span class="normal">579</span> +<span class="normal">580</span> +<span class="normal">581</span> +<span class="normal">582</span> +<span class="normal">583</span> +<span class="normal">584</span> +<span class="normal">585</span> +<span class="normal">586</span> +<span class="normal">587</span> +<span class="normal">588</span> +<span class="normal">589</span> +<span class="normal">590</span> +<span class="normal">591</span> +<span class="normal">592</span> +<span class="normal">593</span> +<span class="normal">594</span> +<span class="normal">595</span> +<span class="normal">596</span> +<span class="normal">597</span> +<span class="normal">598</span> +<span class="normal">599</span> +<span class="normal">600</span> +<span class="normal">601</span> +<span class="normal">602</span> +<span class="normal">603</span> +<span class="normal">604</span> +<span class="normal">605</span> +<span class="normal">606</span> +<span class="normal">607</span> +<span class="normal">608</span> +<span class="normal">609</span> +<span class="normal">610</span> +<span class="normal">611</span> +<span class="normal">612</span> +<span class="normal">613</span> +<span class="normal">614</span> +<span class="normal">615</span> +<span class="normal">616</span> +<span class="normal">617</span> +<span class="normal">618</span> +<span class="normal">619</span> +<span class="normal">620</span> +<span class="normal">621</span> +<span class="normal">622</span> +<span class="normal">623</span> +<span class="normal">624</span> +<span class="normal">625</span> +<span class="normal">626</span> +<span class="normal">627</span> +<span class="normal">628</span> +<span class="normal">629</span> +<span class="normal">630</span> +<span class="normal">631</span> +<span class="normal">632</span> +<span class="normal">633</span> +<span class="normal">634</span> +<span class="normal">635</span> +<span class="normal">636</span> +<span class="normal">637</span> +<span class="normal">638</span> +<span class="normal">639</span> +<span class="normal">640</span> +<span class="normal">641</span> +<span class="normal">642</span> +<span class="normal">643</span> +<span class="normal">644</span> +<span class="normal">645</span> +<span class="normal">646</span> +<span class="normal">647</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cm">/* Copyright (C) 2009 Dennis Cranston</span> +<a id="line-2" name="line-2"></a><span class="cm"> *</span> +<a id="line-3" name="line-3"></a><span class="cm"> * This file was modified from gedit (gedit-history-entry.c).</span> +<a id="line-4" name="line-4"></a><span class="cm"> * Copyright (C) Paolo Borelli</span> +<a id="line-5" name="line-5"></a><span class="cm"> *</span> +<a id="line-6" name="line-6"></a><span class="cm"> * This file is part of MATE Utils.</span> +<a id="line-7" name="line-7"></a><span class="cm"> *</span> +<a id="line-8" name="line-8"></a><span class="cm"> * MATE Utils is free software: you can redistribute it and/or modify</span> +<a id="line-9" name="line-9"></a><span class="cm"> * it under the terms of the GNU General Public License as published by</span> +<a id="line-10" name="line-10"></a><span class="cm"> * the Free Software Foundation, either version 2 of the License, or</span> +<a id="line-11" name="line-11"></a><span class="cm"> * (at your option) any later version.</span> +<a id="line-12" name="line-12"></a><span class="cm"> *</span> +<a id="line-13" name="line-13"></a><span class="cm"> * MATE Utils is distributed in the hope that it will be useful,</span> +<a id="line-14" name="line-14"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> +<a id="line-15" name="line-15"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> +<a id="line-16" name="line-16"></a><span class="cm"> * GNU General Public License for more details.</span> +<a id="line-17" name="line-17"></a><span class="cm"> *</span> +<a id="line-18" name="line-18"></a><span class="cm"> * You should have received a copy of the GNU General Public License</span> +<a id="line-19" name="line-19"></a><span class="cm"> * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.</span> +<a id="line-20" name="line-20"></a><span class="cm"> *</span> +<a id="line-21" name="line-21"></a><span class="cm"> * Author: Paolo Borelli</span> +<a id="line-22" name="line-22"></a><span class="cm"> */</span> +<a id="line-23" name="line-23"></a> +<a id="line-24" name="line-24"></a><span class="cp">#ifdef HAVE_CONFIG_H</span> +<a id="line-25" name="line-25"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><config.h></span> +<a id="line-26" name="line-26"></a><span class="cp">#endif</span> +<a id="line-27" name="line-27"></a> +<a id="line-28" name="line-28"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><string.h></span> +<a id="line-29" name="line-29"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib/gi18n.h></span> +<a id="line-30" name="line-30"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf"><gtk/gtk.h></span> +<a id="line-31" name="line-31"></a> +<a id="line-32" name="line-32"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"gsearchtool-entry.h"</span> +<a id="line-33" name="line-33"></a> +<a id="line-34" name="line-34"></a><span class="k">enum</span><span class="w"> </span><span class="p">{</span> +<a id="line-35" name="line-35"></a><span class="w"> </span><span class="n">PROP_0</span><span class="p">,</span> +<a id="line-36" name="line-36"></a><span class="w"> </span><span class="n">PROP_HISTORY_ID</span><span class="p">,</span> +<a id="line-37" name="line-37"></a><span class="w"> </span><span class="n">PROP_HISTORY_LENGTH</span> +<a id="line-38" name="line-38"></a><span class="p">};</span> +<a id="line-39" name="line-39"></a> +<a id="line-40" name="line-40"></a><span class="cp">#define MIN_ITEM_LEN 0</span> +<a id="line-41" name="line-41"></a><span class="cp">#define GSEARCH_HISTORY_ENTRY_HISTORY_LENGTH_DEFAULT 10</span> +<a id="line-42" name="line-42"></a> +<a id="line-43" name="line-43"></a><span class="k">struct</span><span class="w"> </span><span class="nc">_GsearchHistoryEntryPrivate</span> +<a id="line-44" name="line-44"></a><span class="p">{</span> +<a id="line-45" name="line-45"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">history_id</span><span class="p">;</span> +<a id="line-46" name="line-46"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">history_length</span><span class="p">;</span> +<a id="line-47" name="line-47"></a> +<a id="line-48" name="line-48"></a><span class="w"> </span><span class="n">GtkEntryCompletion</span><span class="w"> </span><span class="o">*</span><span class="n">completion</span><span class="p">;</span> +<a id="line-49" name="line-49"></a> +<a id="line-50" name="line-50"></a><span class="w"> </span><span class="n">GSettings</span><span class="w"> </span><span class="o">*</span><span class="n">settings</span><span class="p">;</span> +<a id="line-51" name="line-51"></a><span class="p">};</span> +<a id="line-52" name="line-52"></a> +<a id="line-53" name="line-53"></a><span class="hll"><span class="n">G_DEFINE_TYPE_WITH_PRIVATE</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="p">,</span><span class="w"> </span><span class="n">gsearch_history_entry</span><span class="p">,</span><span class="w"> </span><span class="n">GTK_TYPE_COMBO_BOX</span><span class="p">)</span><span class="error2"><--- There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</span> +</span><a id="line-54" name="line-54"></a> +<a id="line-55" name="line-55"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-56" name="line-56"></a><span class="n">gsearch_history_entry_set_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-57" name="line-57"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-58" name="line-58"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-59" name="line-59"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">spec</span><span class="p">)</span> +<a id="line-60" name="line-60"></a><span class="p">{</span> +<a id="line-61" name="line-61"></a><span class="w"> </span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">;</span> +<a id="line-62" name="line-62"></a> +<a id="line-63" name="line-63"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">));</span> +<a id="line-64" name="line-64"></a> +<a id="line-65" name="line-65"></a><span class="w"> </span><span class="n">entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-66" name="line-66"></a> +<a id="line-67" name="line-67"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-68" name="line-68"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_HISTORY_ID</span><span class="p">:</span> +<a id="line-69" name="line-69"></a><span class="w"> </span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">history_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_value_dup_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">);</span> +<a id="line-70" name="line-70"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-71" name="line-71"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_HISTORY_LENGTH</span><span class="p">:</span> +<a id="line-72" name="line-72"></a><span class="w"> </span><span class="n">gsearch_history_entry_set_history_length</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">,</span> +<a id="line-73" name="line-73"></a><span class="w"> </span><span class="n">g_value_get_uint</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">));</span> +<a id="line-74" name="line-74"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-75" name="line-75"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-76" name="line-76"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-77" name="line-77"></a><span class="w"> </span><span class="p">}</span> +<a id="line-78" name="line-78"></a><span class="p">}</span> +<a id="line-79" name="line-79"></a> +<a id="line-80" name="line-80"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-81" name="line-81"></a><span class="n">gsearch_history_entry_get_property</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> +<a id="line-82" name="line-82"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span> +<a id="line-83" name="line-83"></a><span class="w"> </span><span class="n">GValue</span><span class="w"> </span><span class="o">*</span><span class="n">value</span><span class="p">,</span> +<a id="line-84" name="line-84"></a><span class="w"> </span><span class="n">GParamSpec</span><span class="w"> </span><span class="o">*</span><span class="n">spec</span><span class="p">)</span> +<a id="line-85" name="line-85"></a><span class="p">{</span> +<a id="line-86" name="line-86"></a><span class="w"> </span><span class="n">GsearchHistoryEntryPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-87" name="line-87"></a> +<a id="line-88" name="line-88"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">));</span> +<a id="line-89" name="line-89"></a> +<a id="line-90" name="line-90"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-91" name="line-91"></a> +<a id="line-92" name="line-92"></a><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">prop_id</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-93" name="line-93"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_HISTORY_ID</span><span class="p">:</span> +<a id="line-94" name="line-94"></a><span class="w"> </span><span class="n">g_value_set_string</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">history_id</span><span class="p">);</span> +<a id="line-95" name="line-95"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-96" name="line-96"></a><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="no">PROP_HISTORY_LENGTH</span><span class="p">:</span> +<a id="line-97" name="line-97"></a><span class="w"> </span><span class="n">g_value_set_uint</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">history_length</span><span class="p">);</span> +<a id="line-98" name="line-98"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-99" name="line-99"></a><span class="w"> </span><span class="k">default</span><span class="o">:</span> +<a id="line-100" name="line-100"></a><span class="w"> </span><span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="n">prop_id</span><span class="p">,</span><span class="w"> </span><span class="n">spec</span><span class="p">);</span> +<a id="line-101" name="line-101"></a><span class="w"> </span><span class="p">}</span> +<a id="line-102" name="line-102"></a><span class="p">}</span> +<a id="line-103" name="line-103"></a> +<a id="line-104" name="line-104"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-105" name="line-105"></a><span class="n">gsearch_history_entry_destroy</span><span class="w"> </span><span class="p">(</span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-106" name="line-106"></a><span class="p">{</span> +<a id="line-107" name="line-107"></a><span class="w"> </span><span class="n">gsearch_history_entry_set_enable_completion</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">),</span> +<a id="line-108" name="line-108"></a><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-109" name="line-109"></a> +<a id="line-110" name="line-110"></a><span class="w"> </span><span class="n">GTK_WIDGET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch_history_entry_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">destroy</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-111" name="line-111"></a><span class="p">}</span> +<a id="line-112" name="line-112"></a> +<a id="line-113" name="line-113"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-114" name="line-114"></a><span class="n">gsearch_history_entry_finalize</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">)</span> +<a id="line-115" name="line-115"></a><span class="p">{</span> +<a id="line-116" name="line-116"></a><span class="w"> </span><span class="n">GsearchHistoryEntryPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-117" name="line-117"></a> +<a id="line-118" name="line-118"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">)</span><span class="o">-></span><span class="n">priv</span><span class="p">;</span> +<a id="line-119" name="line-119"></a> +<a id="line-120" name="line-120"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">history_id</span><span class="p">);</span> +<a id="line-121" name="line-121"></a> +<a id="line-122" name="line-122"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">settings</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-123" name="line-123"></a><span class="w"> </span><span class="p">{</span> +<a id="line-124" name="line-124"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">priv</span><span class="o">-></span><span class="n">settings</span><span class="p">));</span> +<a id="line-125" name="line-125"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-126" name="line-126"></a><span class="w"> </span><span class="p">}</span> +<a id="line-127" name="line-127"></a> +<a id="line-128" name="line-128"></a><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch_history_entry_parent_class</span><span class="p">)</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="p">(</span><span class="n">object</span><span class="p">);</span> +<a id="line-129" name="line-129"></a><span class="p">}</span> +<a id="line-130" name="line-130"></a> +<a id="line-131" name="line-131"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-132" name="line-132"></a><span class="n">gsearch_history_entry_class_init</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntryClass</span><span class="w"> </span><span class="o">*</span><span class="n">klass</span><span class="p">)</span> +<a id="line-133" name="line-133"></a><span class="p">{</span> +<a id="line-134" name="line-134"></a><span class="w"> </span><span class="n">GObjectClass</span><span class="w"> </span><span class="o">*</span><span class="n">object_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_OBJECT_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-135" name="line-135"></a><span class="w"> </span><span class="n">GtkWidgetClass</span><span class="w"> </span><span class="o">*</span><span class="n">gtkwidget_class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_WIDGET_CLASS</span><span class="w"> </span><span class="p">(</span><span class="n">klass</span><span class="p">);</span> +<a id="line-136" name="line-136"></a> +<a id="line-137" name="line-137"></a><span class="w"> </span><span class="n">object_class</span><span class="o">-></span><span class="n">set_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch_history_entry_set_property</span><span class="p">;</span> +<a id="line-138" name="line-138"></a><span class="w"> </span><span class="n">object_class</span><span class="o">-></span><span class="n">get_property</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch_history_entry_get_property</span><span class="p">;</span> +<a id="line-139" name="line-139"></a><span class="w"> </span><span class="n">object_class</span><span class="o">-></span><span class="n">finalize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch_history_entry_finalize</span><span class="p">;</span> +<a id="line-140" name="line-140"></a><span class="w"> </span><span class="n">gtkwidget_class</span><span class="o">-></span><span class="n">destroy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch_history_entry_destroy</span><span class="p">;</span> +<a id="line-141" name="line-141"></a> +<a id="line-142" name="line-142"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">,</span> +<a id="line-143" name="line-143"></a><span class="w"> </span><span class="n">PROP_HISTORY_ID</span><span class="p">,</span> +<a id="line-144" name="line-144"></a><span class="w"> </span><span class="n">g_param_spec_string</span><span class="w"> </span><span class="p">(</span><span class="s">"history-id"</span><span class="p">,</span> +<a id="line-145" name="line-145"></a><span class="w"> </span><span class="s">"History ID"</span><span class="p">,</span> +<a id="line-146" name="line-146"></a><span class="w"> </span><span class="s">"History ID"</span><span class="p">,</span> +<a id="line-147" name="line-147"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-148" name="line-148"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span> +<a id="line-149" name="line-149"></a><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="p">));</span> +<a id="line-150" name="line-150"></a> +<a id="line-151" name="line-151"></a><span class="w"> </span><span class="n">g_object_class_install_property</span><span class="w"> </span><span class="p">(</span><span class="n">object_class</span><span class="p">,</span> +<a id="line-152" name="line-152"></a><span class="w"> </span><span class="n">PROP_HISTORY_LENGTH</span><span class="p">,</span> +<a id="line-153" name="line-153"></a><span class="w"> </span><span class="n">g_param_spec_uint</span><span class="w"> </span><span class="p">(</span><span class="s">"history-length"</span><span class="p">,</span> +<a id="line-154" name="line-154"></a><span class="w"> </span><span class="s">"Max History Length"</span><span class="p">,</span> +<a id="line-155" name="line-155"></a><span class="w"> </span><span class="s">"Max History Length"</span><span class="p">,</span> +<a id="line-156" name="line-156"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-157" name="line-157"></a><span class="w"> </span><span class="n">G_MAXUINT</span><span class="p">,</span> +<a id="line-158" name="line-158"></a><span class="w"> </span><span class="n">GSEARCH_HISTORY_ENTRY_HISTORY_LENGTH_DEFAULT</span><span class="p">,</span> +<a id="line-159" name="line-159"></a><span class="w"> </span><span class="n">G_PARAM_READWRITE</span><span class="w"> </span><span class="o">|</span> +<a id="line-160" name="line-160"></a><span class="w"> </span><span class="n">G_PARAM_STATIC_STRINGS</span><span class="p">));</span> +<a id="line-161" name="line-161"></a> +<a id="line-162" name="line-162"></a><span class="w"> </span><span class="cm">/* TODO: Add enable-completion property */</span> +<a id="line-163" name="line-163"></a><span class="p">}</span> +<a id="line-164" name="line-164"></a> +<a id="line-165" name="line-165"></a><span class="k">static</span><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span> +<a id="line-166" name="line-166"></a><span class="n">get_history_store</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-167" name="line-167"></a><span class="p">{</span> +<a id="line-168" name="line-168"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">;</span> +<a id="line-169" name="line-169"></a> +<a id="line-170" name="line-170"></a><span class="w"> </span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_combo_box_get_model</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_COMBO_BOX</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-171" name="line-171"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_IS_LIST_STORE</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-172" name="line-172"></a> +<a id="line-173" name="line-173"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">store</span><span class="p">;</span> +<a id="line-174" name="line-174"></a><span class="p">}</span> +<a id="line-175" name="line-175"></a> +<a id="line-176" name="line-176"></a><span class="k">static</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span> +<a id="line-177" name="line-177"></a><span class="n">get_history_key</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-178" name="line-178"></a><span class="p">{</span> +<a id="line-179" name="line-179"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">history_id</span><span class="p">);</span> +<a id="line-180" name="line-180"></a><span class="p">}</span> +<a id="line-181" name="line-181"></a> +<a id="line-182" name="line-182"></a><span class="k">static</span><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span> +<a id="line-183" name="line-183"></a><span class="n">get_history_list</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-184" name="line-184"></a><span class="p">{</span> +<a id="line-185" name="line-185"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">;</span> +<a id="line-186" name="line-186"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-187" name="line-187"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">valid</span><span class="p">;</span> +<a id="line-188" name="line-188"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-189" name="line-189"></a> +<a id="line-190" name="line-190"></a><span class="w"> </span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_history_store</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> +<a id="line-191" name="line-191"></a> +<a id="line-192" name="line-192"></a><span class="w"> </span><span class="n">valid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_get_iter_first</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span> +<a id="line-193" name="line-193"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-194" name="line-194"></a> +<a id="line-195" name="line-195"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">valid</span><span class="p">)</span> +<a id="line-196" name="line-196"></a><span class="w"> </span><span class="p">{</span> +<a id="line-197" name="line-197"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">;</span> +<a id="line-198" name="line-198"></a> +<a id="line-199" name="line-199"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span> +<a id="line-200" name="line-200"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-201" name="line-201"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">str</span><span class="p">,</span> +<a id="line-202" name="line-202"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-203" name="line-203"></a> +<a id="line-204" name="line-204"></a><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_slist_prepend</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">str</span><span class="p">);</span> +<a id="line-205" name="line-205"></a> +<a id="line-206" name="line-206"></a><span class="w"> </span><span class="n">valid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_model_iter_next</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span> +<a id="line-207" name="line-207"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-208" name="line-208"></a><span class="w"> </span><span class="p">}</span> +<a id="line-209" name="line-209"></a> +<a id="line-210" name="line-210"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_slist_reverse</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span> +<a id="line-211" name="line-211"></a><span class="p">}</span> +<a id="line-212" name="line-212"></a> +<a id="line-213" name="line-213"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-214" name="line-214"></a><span class="n">gsearch_history_entry_save_history</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-215" name="line-215"></a><span class="p">{</span> +<a id="line-216" name="line-216"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">history</span><span class="p">;</span> +<a id="line-217" name="line-217"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">items</span><span class="p">;</span> +<a id="line-218" name="line-218"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">;</span> +<a id="line-219" name="line-219"></a><span class="w"> </span><span class="n">GVariantBuilder</span><span class="w"> </span><span class="n">item_builder</span><span class="p">;</span> +<a id="line-220" name="line-220"></a><span class="w"> </span><span class="n">GVariantBuilder</span><span class="w"> </span><span class="n">history_builder</span><span class="p">;</span> +<a id="line-221" name="line-221"></a><span class="w"> </span><span class="n">GVariantIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">;</span> +<a id="line-222" name="line-222"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">item</span><span class="p">;</span> +<a id="line-223" name="line-223"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">history_list</span><span class="p">;</span> +<a id="line-224" name="line-224"></a><span class="w"> </span><span class="n">GSList</span><span class="w"> </span><span class="o">*</span><span class="n">list_iter</span><span class="p">;</span> +<a id="line-225" name="line-225"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">history_key</span><span class="p">;</span> +<a id="line-226" name="line-226"></a> +<a id="line-227" name="line-227"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-228" name="line-228"></a> +<a id="line-229" name="line-229"></a><span class="w"> </span><span class="n">items</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_history_list</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> +<a id="line-230" name="line-230"></a><span class="w"> </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_history_key</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> +<a id="line-231" name="line-231"></a> +<a id="line-232" name="line-232"></a><span class="w"> </span><span class="n">history</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_value</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span> +<a id="line-233" name="line-233"></a><span class="w"> </span><span class="s">"search-history"</span><span class="p">);</span> +<a id="line-234" name="line-234"></a> +<a id="line-235" name="line-235"></a><span class="w"> </span><span class="n">g_variant_builder_init</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">item_builder</span><span class="p">,</span><span class="w"> </span><span class="n">G_VARIANT_TYPE</span><span class="w"> </span><span class="p">(</span><span class="s">"as"</span><span class="p">));</span> +<a id="line-236" name="line-236"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">list_iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">items</span><span class="p">;</span><span class="w"> </span><span class="n">list_iter</span><span class="p">;</span><span class="w"> </span><span class="n">list_iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list_iter</span><span class="o">-></span><span class="n">next</span><span class="p">)</span> +<a id="line-237" name="line-237"></a><span class="w"> </span><span class="n">g_variant_builder_add</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">item_builder</span><span class="p">,</span><span class="w"> </span><span class="s">"s"</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">list_iter</span><span class="o">-></span><span class="n">data</span><span class="p">);</span> +<a id="line-238" name="line-238"></a> +<a id="line-239" name="line-239"></a><span class="w"> </span><span class="n">g_variant_builder_init</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">history_builder</span><span class="p">,</span><span class="w"> </span><span class="n">G_VARIANT_TYPE</span><span class="w"> </span><span class="p">(</span><span class="s">"a{sas}"</span><span class="p">));</span> +<a id="line-240" name="line-240"></a><span class="w"> </span><span class="n">g_variant_builder_add</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">history_builder</span><span class="p">,</span><span class="w"> </span><span class="s">"{sas}"</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">item_builder</span><span class="p">);</span> +<a id="line-241" name="line-241"></a> +<a id="line-242" name="line-242"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">history</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-243" name="line-243"></a><span class="w"> </span><span class="n">g_variant_get</span><span class="w"> </span><span class="p">(</span><span class="n">history</span><span class="p">,</span><span class="w"> </span><span class="s">"a{sas}"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-244" name="line-244"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_variant_iter_next_value</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-245" name="line-245"></a><span class="w"> </span><span class="n">g_variant_get</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="w"> </span><span class="s">"{s@as}"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">history_key</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">history_list</span><span class="p">);</span> +<a id="line-246" name="line-246"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">history_key</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-247" name="line-247"></a><span class="w"> </span><span class="n">g_variant_builder_add</span><span class="w"> </span><span class="p">(</span><span class="o">&</span><span class="n">history_builder</span><span class="p">,</span><span class="w"> </span><span class="s">"{s@as}"</span><span class="p">,</span><span class="w"> </span><span class="n">history_key</span><span class="p">,</span><span class="w"> </span><span class="n">history_list</span><span class="p">);</span> +<a id="line-248" name="line-248"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">history_key</span><span class="p">);</span> +<a id="line-249" name="line-249"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">history_list</span><span class="p">);</span> +<a id="line-250" name="line-250"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">item</span><span class="p">);</span> +<a id="line-251" name="line-251"></a><span class="w"> </span><span class="p">}</span> +<a id="line-252" name="line-252"></a><span class="w"> </span><span class="n">g_variant_iter_free</span><span class="w"> </span><span class="p">(</span><span class="n">iter</span><span class="p">);</span> +<a id="line-253" name="line-253"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">history</span><span class="p">);</span> +<a id="line-254" name="line-254"></a><span class="w"> </span><span class="p">}</span> +<a id="line-255" name="line-255"></a> +<a id="line-256" name="line-256"></a><span class="w"> </span><span class="n">g_settings_set_value</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span> +<a id="line-257" name="line-257"></a><span class="w"> </span><span class="s">"search-history"</span><span class="p">,</span> +<a id="line-258" name="line-258"></a><span class="w"> </span><span class="n">g_variant_new</span><span class="w"> </span><span class="p">(</span><span class="s">"a{sas}"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">history_builder</span><span class="p">));</span> +<a id="line-259" name="line-259"></a> +<a id="line-260" name="line-260"></a><span class="w"> </span><span class="n">g_slist_free_full</span><span class="w"> </span><span class="p">(</span><span class="n">items</span><span class="p">,</span><span class="w"> </span><span class="n">g_free</span><span class="p">);</span> +<a id="line-261" name="line-261"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">key</span><span class="p">);</span> +<a id="line-262" name="line-262"></a><span class="p">}</span> +<a id="line-263" name="line-263"></a> +<a id="line-264" name="line-264"></a><span class="k">static</span><span class="w"> </span><span class="n">gboolean</span> +<a id="line-265" name="line-265"></a><span class="n">remove_item</span><span class="w"> </span><span class="p">(</span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">,</span> +<a id="line-266" name="line-266"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">)</span> +<a id="line-267" name="line-267"></a><span class="p">{</span> +<a id="line-268" name="line-268"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-269" name="line-269"></a> +<a id="line-270" name="line-270"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-271" name="line-271"></a> +<a id="line-272" name="line-272"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_tree_model_get_iter_first</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">))</span> +<a id="line-273" name="line-273"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-274" name="line-274"></a> +<a id="line-275" name="line-275"></a><span class="w"> </span><span class="k">do</span> +<a id="line-276" name="line-276"></a><span class="w"> </span><span class="p">{</span> +<a id="line-277" name="line-277"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">item_text</span><span class="p">;</span> +<a id="line-278" name="line-278"></a> +<a id="line-279" name="line-279"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span> +<a id="line-280" name="line-280"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-281" name="line-281"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-282" name="line-282"></a><span class="w"> </span><span class="o">&</span><span class="n">item_text</span><span class="p">,</span> +<a id="line-283" name="line-283"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-284" name="line-284"></a> +<a id="line-285" name="line-285"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">item_text</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span> +<a id="line-286" name="line-286"></a><span class="w"> </span><span class="n">strcmp</span><span class="w"> </span><span class="p">(</span><span class="n">item_text</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span> +<a id="line-287" name="line-287"></a><span class="w"> </span><span class="p">{</span> +<a id="line-288" name="line-288"></a><span class="w"> </span><span class="n">gtk_list_store_remove</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-289" name="line-289"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">item_text</span><span class="p">);</span> +<a id="line-290" name="line-290"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span> +<a id="line-291" name="line-291"></a><span class="w"> </span><span class="p">}</span> +<a id="line-292" name="line-292"></a> +<a id="line-293" name="line-293"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">item_text</span><span class="p">);</span> +<a id="line-294" name="line-294"></a> +<a id="line-295" name="line-295"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_model_iter_next</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">));</span> +<a id="line-296" name="line-296"></a> +<a id="line-297" name="line-297"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span> +<a id="line-298" name="line-298"></a><span class="p">}</span> +<a id="line-299" name="line-299"></a> +<a id="line-300" name="line-300"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-301" name="line-301"></a><span class="n">clamp_list_store</span><span class="w"> </span><span class="p">(</span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">,</span> +<a id="line-302" name="line-302"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">max</span><span class="p">)</span> +<a id="line-303" name="line-303"></a><span class="p">{</span> +<a id="line-304" name="line-304"></a><span class="w"> </span><span class="n">GtkTreePath</span><span class="w"> </span><span class="o">*</span><span class="n">path</span><span class="p">;</span> +<a id="line-305" name="line-305"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-306" name="line-306"></a> +<a id="line-307" name="line-307"></a><span class="w"> </span><span class="cm">/* -1 because TreePath counts from 0 */</span> +<a id="line-308" name="line-308"></a><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_tree_path_new_from_indices</span><span class="w"> </span><span class="p">(</span><span class="n">max</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-309" name="line-309"></a> +<a id="line-310" name="line-310"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_tree_model_get_iter</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">),</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">))</span> +<a id="line-311" name="line-311"></a><span class="w"> </span><span class="p">{</span> +<a id="line-312" name="line-312"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> +<a id="line-313" name="line-313"></a><span class="w"> </span><span class="p">{</span> +<a id="line-314" name="line-314"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gtk_list_store_remove</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">))</span> +<a id="line-315" name="line-315"></a><span class="w"> </span><span class="k">break</span><span class="p">;</span> +<a id="line-316" name="line-316"></a><span class="w"> </span><span class="p">}</span> +<a id="line-317" name="line-317"></a><span class="w"> </span><span class="p">}</span> +<a id="line-318" name="line-318"></a> +<a id="line-319" name="line-319"></a><span class="w"> </span><span class="n">gtk_tree_path_free</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">);</span> +<a id="line-320" name="line-320"></a><span class="p">}</span> +<a id="line-321" name="line-321"></a> +<a id="line-322" name="line-322"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-323" name="line-323"></a><span class="n">insert_history_item</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">,</span> +<a id="line-324" name="line-324"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">,</span> +<a id="line-325" name="line-325"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">prepend</span><span class="p">)</span> +<a id="line-326" name="line-326"></a><span class="p">{</span> +<a id="line-327" name="line-327"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">;</span> +<a id="line-328" name="line-328"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-329" name="line-329"></a> +<a id="line-330" name="line-330"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_utf8_strlen</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">)</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">MIN_ITEM_LEN</span><span class="p">)</span> +<a id="line-331" name="line-331"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-332" name="line-332"></a> +<a id="line-333" name="line-333"></a><span class="w"> </span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_history_store</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> +<a id="line-334" name="line-334"></a> +<a id="line-335" name="line-335"></a><span class="w"> </span><span class="cm">/* remove the text from the store if it was already</span> +<a id="line-336" name="line-336"></a><span class="cm"> * present. If it wasn't, clamp to max history - 1</span> +<a id="line-337" name="line-337"></a><span class="cm"> * before inserting the new row, otherwise appending</span> +<a id="line-338" name="line-338"></a><span class="cm"> * would not work */</span> +<a id="line-339" name="line-339"></a> +<a id="line-340" name="line-340"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">remove_item</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">))</span> +<a id="line-341" name="line-341"></a><span class="w"> </span><span class="n">clamp_list_store</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span> +<a id="line-342" name="line-342"></a><span class="w"> </span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">history_length</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span> +<a id="line-343" name="line-343"></a> +<a id="line-344" name="line-344"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">prepend</span><span class="p">)</span> +<a id="line-345" name="line-345"></a><span class="w"> </span><span class="n">gtk_list_store_insert</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-346" name="line-346"></a><span class="w"> </span><span class="k">else</span> +<a id="line-347" name="line-347"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-348" name="line-348"></a> +<a id="line-349" name="line-349"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span> +<a id="line-350" name="line-350"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-351" name="line-351"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-352" name="line-352"></a><span class="w"> </span><span class="n">text</span><span class="p">,</span> +<a id="line-353" name="line-353"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-354" name="line-354"></a> +<a id="line-355" name="line-355"></a><span class="w"> </span><span class="n">gsearch_history_entry_save_history</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> +<a id="line-356" name="line-356"></a><span class="p">}</span> +<a id="line-357" name="line-357"></a> +<a id="line-358" name="line-358"></a><span class="kt">void</span> +<a id="line-359" name="line-359"></a><span class="n">gsearch_history_entry_prepend_text</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">,</span> +<a id="line-360" name="line-360"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">)</span> +<a id="line-361" name="line-361"></a><span class="p">{</span> +<a id="line-362" name="line-362"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-363" name="line-363"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-364" name="line-364"></a> +<a id="line-365" name="line-365"></a><span class="w"> </span><span class="n">insert_history_item</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-366" name="line-366"></a><span class="p">}</span> +<a id="line-367" name="line-367"></a> +<a id="line-368" name="line-368"></a><span class="kt">void</span> +<a id="line-369" name="line-369"></a><span class="n">gsearch_history_entry_append_text</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">,</span> +<a id="line-370" name="line-370"></a><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">)</span> +<a id="line-371" name="line-371"></a><span class="p">{</span> +<a id="line-372" name="line-372"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-373" name="line-373"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-374" name="line-374"></a> +<a id="line-375" name="line-375"></a><span class="w"> </span><span class="n">insert_history_item</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">,</span><span class="w"> </span><span class="n">text</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-376" name="line-376"></a><span class="p">}</span> +<a id="line-377" name="line-377"></a> +<a id="line-378" name="line-378"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-379" name="line-379"></a><span class="n">gsearch_history_entry_load_history</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-380" name="line-380"></a><span class="p">{</span> +<a id="line-381" name="line-381"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">;</span> +<a id="line-382" name="line-382"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="n">iter</span><span class="p">;</span> +<a id="line-383" name="line-383"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">history</span><span class="p">;</span> +<a id="line-384" name="line-384"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">key</span><span class="p">;</span> +<a id="line-385" name="line-385"></a><span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">i</span><span class="p">;</span> +<a id="line-386" name="line-386"></a> +<a id="line-387" name="line-387"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-388" name="line-388"></a> +<a id="line-389" name="line-389"></a><span class="w"> </span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_history_store</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> +<a id="line-390" name="line-390"></a><span class="w"> </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_history_key</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> +<a id="line-391" name="line-391"></a> +<a id="line-392" name="line-392"></a><span class="w"> </span><span class="n">history</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_get_value</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">settings</span><span class="p">,</span> +<a id="line-393" name="line-393"></a><span class="w"> </span><span class="s">"search-history"</span><span class="p">);</span> +<a id="line-394" name="line-394"></a> +<a id="line-395" name="line-395"></a><span class="w"> </span><span class="n">gtk_list_store_clear</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">);</span> +<a id="line-396" name="line-396"></a> +<a id="line-397" name="line-397"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">history</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-398" name="line-398"></a><span class="w"> </span><span class="n">GVariantIter</span><span class="w"> </span><span class="o">*</span><span class="n">history_iter</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">history_subiter</span><span class="p">;</span> +<a id="line-399" name="line-399"></a><span class="w"> </span><span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">history_item</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">history_subitem</span><span class="p">;</span> +<a id="line-400" name="line-400"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">history_key</span><span class="p">;</span> +<a id="line-401" name="line-401"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="p">;</span> +<a id="line-402" name="line-402"></a> +<a id="line-403" name="line-403"></a><span class="w"> </span><span class="n">g_variant_get</span><span class="w"> </span><span class="p">(</span><span class="n">history</span><span class="p">,</span><span class="w"> </span><span class="s">"a{sas}"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">history_iter</span><span class="p">);</span> +<a id="line-404" name="line-404"></a> +<a id="line-405" name="line-405"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="n">history_item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_variant_iter_next_value</span><span class="w"> </span><span class="p">(</span><span class="n">history_iter</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span> +<a id="line-406" name="line-406"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<a id="line-407" name="line-407"></a><span class="w"> </span><span class="n">g_variant_get</span><span class="w"> </span><span class="p">(</span><span class="n">history_item</span><span class="p">,</span><span class="w"> </span><span class="s">"{sas}"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">history_key</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">history_subiter</span><span class="p">);</span> +<a id="line-408" name="line-408"></a> +<a id="line-409" name="line-409"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">g_strcmp0</span><span class="w"> </span><span class="p">(</span><span class="n">history_key</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-410" name="line-410"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="n">history_subitem</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_variant_iter_next_value</span><span class="w"> </span><span class="p">(</span><span class="n">history_subiter</span><span class="p">))</span><span class="w"> </span><span class="o">&&</span> +<a id="line-411" name="line-411"></a><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">history_length</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> +<a id="line-412" name="line-412"></a><span class="w"> </span><span class="n">g_variant_get</span><span class="w"> </span><span class="p">(</span><span class="n">history_subitem</span><span class="p">,</span><span class="w"> </span><span class="s">"s"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">text</span><span class="p">);</span> +<a id="line-413" name="line-413"></a><span class="w"> </span><span class="n">gtk_list_store_append</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">);</span> +<a id="line-414" name="line-414"></a><span class="w"> </span><span class="n">gtk_list_store_set</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">,</span> +<a id="line-415" name="line-415"></a><span class="w"> </span><span class="o">&</span><span class="n">iter</span><span class="p">,</span> +<a id="line-416" name="line-416"></a><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-417" name="line-417"></a><span class="w"> </span><span class="n">text</span><span class="p">,</span> +<a id="line-418" name="line-418"></a><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-419" name="line-419"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">text</span><span class="p">);</span> +<a id="line-420" name="line-420"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">history_subitem</span><span class="p">);</span> +<a id="line-421" name="line-421"></a><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span> +<a id="line-422" name="line-422"></a><span class="w"> </span><span class="p">}</span> +<a id="line-423" name="line-423"></a><span class="w"> </span><span class="p">}</span> +<a id="line-424" name="line-424"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">history_key</span><span class="p">);</span> +<a id="line-425" name="line-425"></a><span class="w"> </span><span class="n">g_variant_iter_free</span><span class="w"> </span><span class="p">(</span><span class="n">history_subiter</span><span class="p">);</span> +<a id="line-426" name="line-426"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">history_item</span><span class="p">);</span> +<a id="line-427" name="line-427"></a><span class="w"> </span><span class="p">}</span> +<a id="line-428" name="line-428"></a><span class="w"> </span><span class="n">g_variant_iter_free</span><span class="w"> </span><span class="p">(</span><span class="n">history_iter</span><span class="p">);</span> +<a id="line-429" name="line-429"></a><span class="w"> </span><span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">history</span><span class="p">);</span> +<a id="line-430" name="line-430"></a><span class="w"> </span><span class="p">}</span> +<a id="line-431" name="line-431"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">key</span><span class="p">);</span> +<a id="line-432" name="line-432"></a><span class="p">}</span> +<a id="line-433" name="line-433"></a> +<a id="line-434" name="line-434"></a><span class="kt">void</span> +<a id="line-435" name="line-435"></a><span class="n">gsearch_history_entry_clear</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-436" name="line-436"></a><span class="p">{</span> +<a id="line-437" name="line-437"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">;</span> +<a id="line-438" name="line-438"></a> +<a id="line-439" name="line-439"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-440" name="line-440"></a> +<a id="line-441" name="line-441"></a><span class="w"> </span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">get_history_store</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> +<a id="line-442" name="line-442"></a><span class="w"> </span><span class="n">gtk_list_store_clear</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">);</span> +<a id="line-443" name="line-443"></a> +<a id="line-444" name="line-444"></a><span class="w"> </span><span class="n">gsearch_history_entry_save_history</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> +<a id="line-445" name="line-445"></a><span class="p">}</span> +<a id="line-446" name="line-446"></a> +<a id="line-447" name="line-447"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-448" name="line-448"></a><span class="n">gsearch_history_entry_init</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-449" name="line-449"></a><span class="p">{</span> +<a id="line-450" name="line-450"></a><span class="w"> </span><span class="n">GsearchHistoryEntryPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="p">;</span> +<a id="line-451" name="line-451"></a> +<a id="line-452" name="line-452"></a><span class="w"> </span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gsearch_history_entry_get_instance_private</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> +<a id="line-453" name="line-453"></a><span class="w"> </span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">priv</span><span class="p">;</span> +<a id="line-454" name="line-454"></a> +<a id="line-455" name="line-455"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">history_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-456" name="line-456"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">history_length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GSEARCH_HISTORY_ENTRY_HISTORY_LENGTH_DEFAULT</span><span class="p">;</span> +<a id="line-457" name="line-457"></a> +<a id="line-458" name="line-458"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-459" name="line-459"></a> +<a id="line-460" name="line-460"></a><span class="w"> </span><span class="n">priv</span><span class="o">-></span><span class="n">settings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_settings_new</span><span class="w"> </span><span class="p">(</span><span class="s">"org.mate.search-tool"</span><span class="p">);</span> +<a id="line-461" name="line-461"></a><span class="p">}</span> +<a id="line-462" name="line-462"></a> +<a id="line-463" name="line-463"></a><span class="kt">void</span> +<a id="line-464" name="line-464"></a><span class="n">gsearch_history_entry_set_history_length</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">,</span> +<a id="line-465" name="line-465"></a><span class="w"> </span><span class="n">guint</span><span class="w"> </span><span class="n">history_length</span><span class="p">)</span> +<a id="line-466" name="line-466"></a><span class="p">{</span> +<a id="line-467" name="line-467"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-468" name="line-468"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">history_length</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-469" name="line-469"></a> +<a id="line-470" name="line-470"></a><span class="w"> </span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">history_length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">history_length</span><span class="p">;</span> +<a id="line-471" name="line-471"></a> +<a id="line-472" name="line-472"></a><span class="w"> </span><span class="cm">/* TODO: update if we currently have more items than max */</span> +<a id="line-473" name="line-473"></a><span class="p">}</span> +<a id="line-474" name="line-474"></a> +<a id="line-475" name="line-475"></a><span class="n">guint</span> +<a id="line-476" name="line-476"></a><span class="n">gsearch_history_entry_get_history_length</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-477" name="line-477"></a><span class="p">{</span> +<a id="line-478" name="line-478"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-479" name="line-479"></a> +<a id="line-480" name="line-480"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">history_length</span><span class="p">;</span> +<a id="line-481" name="line-481"></a><span class="p">}</span> +<a id="line-482" name="line-482"></a> +<a id="line-483" name="line-483"></a><span class="n">gchar</span><span class="w"> </span><span class="o">*</span> +<a id="line-484" name="line-484"></a><span class="n">gsearch_history_entry_get_history_id</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-485" name="line-485"></a><span class="p">{</span> +<a id="line-486" name="line-486"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-487" name="line-487"></a> +<a id="line-488" name="line-488"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">g_strdup</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">history_id</span><span class="p">);</span> +<a id="line-489" name="line-489"></a><span class="p">}</span> +<a id="line-490" name="line-490"></a> +<a id="line-491" name="line-491"></a><span class="kt">void</span> +<a id="line-492" name="line-492"></a><span class="n">gsearch_history_entry_set_enable_completion</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">,</span> +<a id="line-493" name="line-493"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">enable</span><span class="p">)</span> +<a id="line-494" name="line-494"></a><span class="p">{</span> +<a id="line-495" name="line-495"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-496" name="line-496"></a> +<a id="line-497" name="line-497"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">enable</span><span class="p">)</span> +<a id="line-498" name="line-498"></a><span class="w"> </span><span class="p">{</span> +<a id="line-499" name="line-499"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-500" name="line-500"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-501" name="line-501"></a> +<a id="line-502" name="line-502"></a><span class="w"> </span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_completion_new</span><span class="w"> </span><span class="p">();</span> +<a id="line-503" name="line-503"></a><span class="w"> </span><span class="n">gtk_entry_completion_set_model</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="p">,</span> +<a id="line-504" name="line-504"></a><span class="w"> </span><span class="n">GTK_TREE_MODEL</span><span class="w"> </span><span class="p">(</span><span class="n">get_history_store</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">)));</span> +<a id="line-505" name="line-505"></a> +<a id="line-506" name="line-506"></a><span class="w"> </span><span class="cm">/* Use model column 0 as the text column */</span> +<a id="line-507" name="line-507"></a><span class="w"> </span><span class="n">gtk_entry_completion_set_text_column</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span> +<a id="line-508" name="line-508"></a> +<a id="line-509" name="line-509"></a><span class="w"> </span><span class="n">gtk_entry_completion_set_minimum_key_length</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="p">,</span> +<a id="line-510" name="line-510"></a><span class="w"> </span><span class="n">MIN_ITEM_LEN</span><span class="p">);</span> +<a id="line-511" name="line-511"></a> +<a id="line-512" name="line-512"></a><span class="w"> </span><span class="n">gtk_entry_completion_set_popup_completion</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="p">,</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-513" name="line-513"></a><span class="w"> </span><span class="n">gtk_entry_completion_set_inline_completion</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span> +<a id="line-514" name="line-514"></a> +<a id="line-515" name="line-515"></a><span class="w"> </span><span class="cm">/* Assign the completion to the entry */</span> +<a id="line-516" name="line-516"></a><span class="w"> </span><span class="n">gtk_entry_set_completion</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch_history_entry_get_entry</span><span class="p">(</span><span class="n">entry</span><span class="p">)),</span> +<a id="line-517" name="line-517"></a><span class="w"> </span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="p">);</span> +<a id="line-518" name="line-518"></a><span class="w"> </span><span class="p">}</span> +<a id="line-519" name="line-519"></a><span class="w"> </span><span class="k">else</span> +<a id="line-520" name="line-520"></a><span class="w"> </span><span class="p">{</span> +<a id="line-521" name="line-521"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-522" name="line-522"></a><span class="w"> </span><span class="k">return</span><span class="p">;</span> +<a id="line-523" name="line-523"></a> +<a id="line-524" name="line-524"></a><span class="w"> </span><span class="n">gtk_entry_set_completion</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">gsearch_history_entry_get_entry</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">)),</span> +<a id="line-525" name="line-525"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-526" name="line-526"></a> +<a id="line-527" name="line-527"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="p">);</span> +<a id="line-528" name="line-528"></a> +<a id="line-529" name="line-529"></a><span class="w"> </span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-530" name="line-530"></a><span class="w"> </span><span class="p">}</span> +<a id="line-531" name="line-531"></a><span class="p">}</span> +<a id="line-532" name="line-532"></a> +<a id="line-533" name="line-533"></a><span class="n">gboolean</span> +<a id="line-534" name="line-534"></a><span class="n">gsearch_history_entry_get_enable_completion</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-535" name="line-535"></a><span class="p">{</span> +<a id="line-536" name="line-536"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="n">FALSE</span><span class="p">);</span> +<a id="line-537" name="line-537"></a> +<a id="line-538" name="line-538"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">entry</span><span class="o">-></span><span class="n">priv</span><span class="o">-></span><span class="n">completion</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span> +<a id="line-539" name="line-539"></a><span class="p">}</span> +<a id="line-540" name="line-540"></a> +<a id="line-541" name="line-541"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-542" name="line-542"></a><span class="n">gsearch_history_entry_new</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">history_id</span><span class="p">,</span> +<a id="line-543" name="line-543"></a><span class="w"> </span><span class="n">gboolean</span><span class="w"> </span><span class="n">enable_completion</span><span class="p">)</span> +<a id="line-544" name="line-544"></a><span class="p">{</span> +<a id="line-545" name="line-545"></a><span class="w"> </span><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">ret</span><span class="p">;</span> +<a id="line-546" name="line-546"></a><span class="w"> </span><span class="n">GtkListStore</span><span class="w"> </span><span class="o">*</span><span class="n">store</span><span class="p">;</span> +<a id="line-547" name="line-547"></a> +<a id="line-548" name="line-548"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="p">(</span><span class="n">history_id</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-549" name="line-549"></a> +<a id="line-550" name="line-550"></a><span class="w"> </span><span class="cm">/* Note that we are setting the model, so</span> +<a id="line-551" name="line-551"></a><span class="cm"> * user must be careful to always manipulate</span> +<a id="line-552" name="line-552"></a><span class="cm"> * data in the history through gsearch_history_entry_</span> +<a id="line-553" name="line-553"></a><span class="cm"> * functions.</span> +<a id="line-554" name="line-554"></a><span class="cm"> */</span> +<a id="line-555" name="line-555"></a> +<a id="line-556" name="line-556"></a><span class="w"> </span><span class="n">store</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_list_store_new</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">G_TYPE_STRING</span><span class="p">);</span> +<a id="line-557" name="line-557"></a> +<a id="line-558" name="line-558"></a><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_object_new</span><span class="p">(</span><span class="n">GSEARCH_TYPE_HISTORY_ENTRY</span><span class="p">,</span> +<a id="line-559" name="line-559"></a><span class="w"> </span><span class="s">"has-entry"</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">,</span> +<a id="line-560" name="line-560"></a><span class="w"> </span><span class="s">"history-id"</span><span class="p">,</span><span class="w"> </span><span class="n">history_id</span><span class="p">,</span> +<a id="line-561" name="line-561"></a><span class="w"> </span><span class="s">"model"</span><span class="p">,</span><span class="w"> </span><span class="n">store</span><span class="p">,</span> +<a id="line-562" name="line-562"></a><span class="w"> </span><span class="s">"entry-text-column"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span> +<a id="line-563" name="line-563"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-564" name="line-564"></a> +<a id="line-565" name="line-565"></a><span class="w"> </span><span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">store</span><span class="p">);</span> +<a id="line-566" name="line-566"></a> +<a id="line-567" name="line-567"></a><span class="w"> </span><span class="cm">/* loading has to happen after the model</span> +<a id="line-568" name="line-568"></a><span class="cm"> * has been set. However the model is not a</span> +<a id="line-569" name="line-569"></a><span class="cm"> * G_PARAM_CONSTRUCT property of GtkComboBox</span> +<a id="line-570" name="line-570"></a><span class="cm"> * so we cannot do this in the constructor.</span> +<a id="line-571" name="line-571"></a><span class="cm"> * For now we simply do here since this widget is</span> +<a id="line-572" name="line-572"></a><span class="cm"> * not bound to other programming languages.</span> +<a id="line-573" name="line-573"></a><span class="cm"> * A maybe better alternative is to override the</span> +<a id="line-574" name="line-574"></a><span class="cm"> * model property of combobox and mark CONTRUCT_ONLY.</span> +<a id="line-575" name="line-575"></a><span class="cm"> * This would also ensure that the model cannot be</span> +<a id="line-576" name="line-576"></a><span class="cm"> * set explicitely at a later time.</span> +<a id="line-577" name="line-577"></a><span class="cm"> */</span> +<a id="line-578" name="line-578"></a><span class="w"> </span><span class="n">gsearch_history_entry_load_history</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="p">));</span> +<a id="line-579" name="line-579"></a> +<a id="line-580" name="line-580"></a><span class="w"> </span><span class="n">gsearch_history_entry_set_enable_completion</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="p">),</span> +<a id="line-581" name="line-581"></a><span class="w"> </span><span class="n">enable_completion</span><span class="p">);</span> +<a id="line-582" name="line-582"></a> +<a id="line-583" name="line-583"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span> +<a id="line-584" name="line-584"></a><span class="p">}</span> +<a id="line-585" name="line-585"></a> +<a id="line-586" name="line-586"></a><span class="cm">/*</span> +<a id="line-587" name="line-587"></a><span class="cm"> * Utility function to get the editable text entry internal widget.</span> +<a id="line-588" name="line-588"></a><span class="cm"> * I would prefer to not expose this implementation detail and</span> +<a id="line-589" name="line-589"></a><span class="cm"> * simply make the GsearchHistoryEntry widget implement the</span> +<a id="line-590" name="line-590"></a><span class="cm"> * GtkEditable interface. Unfortunately both GtkEditable and</span> +<a id="line-591" name="line-591"></a><span class="cm"> * GtkComboBox have a "changed" signal and I am not sure how to</span> +<a id="line-592" name="line-592"></a><span class="cm"> * handle the conflict.</span> +<a id="line-593" name="line-593"></a><span class="cm"> */</span> +<a id="line-594" name="line-594"></a><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span> +<a id="line-595" name="line-595"></a><span class="n">gsearch_history_entry_get_entry</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">)</span> +<a id="line-596" name="line-596"></a><span class="p">{</span> +<a id="line-597" name="line-597"></a><span class="w"> </span><span class="n">g_return_val_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">),</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-598" name="line-598"></a> +<a id="line-599" name="line-599"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">gtk_bin_get_child</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_BIN</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-600" name="line-600"></a><span class="p">}</span> +<a id="line-601" name="line-601"></a> +<a id="line-602" name="line-602"></a><span class="k">static</span><span class="w"> </span><span class="kt">void</span> +<a id="line-603" name="line-603"></a><span class="n">escape_cell_data_func</span><span class="w"> </span><span class="p">(</span><span class="n">GtkTreeViewColumn</span><span class="w"> </span><span class="o">*</span><span class="n">col</span><span class="p">,</span> +<a id="line-604" name="line-604"></a><span class="w"> </span><span class="n">GtkCellRenderer</span><span class="w"> </span><span class="o">*</span><span class="n">renderer</span><span class="p">,</span> +<a id="line-605" name="line-605"></a><span class="w"> </span><span class="n">GtkTreeModel</span><span class="w"> </span><span class="o">*</span><span class="n">model</span><span class="p">,</span> +<a id="line-606" name="line-606"></a><span class="w"> </span><span class="n">GtkTreeIter</span><span class="w"> </span><span class="o">*</span><span class="n">iter</span><span class="p">,</span> +<a id="line-607" name="line-607"></a><span class="w"> </span><span class="n">GsearchHistoryEntryEscapeFunc</span><span class="w"> </span><span class="n">escape_func</span><span class="p">)</span> +<a id="line-608" name="line-608"></a><span class="p">{</span> +<a id="line-609" name="line-609"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="p">;</span> +<a id="line-610" name="line-610"></a><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">escaped</span><span class="p">;</span> +<a id="line-611" name="line-611"></a> +<a id="line-612" name="line-612"></a><span class="w"> </span><span class="n">gtk_tree_model_get</span><span class="w"> </span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="w"> </span><span class="n">iter</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">str</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">);</span> +<a id="line-613" name="line-613"></a><span class="w"> </span><span class="n">escaped</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">escape_func</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-614" name="line-614"></a><span class="w"> </span><span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">renderer</span><span class="p">,</span><span class="w"> </span><span class="s">"text"</span><span class="p">,</span><span class="w"> </span><span class="n">escaped</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-615" name="line-615"></a> +<a id="line-616" name="line-616"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">str</span><span class="p">);</span> +<a id="line-617" name="line-617"></a><span class="w"> </span><span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">escaped</span><span class="p">);</span> +<a id="line-618" name="line-618"></a><span class="p">}</span> +<a id="line-619" name="line-619"></a> +<a id="line-620" name="line-620"></a><span class="kt">void</span> +<a id="line-621" name="line-621"></a><span class="n">gsearch_history_entry_set_escape_func</span><span class="w"> </span><span class="p">(</span><span class="n">GsearchHistoryEntry</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="p">,</span> +<a id="line-622" name="line-622"></a><span class="w"> </span><span class="n">GsearchHistoryEntryEscapeFunc</span><span class="w"> </span><span class="n">escape_func</span><span class="p">)</span> +<a id="line-623" name="line-623"></a><span class="p">{</span> +<a id="line-624" name="line-624"></a><span class="w"> </span><span class="n">GList</span><span class="w"> </span><span class="o">*</span><span class="n">cells</span><span class="p">;</span> +<a id="line-625" name="line-625"></a> +<a id="line-626" name="line-626"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">GSEARCH_IS_HISTORY_ENTRY</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-627" name="line-627"></a> +<a id="line-628" name="line-628"></a><span class="w"> </span><span class="n">cells</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_cell_layout_get_cells</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CELL_LAYOUT</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> +<a id="line-629" name="line-629"></a> +<a id="line-630" name="line-630"></a><span class="w"> </span><span class="cm">/* We only have one cell renderer */</span> +<a id="line-631" name="line-631"></a><span class="w"> </span><span class="n">g_return_if_fail</span><span class="w"> </span><span class="p">(</span><span class="n">cells</span><span class="o">-></span><span class="n">data</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">cells</span><span class="o">-></span><span class="n">next</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-632" name="line-632"></a> +<a id="line-633" name="line-633"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">escape_func</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">)</span> +<a id="line-634" name="line-634"></a><span class="w"> </span><span class="n">gtk_cell_layout_set_cell_data_func</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CELL_LAYOUT</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">),</span> +<a id="line-635" name="line-635"></a><span class="w"> </span><span class="n">GTK_CELL_RENDERER</span><span class="w"> </span><span class="p">(</span><span class="n">cells</span><span class="o">-></span><span class="n">data</span><span class="p">),</span> +<a id="line-636" name="line-636"></a><span class="w"> </span><span class="p">(</span><span class="n">GtkCellLayoutDataFunc</span><span class="p">)</span><span class="w"> </span><span class="n">escape_cell_data_func</span><span class="p">,</span> +<a id="line-637" name="line-637"></a><span class="w"> </span><span class="n">escape_func</span><span class="p">,</span> +<a id="line-638" name="line-638"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-639" name="line-639"></a><span class="w"> </span><span class="k">else</span> +<a id="line-640" name="line-640"></a><span class="w"> </span><span class="n">gtk_cell_layout_set_cell_data_func</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CELL_LAYOUT</span><span class="w"> </span><span class="p">(</span><span class="n">entry</span><span class="p">),</span> +<a id="line-641" name="line-641"></a><span class="w"> </span><span class="n">GTK_CELL_RENDERER</span><span class="w"> </span><span class="p">(</span><span class="n">cells</span><span class="o">-></span><span class="n">data</span><span class="p">),</span> +<a id="line-642" name="line-642"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-643" name="line-643"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span> +<a id="line-644" name="line-644"></a><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<a id="line-645" name="line-645"></a> +<a id="line-646" name="line-646"></a><span class="w"> </span><span class="n">g_list_free</span><span class="w"> </span><span class="p">(</span><span class="n">cells</span><span class="p">);</span> +<a id="line-647" name="line-647"></a><span class="p">}</span> +</pre></div></td></tr></table></div> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/index.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/index.html new file mode 100644 index 00000000..a1dffabd --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/index.html @@ -0,0 +1,388 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> + + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils</h1> + <div id="filters"> + + <label class="checkBtn"><input type="checkbox" onclick="toggleSeverity(this)" id="error"checked/>error</label> + <label class="checkBtn"><input type="checkbox" onclick="toggleSeverity(this)" id="warning"checked/>warning</label> + <label class="checkBtn disabled"><input type="checkbox" onclick="toggleSeverity(this)" id="portability"disabled/>portability</label> + <label class="checkBtn disabled"><input type="checkbox" onclick="toggleSeverity(this)" id="performance"disabled/>performance</label> + <label class="checkBtn"><input type="checkbox" onclick="toggleSeverity(this)" id="style"checked/>style</label> + <label class="checkBtn"><input type="checkbox" onclick="toggleSeverity(this)" id="information"checked/>information</label> + | + <label class="checkBtn"><input type="checkbox" onclick="toggleTool(this)" id="cppcheck"checked/>cppcheck</label> + <label class="checkBtn disabled"><input type="checkbox" onclick="toggleTool(this)" id="clang-tidy"disabled/>clang-tidy</label> + | + <label class="severityHeader">File: <input type="text" oninput="filterFile(this.value)"/></label> + <label class="severityHeader">Filter: <input type="text" oninput="filterText(this.value)"/></label> + </div> + + </div> + + <div id="menu_index"> + <p><a href="index.html">Defect summary</a> </p> + + <label><input type="checkbox" class="idToggle" onclick="toggleAll()" checked> Toggle all</label> + <table> + <tr><th>Show</th><th>#</th><th>Defect ID</th></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="variableScope" name="variableScope" checked></td><td>68</td><td>variableScope</td></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="unusedStructMember" name="unusedStructMember" checked></td><td>15</td><td>unusedStructMember</td></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="unknownMacro" name="unknownMacro" checked></td><td>9</td><td>unknownMacro</td></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="constParameter" name="constParameter" checked></td><td>6</td><td>constParameter</td></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="shadowArgument" name="shadowArgument" checked></td><td>2</td><td>shadowArgument</td></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="duplicateConditionalAssign" name="duplicateConditionalAssign" checked></td><td>1</td><td>duplicateConditionalAssign</td></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="knownConditionTrueFalse" name="knownConditionTrueFalse" checked></td><td>1</td><td>knownConditionTrueFalse</td></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="missingInclude" name="missingInclude" checked></td><td>1</td><td>missingInclude</td></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="shadowVariable" name="shadowVariable" checked></td><td>1</td><td>shadowVariable</td></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="unusedVariable" name="unusedVariable" checked></td><td>1</td><td>unusedVariable</td></tr> + <tr><td><input type="checkbox" class="idToggle" onclick="toggleDisplay(this)" id="uselessAssignmentPtrArg" name="uselessAssignmentPtrArg" checked></td><td>1</td><td>uselessAssignmentPtrArg</td></tr> + <tr><td></td><td>106</td><td>total</td></tr> + </table> + <p><a href="stats.html">Statistics</a></p> + </div> + <div id="content_index"> + + <table class="summaryTable"> + <tr><th>Line</th><th>Id</th><th>CWE</th><th>Severity</th><th>Message</th></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="40.html"></a></td></tr> + <tr class="missingInclude sev_information issue"><td></td><td>missingInclude</td><td></td><td>information</td><td>Cppcheck cannot find all the include files (use --check-config for details)</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="0.html">baobab/src/baobab-cell-renderer-progress.c</a></td></tr> + <tr class="unknownMacro sev_error issue"><td><a href="0.html#line-39">39</a></td><td>unknownMacro</td><td></td><td>error</td><td class="error">There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="1.html">baobab/src/baobab-chart.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="1.html#line-337">337</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'item' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="1.html#line-465">465</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'item' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="1.html#line-499">499</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'item' can be reduced.</td></tr> + <tr class="constParameter sev_style issue"><td><a href="1.html#line-673">673</a></td><td>constParameter</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>Parameter 'iter' can be declared as pointer to const</td></tr> + <tr class="constParameter sev_style issue"><td><a href="1.html#line-687">687</a></td><td>constParameter</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>Parameter 'iter' can be declared as pointer to const</td></tr> + <tr class="constParameter sev_style issue"><td><a href="1.html#line-701">701</a></td><td>constParameter</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>Parameter 'iter' can be declared as pointer to const</td></tr> + <tr class="constParameter sev_style issue"><td><a href="1.html#line-729">729</a></td><td>constParameter</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>Parameter 'iter' can be declared as pointer to const</td></tr> + <tr class="variableScope sev_style issue"><td><a href="1.html#line-1007">1007</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'item' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="1.html#line-1412">1412</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'current_root' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="1.html#line-1628">1628</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'parent_path' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="1.html#line-1688">1688</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'sel_type' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="2.html">baobab/src/baobab-remote-connect-dialog.c</a></td></tr> + <tr class="unknownMacro sev_error issue"><td><a href="2.html#line-54">54</a></td><td>unknownMacro</td><td></td><td>error</td><td class="error">There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="3.html">baobab/src/baobab-resources.c</a></td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="3.html#line-9">9</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>union member 'Anonymous0::alignment' is never used.</td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="3.html#line-9">9</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>union member 'Anonymous0::ptr' is never used.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="4.html">baobab/src/baobab-ringschart.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="4.html#line-421">421</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'item' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="4.html#line-433">433</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'layout' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="5.html">baobab/src/baobab-scan.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="5.html#line-342">342</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'hla' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="5.html#line-346">346</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'sizes' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="6.html">baobab/src/baobab-treemap.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="6.html#line-111">111</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'layout' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="7.html">baobab/src/baobab-utils.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="7.html#line-102">102</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'toggle' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="7.html#line-363">363</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'primary' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="8.html">baobab/src/baobab.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="8.html#line-83">83</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'display' can be reduced.</td></tr> + <tr class="knownConditionTrueFalse sev_style issue"><td><a href="8.html#line-338">338</a></td><td>knownConditionTrueFalse</td><td><a href="https://cwe.mitre.org/data/definitions/571.html">571</a></td><td>style</td><td>Condition 'data->depth<currentdepth' is always true</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="9.html">gsearchtool/libmateui-deprecated/gsearchtool-entry.c</a></td></tr> + <tr class="unknownMacro sev_error issue"><td><a href="9.html#line-53">53</a></td><td>unknownMacro</td><td></td><td>error</td><td class="error">There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="10.html">gsearchtool/mate-submodules/libegg/eggdesktopfile.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="10.html#line-497">497</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'try_exec' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="10.html#line-497">497</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'found_program' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="10.html#line-498">498</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'only_show_in' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="10.html#line-498">498</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'not_show_in' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="10.html#line-500">500</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'i' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="10.html#line-622">622</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'p' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="11.html">gsearchtool/mate-submodules/libegg/eggsmclient-xsmp.c</a></td></tr> + <tr class="unknownMacro sev_error issue"><td><a href="11.html#line-182">182</a></td><td>unknownMacro</td><td></td><td>error</td><td class="error">There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE is a macro then please configure it.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="12.html">gsearchtool/mate-submodules/libegg/eggsmclient.c</a></td></tr> + <tr class="unknownMacro sev_error issue"><td><a href="12.html#line-48">48</a></td><td>unknownMacro</td><td></td><td>error</td><td class="error">There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="13.html">gsearchtool/mate-submodules/libegg/eggtreemultidnd.c</a></td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="13.html#line-46">46</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>struct member '_TreeViewDragInfo::source_target_list' is never used.</td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="13.html#line-49">49</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>struct member '_TreeViewDragInfo::dest_target_list' is never used.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="14.html">gsearchtool/src/gsearchtool-callbacks.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="14.html#line-131">131</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'command' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="14.html#line-1123">1123</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'new2' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="14.html#line-1154">1154</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'str' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="14.html#line-1415">1415</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'tmp' can be reduced.</td></tr> + <tr class="shadowArgument sev_style issue"><td><a href="14.html#line-1883">1883</a></td><td>shadowArgument</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>Local variable 'response' shadows outer argument</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="15.html">gsearchtool/src/gsearchtool-support.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="15.html#line-790">790</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'screen' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="15.html#line-791">791</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'display' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="15.html#line-1168">1168</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'valid_bytes' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="16.html">gsearchtool/src/gsearchtool.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="16.html#line-672">672</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'value' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="16.html#line-1061">1061</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'string' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="16.html#line-2251">2251</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'path' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="17.html">logview/src/logview-app.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="17.html#line-156">156</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'info' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="17.html#line-158">158</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'content_type' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="17.html#line-158">158</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'name' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="18.html">logview/src/logview-filter-manager.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="18.html#line-169">169</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'name' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="18.html#line-170">170</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'regex' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="18.html#line-171">171</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'filter' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="18.html#line-172">172</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'tag' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="19.html">logview/src/logview-findbar.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="19.html#line-331">331</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'desc' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="20.html">logview/src/logview-log.c</a></td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="20.html#line-80">80</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>struct member 'GZHandle::parent_str' is never used.</td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="20.html#line-81">81</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>struct member 'GZHandle::buffer' is never used.</td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="20.html#line-82">82</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>struct member 'GZHandle::file' is never used.</td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="20.html#line-85">85</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>struct member 'GZHandle::last_z_result' is never used.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="20.html#line-95">95</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'lines' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="20.html#line-199">199</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'res' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="20.html#line-200">200</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'day' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="20.html#line-535">535</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'z_result' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="21.html">logview/src/logview-loglist.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="21.html#line-80">80</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'day' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="21.html#line-481">481</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'days' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="22.html">logview/src/logview-manager.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="22.html#line-220">220</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'data' can be reduced.</td></tr> + <tr class="constParameter sev_style issue"><td><a href="22.html#line-418">418</a></td><td>constParameter</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>Parameter 'log' can be declared as pointer to const</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="23.html">logview/src/logview-prefs.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="23.html#line-148">148</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'tokens' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="23.html#line-149">149</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'str' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="23.html#line-150">150</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'filter' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="23.html#line-151">151</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'tag' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="23.html#line-385">385</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'stored' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="23.html#line-425">425</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'stored' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="24.html">logview/src/logview-resources.c</a></td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="24.html#line-9">9</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>union member 'Anonymous0::alignment' is never used.</td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="24.html#line-9">9</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>union member 'Anonymous0::ptr' is never used.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="25.html">logview/src/logview-window.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="25.html#line-337">337</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'active' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="25.html#line-522">522</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'mark' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="25.html#line-619">619</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'end' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="25.html#line-620">620</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'text' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="25.html#line-682">682</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'filter' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="25.html#line-713">713</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'tag' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="25.html#line-714">714</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'action' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="25.html#line-1037">1037</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'primary' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="25.html#line-1317">1317</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'item' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="25.html#line-1559">1559</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'err' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="26.html">logview/src/tests/test-reader.c</a></td></tr> + <tr class="unusedVariable sev_style issue"><td><a href="26.html#line-37">37</a></td><td>unusedVariable</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>Unused variable: day</td></tr> + <tr class="variableScope sev_style issue"><td><a href="26.html#line-38">38</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'day_s' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="27.html">mate-dictionary/libgdict/gdict-client-context.c</a></td></tr> + <tr class="unknownMacro sev_error issue"><td><a href="27.html#line-196">196</a></td><td>unknownMacro</td><td></td><td>error</td><td class="error">There is an unknown macro here somewhere. Configuration is required. If G_ADD_PRIVATE is a macro then please configure it.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="28.html">mate-dictionary/libgdict/gdict-defbox.c</a></td></tr> + <tr class="unknownMacro sev_error issue"><td><a href="28.html#line-126">126</a></td><td>unknownMacro</td><td></td><td>error</td><td class="error">There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="29.html">mate-dictionary/libgdict/gdict-source-chooser.c</a></td></tr> + <tr class="unknownMacro sev_error issue"><td><a href="29.html#line-92">92</a></td><td>unknownMacro</td><td></td><td>error</td><td class="error">There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="30.html">mate-dictionary/libgdict/gdict-source.c</a></td></tr> + <tr class="duplicateConditionalAssign sev_style issue"><td><a href="30.html#line-411">411</a></td><td>duplicateConditionalAssign</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The statement 'if (priv->transport!=transport) priv->transport=transport' is logically equivalent to 'priv->transport=transport'.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="31.html">mate-dictionary/libgdict/gdict-speller.c</a></td></tr> + <tr class="unknownMacro sev_error issue"><td><a href="31.html#line-108">108</a></td><td>unknownMacro</td><td></td><td>error</td><td class="error">There is an unknown macro here somewhere. Configuration is required. If G_DEFINE_TYPE_WITH_PRIVATE is a macro then please configure it.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="32.html">mate-dictionary/src/gdict-common.c</a></td></tr> + <tr class="uselessAssignmentPtrArg sev_warning issue"><td><a href="32.html#line-185">185</a></td><td>uselessAssignmentPtrArg</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>warning</td><td class="warning">Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="33.html">mate-dictionary/src/gdict-pref-dialog.c</a></td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="33.html#line-84">84</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>struct member '_GdictPrefDialog::help_button' is never used.</td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="33.html#line-85">85</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>struct member '_GdictPrefDialog::close_button' is never used.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="34.html">mate-dictionary/src/gdict-window.c</a></td></tr> + <tr class="shadowArgument sev_style issue"><td><a href="34.html#line-385">385</a></td><td>shadowArgument</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>Local variable 'context' shadows outer argument</td></tr> + <tr class="constParameter sev_style issue"><td><a href="34.html#line-1009">1009</a></td><td>constParameter</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>Parameter 'action' can be declared as pointer to const</td></tr> + <tr class="variableScope sev_style issue"><td><a href="34.html#line-1681">1681</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'item' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="35.html">mate-screenshot/src/screenshot-dialog.c</a></td></tr> + <tr class="shadowVariable sev_style issue"><td><a href="35.html#line-205">205</a></td><td>shadowVariable</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>Local variable 'dialog' shadows outer variable</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="36.html">mate-screenshot/src/screenshot-resources.c</a></td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="36.html#line-9">9</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>union member 'Anonymous0::alignment' is never used.</td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="36.html#line-9">9</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>union member 'Anonymous0::ptr' is never used.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="37.html">mate-screenshot/src/screenshot-save.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="37.html#line-51">51</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'message' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="37.html#line-116">116</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'dialog' can be reduced.</td></tr> + <tr class="variableScope sev_style issue"><td><a href="37.html#line-143">143</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'dir_name' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="38.html">mate-screenshot/src/screenshot-utils.c</a></td></tr> + <tr class="variableScope sev_style issue"><td><a href="38.html#line-684">684</a></td><td>variableScope</td><td><a href="https://cwe.mitre.org/data/definitions/398.html">398</a></td><td>style</td><td>The scope of the variable 'i' can be reduced.</td></tr> + <tbody class="fileEntry"> + <tr><td colspan="5"><a href="39.html">mate-screenshot/src/screenshot-xfer.c</a></td></tr> + <tr class="unusedStructMember sev_style issue"><td><a href="39.html#line-34">34</a></td><td>unusedStructMember</td><td><a href="https://cwe.mitre.org/data/definitions/563.html">563</a></td><td>style</td><td>struct member 'TransferDialog::cancellable' is never used.</td></tr> + </tbody> + </table> + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/stats.html b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/stats.html new file mode 100644 index 00000000..9d5b1bdf --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/stats.html @@ -0,0 +1,190 @@ + +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Cppcheck - HTML report - mate-utils</title> + <link rel="stylesheet" href="style.css"> + <style> + + </style> + <script> + function getStyle(el, styleProp) { + var y; + + if (el.currentStyle) { + y = el.currentStyle[styleProp]; + } else if (window.getComputedStyle) { + y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); + } + + return y; + } + + function toggle() { + var el = this.expandable_content; + var mark = this.expandable_marker; + + if (el.style.display === "block") { + el.style.display = "none"; + mark.textContent = "[+]"; + } else { + el.style.display = "block"; + mark.textContent = "[-]"; + } + } + + function initExpandables() { + var elements = document.querySelectorAll(".expandable"); + + for (var i = 0, len = elements.length; i < len; i++) { + var el = elements[i]; + var clickable = el.querySelector("span"); + var marker = clickable.querySelector(".marker"); + var content = el.querySelector(".content"); + var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right")); + content.style.width = width + "px"; + clickable.expandable_content = content; + clickable.expandable_marker = marker; + clickable.addEventListener("click", toggle); + } + } + + function toggleDisplay(cb) { + var elements = document.querySelectorAll("." + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("id-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleSeverity(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + var elements = document.querySelectorAll(".sev_" + cb.id); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("severity-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleTool(cb) { + cb.parentElement.classList.toggle("unchecked", !cb.checked); + + var elements; + if (cb.id == "clang-tidy") + elements = document.querySelectorAll("[class^=clang-tidy-]"); + else + elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])"); + + for (var i = 0, len = elements.length; i < len; i++) { + elements[i].classList.toggle("tool-filtered", !cb.checked); + } + + updateFileRows(); + } + + function toggleAll() { + var elements = document.querySelectorAll(".idToggle"); + + // starting from 1 since 0 is the "toggle all" input + for (var i = 1, len = elements.length; i < len; i++) { + var changed = elements[i].checked != elements[0].checked; + if (changed) { + elements[i].checked = elements[0].checked; + toggleDisplay(elements[i]); + } + } + } + + function filterFile(filter) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase()); + elements[i].classList.toggle("text-filtered", !visible); + } + } + + function filterText(text) { + filter = text.toLowerCase(); + var elements = document.querySelectorAll(".issue"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = false; + var fields = elements[i].querySelectorAll("td"); + for (var n = 0, num = fields.length; n < num; n++) { + if (fields[n].textContent.toLowerCase().includes(filter)) { + visible = true; + break; + } + } + elements[i].classList.toggle("text-filtered", !visible); + } + + updateFileRows(); + } + + function updateFileRows(element) { + var elements = document.querySelectorAll(".fileEntry"); + + for (var i = 0, len = elements.length; i < len; i++) { + var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)"); + elements[i].classList.toggle("file-filtered", !visible); + } + } + + window.addEventListener("load", initExpandables); + </script> + </head> + <body> + <div id="wrapper"> + <div id="header" class="header"> + <h1>Cppcheck report - mate-utils: Statistics</h1> + + </div> + + <div id="menu_index"> + <p><a href="index.html">Back to summary</a> </p> + + </div> + <div id="content_index"> +<p><span class="statHeader">Top 10 files for error severity, total findings: 9</span><br> +   1 <a href="31.html"> mate-dictionary/libgdict/gdict-speller.c</a><br> +   1 <a href="29.html"> mate-dictionary/libgdict/gdict-source-chooser.c</a><br> +   1 <a href="28.html"> mate-dictionary/libgdict/gdict-defbox.c</a><br> +   1 <a href="27.html"> mate-dictionary/libgdict/gdict-client-context.c</a><br> +   1 <a href="12.html"> gsearchtool/mate-submodules/libegg/eggsmclient.c</a><br> +   1 <a href="11.html"> gsearchtool/mate-submodules/libegg/eggsmclient-xsmp.c</a><br> +   1 <a href="9.html"> gsearchtool/libmateui-deprecated/gsearchtool-entry.c</a><br> +   1 <a href="2.html"> baobab/src/baobab-remote-connect-dialog.c</a><br> +   1 <a href="0.html"> baobab/src/baobab-cell-renderer-progress.c</a><br> +</p> +<p><span class="statHeader">Top 10 files for warning severity, total findings: 1</span><br> +   1 <a href="32.html"> mate-dictionary/src/gdict-common.c</a><br> +</p> +<p><span class="statHeader">Top 10 files for style severity, total findings: 95</span><br> +   11 <a href="1.html"> baobab/src/baobab-chart.c</a><br> +   10 <a href="25.html"> logview/src/logview-window.c</a><br> +   8  <a href="20.html"> logview/src/logview-log.c</a><br> +   6  <a href="23.html"> logview/src/logview-prefs.c</a><br> +   6  <a href="10.html"> gsearchtool/mate-submodules/libegg/eggdesktopfile.c</a><br> +   5  <a href="14.html"> gsearchtool/src/gsearchtool-callbacks.c</a><br> +   4  <a href="18.html"> logview/src/logview-filter-manager.c</a><br> +   3  <a href="37.html"> mate-screenshot/src/screenshot-save.c</a><br> +   3  <a href="34.html"> mate-dictionary/src/gdict-window.c</a><br> +   3  <a href="17.html"> logview/src/logview-app.c</a><br> +</p> + + </div> + <div id="footer" class="footer"> + <p> + Created by Cppcheck 2.9 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>) + </p> + </div> + </div> + </body> +</html> diff --git a/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/style.css b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/style.css new file mode 100644 index 00000000..3897bfaf --- /dev/null +++ b/2023-09-10-084819-3471-cppcheck@b19cd9c47de3_master/style.css @@ -0,0 +1,177 @@ + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-size: 13px; + line-height: 1.5; + height: 100%; + margin: 0; +} + +#wrapper { + position: fixed; + height: 100vh; + width: 100vw; + display: grid; + grid-template-rows: fit-content(8rem) auto fit-content(8rem); + grid-template-columns: fit-content(25%) 1fr; + grid-template-areas: + "header header" + "menu content" + "footer footer"; +} + +h1 { + margin: 0 0 8px -2px; + font-size: 175%; +} + +.header { + padding: 0 0 5px 15px; + grid-area: header; + border-bottom: thin solid #aaa; +} + +.footer { + grid-area: footer; + border-top: thin solid #aaa; + font-size: 85%; + +} + +.footer > p { + margin: 4px; +} + +#menu, +#menu_index { + grid-area: menu; + text-align: left; + overflow: auto; + padding: 0 23px 15px 15px; + border-right: thin solid #aaa; + min-width: 200px; +} + +#menu > a { + display: block; + margin-left: 10px; + font-size: 12px; +} + +#content, +#content_index { + grid-area: content; + padding: 0px 5px 15px 15px; + overflow: auto; +} + +label { + white-space: nowrap; +} + +label.checkBtn.disabled { + color: #606060; + background: #e0e0e0; + font-style: italic; +} + +label.checkBtn, input[type="text"] { + border: 1px solid grey; + border-radius: 4px; + box-shadow: 1px 1px inset; + padding: 1px 5px; +} + +label.checkBtn { + white-space: nowrap; + background: #ccddff; +} + +label.unchecked { + background: #eff8ff; + box-shadow: 1px 1px 1px; +} + +label.checkBtn:hover, label.unchecked:hover{ + box-shadow: 0 0 2px; +} + +label.disabled:hover { + box-shadow: 1px 1px inset; +} + +label.checkBtn > input { + display:none; +} + +.summaryTable { + width: 100%; +} + +table.summaryTable td { padding: 0 5px 0 5px; } + +.statHeader, .severityHeader { + font-weight: bold; +} + +.warning { + background-color: #ffffa7; +} + +.error { + background-color: #ffb7b7; +} + +.error2 { + background-color: #faa; + display: inline-block; + margin-left: 4px; +} + +.inconclusive { + background-color: #b6b6b4; +} + +.inconclusive2 { + background-color: #b6b6b4; + display: inline-block; + margin-left: 4px; +} + +.verbose { + display: inline-block; + vertical-align: top; + cursor: help; +} + +.verbose .content { + display: none; + position: absolute; + padding: 10px; + margin: 4px; + max-width: 40%; + white-space: pre-wrap; + border: 1px solid #000; + background-color: #ffffcc; + cursor: auto; +} + +.highlight .hll { + padding: 1px; +} + +.highlighttable { + background-color: #fff; + position: relative; + margin: -10px; +} + +.linenos { + border-right: thin solid #aaa; + color: #d3d3d3; + padding-right: 6px; +} + +.id-filtered, .severity-filtered, .file-filtered, .tool-filtered, .text-filtered { + visibility: collapse; +} |